Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2922366lqo; Tue, 21 May 2024 00:57:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW9c2n3Mlf8GUJSVcg+Yhbr8b+oseLRtKo4J9BTqoOe9x2q1weQW/DwAZB2E8UWYfsEmgyeHCPyvnzlg06477moLtcW+EMHyOnQ08bR3g== X-Google-Smtp-Source: AGHT+IGd8HIuAXSenC3IRVymuFQt1m5i0omuMAx0pcnsxFEvaweigkQlxhRwiDajtzWlgrer1lq6 X-Received: by 2002:ac8:5a05:0:b0:439:c015:774d with SMTP id d75a77b69052e-43dfdb0a22dmr358914951cf.10.1716278274092; Tue, 21 May 2024 00:57:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716278274; cv=pass; d=google.com; s=arc-20160816; b=kTVScWUP5WIk2wfn3V4sb5FQ4ppYTQs8B3ORVLJwFsPafK1Ko50MC3U6gjNMOZO/e8 ifI0pJu177/hVt+RqDJSeoFZ3OnfAm/9bwDe0gGwAa4r6+z2Epl1B63JmKxiwd7fwm77 VbXtEWz6GXmn6cBXkyWaaxqMVypnSILTblQFYBB6v/TAi+scGdWmM/WHPoSZuCv4L9lh +JrDV7o73kzK1XpLlFotVgk7HVSX6EGAgevl8RSN1J2V6/X1pGAcG+Ni4wmSl/f6C3Ft b9Ng36+iLG3agRnWAXepNIAeku5OwwSngzXZz/WvYkk6SFLuzoFh/RhGTKAOdt9j+E50 Hmqw== 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=xEjW7ERx6PP34Et4K7YPZ1VqN3HIrdz/SsMJbFlSfdg=; fh=sTusqoPrZaeAaYxqYYvY6Bys5Mcwl2pehf/80ocwmBU=; b=FirKwrkF7nacRXbSIj0AA/SniM62pq04s4bH0V5efORsymoShzC/Q6rvkl8pPt595P QKbG6ds1SBbQh3Q7Uuxme2jGSThr8MZrejaN/Aii2LVmUffggb4kmFVmoMOlm8754uVX 8SfRd/2Im7B75IRfw76bD83w6MvenqW/PqwR6f+sZryxvuS8IZuaSBoaiKm2NuvCknRm 7MQ9p1vcijgmNMKTLTjmmtVZcZu0tPFobI2mWjpu715z+kJpGSOmPRU3EE+6QAr5E3i0 FeBRpiEAsHOCFZ7y4cqdLbkYKvsEiN/rr6ZZYXY5I8dn3SdgefO+/8duUCB2Iiw2jkX5 PebA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LBVIbCSt; 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-184601-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184601-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43e0ca65a3esi18683661cf.443.2024.05.21.00.57.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 00:57:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184601-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LBVIbCSt; 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-184601-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184601-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B90EE1C20D10 for ; Tue, 21 May 2024 07:57:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F78054BEB; Tue, 21 May 2024 07:57:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="LBVIbCSt" 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 B123251C5F; Tue, 21 May 2024 07:57:30 +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=1716278253; cv=none; b=XF6CY6R5uD+l70wFHNAFG8IBOpReze7mR/TUM8xL7bs/POJwEf7VI1rETNuqItDJA6p3UvWCMoNKqV8v7u2uJZqTLsBwqKP+6161BSAbMy5AQXyPFSVc6MtLmZkzx7jdCRyN6pGS0J/8+LJdB11vJa453Fanm7VY8wnGeXemPCU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716278253; c=relaxed/simple; bh=UV3oiJ3DoGjT3mmgDCUUEAq/37YTbI+I9dS8P5EBex8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Z4uuYKBK+3c57P7ZC5+o0UeaMOQi5PUr2kTrdlImVJNLpOAsBKje5y9f4qfu+i5bBrnvk18Ltd73Z2kWF/3CmjPkfSN50t7UpkZQRv252xSMDDvRgGacg00/W/XRW0vnsj00LLMtV7e3eR2Kj48B0CY3qEoepMZEmAA97uZKcfA= 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=LBVIbCSt; 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=1716278246; bh=UV3oiJ3DoGjT3mmgDCUUEAq/37YTbI+I9dS8P5EBex8=; h=From:To:Cc:Subject:Date:From; b=LBVIbCSt0+3R9yRCbYrXWF6yRFUlnx4X85vxJtP8yl1TPoN8WTZILOjYi+dVxE7gz v10LMJty1+pTxzcKGgKSxRTGmjpGqmwa/j+d7MH18X3vyTuWqDFHcZ5fDEJJjQK7Xy J8w67WaAxBwn1Nm7H8PNP3D2/b/FoSOrm/JUy3ohZ7jMWwEPQFeWcO0qGBZD2/DzuV B9rl3djGW0rfCcenZTpSkgUlq6K8Hu0BrYs8wLteg1WA1CMAcGPsBOCQdTa0mf3CPe iL3aHDTwIyEU5CJPPaa+FeezqVVHu5oF/Vyr0wXeSbGvp9Ly2FAk0afHLylcUkocmX BcLO6MI6EwpIg== 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 B1BC5378001E; Tue, 21 May 2024 07:57:24 +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 v5 0/3] drm/mediatek: Add support for OF graphs Date: Tue, 21 May 2024 09:57:14 +0200 Message-ID: <20240521075717.50330-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 v5: - Fixed commit [2/3], changed allOf -> anyOf to get the intended allowance in the binding 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.1