Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1926530lqe; Tue, 9 Apr 2024 05:02:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWT/MlXTKQfklOMZyuuXVO2Yyu+zMwrj4693AcheQw/M/QPypwV5nvCgu4m4g/RZGYr/j0W/EZrwzR4idk7Y1YxIovI7Oep3DDdaIaQLw== X-Google-Smtp-Source: AGHT+IFmwMgLpWANo+0eIoZtqvoIXs3pNayvhuL8r1L2zT8i5jXbUj4sFqlOqHwqNz0GdJOj4Okn X-Received: by 2002:a50:99d0:0:b0:56e:d71:1770 with SMTP id n16-20020a5099d0000000b0056e0d711770mr8087464edb.21.1712664148019; Tue, 09 Apr 2024 05:02:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712664148; cv=pass; d=google.com; s=arc-20160816; b=wA8Jk+X0D/6OuGzGLtaHDnSWB5GDEqn3UcehR+W/EJBj8DiKFfULFhjbQeCARm0AUA khG8x0fauE4EQ1YpM0F+EmgGcyVzpJJ/mu6QVAS4qs3OxM3aCRp4nTmeHNqPF2AyjMdD qNwt/JeeAqyegf0sEXHC1a+8rZN/okO0BZqK5YT12X05ZMBevR9wCzE96u1/hf14da/8 FoX8U4kDT+/SDNGmn+KInNqT95+1EzTh62ptpIuGSlA8CILU9k+W/p0RXiC6A64Qzvsf D3tpGbUg+dKKUJh1kOc7VX11UdnFYE/cKO8AAwi15MBi8ZS6iQmK7jAGqsAYPQzExGM5 M2sQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=n8CPzCjtmaA92Pjr2D8kch8Uxh/4ESB2woXjNjruOg8=; fh=sTusqoPrZaeAaYxqYYvY6Bys5Mcwl2pehf/80ocwmBU=; b=OaEctLqh3eex8+L4vXlJphm1Ch15/01rsvPaSFwj+MWMQ1IfrD6I5RRB0xzFe9EsyD yfolV5b4H+IozmJAIh4X/rAyqSwE4IGU0CxzvV+1TKyL/1fGsnucvSpKdn+VSQlpJRJ1 lgQAXSovIXpKhsVHuU3duA4NW7Q7iQ5PPXKFvB6S12srW+2ljm/rl40rNkVLpibTjC3e BLeA8EhWiRFt/y/xdB6bO8KNDl6Tdhe2xCfmmWN/YGSio0ge3YKdYE9pGOmPtO6bjLIC NLNyBI8f7zV9cdlxm0Q9nF1mYOVOlk242XXaheTISPcx2rZuO50hST/33aglkAZqVdeN wVwg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=SHru1cAr; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-136827-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136827-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f18-20020a0564021e9200b0056e69cc8320si1323101edf.175.2024.04.09.05.02.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 05:02:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136827-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=SHru1cAr; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-136827-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136827-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 96ED11F24A90 for ; Tue, 9 Apr 2024 12:02:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5A41512AAF0; Tue, 9 Apr 2024 12:02:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="SHru1cAr" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D622586651; Tue, 9 Apr 2024 12:02:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712664139; cv=none; b=i07vILc588raZh7nHHqUv/Zzv29XReyKlgkD8n57Shh9YbQJuXHPk8WZMeXjgBdEURHOOrywYPPNrM5jynqZXGtB6+UJzvL+kY+ObWOUfZsD3v8MGMeavgn1qorZ+zvdX0OYQZjiu/41ZBgCNqWQ8w7eAB7wugLBFHGalYW6avs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712664139; c=relaxed/simple; bh=A30b6H9AYPzyaHHgfAGSsr5txXIHLXEVbKj6/zaklYc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GwDguFc2QhIqYuDviFoH41ZqLv0zbH2nqMlft0tYCTev9e5qBDBghYHhoNeb4MeIYWWCczCwZViFHm/IMWPPLAfPsEp2hXsfjVlnWx3duW/mkBR1gB75Nl/S75VDzVZkkRowP/NcjSj+e+wkiGw69ZOJgdD+2eITtiPXysV7kD0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=SHru1cAr; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1712664135; bh=A30b6H9AYPzyaHHgfAGSsr5txXIHLXEVbKj6/zaklYc=; h=From:To:Cc:Subject:Date:From; b=SHru1cArVCnQ/zxM6iuhiD07AQRBK71kKFQqA8mrCyF2dmu1tdUkO8B0t3HtdtC0i /hiJ5xbxboJSb8lVgaEyLJWiBVcpWMFSPYAJzP5SjZ4spTDXNQc5zQUDa0yf3peFcV bbdGrXXjOz+XoqHkRN4YZzy22znr1do1v8kiMlNY9H2bVHhftjMk9zgXugo7lI8gJR EbYG7pJGFIwN0TbPDhviVBKf7J260VnV3KYVD98uQz0I+wRvnf8mJ8Gl3C0uSQM2+I 5GRR0TwZ0GS/2Up+tNz6dRixUCLxViBMMDczNHLrWB81xJuA2nTHrH2vkzzngAAC5o CviYSZt9rCuHQ== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 3DB1037820F5; Tue, 9 Apr 2024 12:02:14 +0000 (UTC) From: AngeloGioacchino Del Regno To: chunkuang.hu@kernel.org Cc: robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, shawn.sung@mediatek.com, yu-chang.lee@mediatek.com, ck.hu@mediatek.com, jitao.shi@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, wenst@chromium.org, kernel@collabora.com Subject: [PATCH v2 0/3] drm/mediatek: Add support for OF graphs Date: Tue, 9 Apr 2024 14:02:08 +0200 Message-ID: <20240409120211.321153-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Changes in v2: - Fixed wrong `required` block indentation in commit [2/3] The display IPs in MediaTek SoCs are *VERY* flexible and those support being interconnected with different instances of DDP IPs (for example, merge0 or merge1) and/or with different DDP IPs (for example, rdma can be connected with either color, dpi, dsi, merge, etc), forming a full Display Data Path that ends with an actual display. This series was born because of an issue that I've found while enabling support for MT8195/MT8395 boards with DSI output as main display: the current mtk_drm_route variations would not work as currently, the driver hardcodes a display path for Chromebooks, which have a DisplayPort panel with DSC support, instead of a DSI panel without DSC support. There are other reasons for which I wrote this series, and I find that hardcoding those paths - when a HW path is clearly board-specific - is highly suboptimal. Also, let's not forget about keeping this driver from becoming a huge list of paths for each combination of SoC->board->disp and... this and that. For more information, please look at the commit description for each of the commits included in this series. Please don't mind about the missing OVL_ADAPTOR support for OF graphs in this series: that needs a bit more thinking and a bit more work, and will come in a second series that will go on top of this a bit later, as the OF graph support for *at least* the primary display is essential *right now* to enable support for the MT8195/8395 EVK, Kontron SoM, Radxa NIO-12L and all of the other non-Chromebook boards to co-exist with Chromebooks. Besides, this is also a valid option for MT8188 Chromebooks which might have different DSI-or-eDP displays depending on the model (as far as I can see from the mtk_drm_route attempt for this SoC that is already present in this driver). This series was tested on MT8195 Cherry Tomato and on MT8395 Radxa NIO-12L with both hardcoded paths, OF graph support and partially hardcoded paths (meaning main display through OF graph and external display hardcoded, because of OVL_ADAPTOR). AngeloGioacchino Del Regno (3): dt-bindings: display: mediatek: Add OF graph support for board path dt-bindings: arm: mediatek: mmsys: Add OF graph support for board path drm/mediatek: Implement OF graphs support for display paths .../bindings/arm/mediatek/mediatek,mmsys.yaml | 23 ++ .../display/mediatek/mediatek,aal.yaml | 40 +++ .../display/mediatek/mediatek,ccorr.yaml | 21 ++ .../display/mediatek/mediatek,color.yaml | 22 ++ .../display/mediatek/mediatek,dither.yaml | 22 ++ .../display/mediatek/mediatek,dpi.yaml | 25 +- .../display/mediatek/mediatek,dsc.yaml | 24 ++ .../display/mediatek/mediatek,dsi.yaml | 27 +- .../display/mediatek/mediatek,ethdr.yaml | 22 ++ .../display/mediatek/mediatek,gamma.yaml | 19 ++ .../display/mediatek/mediatek,merge.yaml | 23 ++ .../display/mediatek/mediatek,od.yaml | 22 ++ .../display/mediatek/mediatek,ovl-2l.yaml | 22 ++ .../display/mediatek/mediatek,ovl.yaml | 22 ++ .../display/mediatek/mediatek,postmask.yaml | 21 ++ .../display/mediatek/mediatek,rdma.yaml | 22 ++ .../display/mediatek/mediatek,ufoe.yaml | 21 ++ drivers/gpu/drm/mediatek/mtk_dpi.c | 16 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 255 ++++++++++++++++-- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 2 +- drivers/gpu/drm/mediatek/mtk_dsi.c | 10 +- 21 files changed, 645 insertions(+), 36 deletions(-) -- 2.44.0