Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp131842lqo; Thu, 16 May 2024 01:11:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUHL0tBCjD4V1keHqqTen5Cgsq2+oHdJsVzoC3cz+Az0VDKdfH/Tl3xBpMmmBdu/KWdchgMjWGQPnRr7yChmJ/C/ncxSbT/ZFNq3oQaKA== X-Google-Smtp-Source: AGHT+IHkbC528jBO05Cr7RPt/Q/Dkz50RBFMILrSTU7Tn6Vp807nBZzoUmmUOlwiXHrQlj0Clm/3 X-Received: by 2002:a17:902:c945:b0:1eb:7746:4246 with SMTP id d9443c01a7336-1ef43d0ad8bmr232643595ad.11.1715847083178; Thu, 16 May 2024 01:11:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715847083; cv=pass; d=google.com; s=arc-20160816; b=GOUXEcyMWNaatkshTxuM7cJTh+OvF7L0CAk0lc/7dVQCKsbOH3G8Mgh2k99IK4MiCt 4GI/aaeuuSlw7ym1h2UiT/N/KWCWfOvxhCbwDNF4hrubzSGBi24wKKD6UHlEBTFP90gQ yzwILBMBXeMgzESy5UGdfmLe+On3Z3aqRrRiZO2aiFfmkUu6Ejxo+3kA/INq8h1wpqW3 2JS12QpWquBPkfhO8lApOao/B89gPFyQfKTmwTytUTSskH1dQUDfQYvB/Y+04GqlXgLC L+O3tbbYxp0e+Xg7rc6FQncXx1ZuCCld3Y4RzF/RMoKUmrIk6PSWeLVr17de9PLjDUV+ 1aSw== 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=QPP39n1v5B8BltAwi8lQmVBsOcAentG3D+iwS26z41c=; fh=sTusqoPrZaeAaYxqYYvY6Bys5Mcwl2pehf/80ocwmBU=; b=ddn+wTTQ4/jv5qfFRxoH5lGegPGOfEQ4jk1X0oLecPdYLKGHLyCROkd8mySXwukIUT 0e9T6FkaBdq84xpH3einDoH9beBMsqUx/N+h/1/C/05K5Igfb+mYHSXF3IsrQ4KmkL3a IWhjAcGe4YJWjUq1JFj/IZ/5c+MXu/UJf0hGRILBz72m1oGXARa/NTmqdCdgeRZ0SC5l Bg6/u3vSfIKVE+U+OmgqmC4G/ZkvZVxLGknw2aeFwb0gamwdEupg6KL8UMV1OHQY678J wi150DM17RoyTvC85Vfc65VU7K4e7kbmsDUKwERH5/1le2fU5YAUFxgZxJz94Uh39I/5 +tqA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LWVj75uJ; 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-180742-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180742-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0bf31781si6947865ad.256.2024.05.16.01.11.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 01:11:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180742-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LWVj75uJ; 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-180742-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180742-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id BAA5E282249 for ; Thu, 16 May 2024 08:11:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B10786D1AF; Thu, 16 May 2024 08:11:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="LWVj75uJ" 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 33C914501A; Thu, 16 May 2024 08:11:10 +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=1715847072; cv=none; b=QtCHAwxdvVG3EmfPFmw8rCfT/qDdilyVurqiPIEbrLui/tjun9Uz9+STo3Us5HdjhIglWgYsPfp5KlIcl/p3XXIwhUgd0IDkdfykxQAiOqEeW/fok4IMYopBDYBllo+4iJkJ5FBVxHi2F8C7hBCmHdDoSrSY+ZsPb2nMDNWj08I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715847072; c=relaxed/simple; bh=2KpJTOdMtK9vPQlZxebGXdeKAtDJX7u+VW8Rjw+vE14=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=apsoBbxXKeJUD623VPtiDLliyTITF3pXMY1pWQnDpCy7FdA0D0SGkdxceui+A/i1qvHe7cq+3b6N5NbWy0RfY+MlBfVvSs0B825fnMUkJYfvaru3TgkvX+Sijw/Kx/mN0kP63e9twftxvdLIsxxA2ofC8MdGzICo6USub0VIgHk= 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=LWVj75uJ; 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=1715847069; bh=2KpJTOdMtK9vPQlZxebGXdeKAtDJX7u+VW8Rjw+vE14=; h=From:To:Cc:Subject:Date:From; b=LWVj75uJcjn2ZJ9XxzYay47ihvkwCSCw8aN8jl+vc/88FXN/aV9JK882ZMLXjm7Nd gRRSG4KoAfn6y7qsQuaV9rfufqBoym8hc3eqVYA5rl16SbQWuGAotZmYcjDyEHfrAo y0skSpFs37I60M6QaoP8EmK5xnRKOyDf2ivEVDM9x468porMrt64JzPaUSp9uB94F8 /ofzbhLknFeEennfU3l/Pf+Yxt5ylZ0KoA4m9zQ8/IuQNF2jiyPg5zhenFPjmGf+90 Cq7OtfYEV5nBTv8mJzVnVk2zuwzSsH3KxSSHUXgzx7yKerUkuH8MgGIGCIIHBuB/hq 3WpeugnlxRGxA== 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 D2CD137821A4; Thu, 16 May 2024 08:11:07 +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 v4 0/3] drm/mediatek: Add support for OF graphs Date: Thu, 16 May 2024 10:11:01 +0200 Message-ID: <20240516081104.83458-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.45.1 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 v4: - Fixed a typo that caused pure OF graphs pipelines multiple concurrent outputs to not get correctly parsed (port->id); - Added OVL_ADAPTOR support for OF graph specified pipelines; - Now tested with fully OF Graph specified pipelines on MT8195 Chromebooks and MT8395 boards; - Rebased on next-20240516 Changes in v3: - Rebased on next-20240502 because of renames in mediatek-drm 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. This series is essential to enable support for the MT8195/MT8395 EVK, Kontron i1200, Radxa NIO-12L and, mainly, for non-Chromebook boards and Chromebooks to co-exist without conflicts. 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, and pure OF graph support including pipelines that require OVL_ADAPTOR support. 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 | 28 ++ .../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_disp_drv.h | 1 + .../gpu/drm/mediatek/mtk_disp_ovl_adaptor.c | 40 ++- drivers/gpu/drm/mediatek/mtk_dpi.c | 16 +- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 282 ++++++++++++++++-- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 2 +- drivers/gpu/drm/mediatek/mtk_dsi.c | 10 +- 23 files changed, 713 insertions(+), 41 deletions(-) -- 2.45.0