From patchwork Sun Jun 2 12:04:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682812 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 314C4C27C44 for ; Sun, 2 Jun 2024 12:05:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=62fmyXlhhB4g/OMyzCa/BYq6qTft7Z+r1drR0eOrH1I=; b=BxvwoxFwR8ubTC RQOrVGNMcUAFag3MsGClp3GYK8/FE/G1Q/2/yUhHz8l9zdTXix3EsuYC7aSCk5qITM+k0CzDDddqa lDdbRg/EmbKueD06Cv22k62H9V+Nw/w0N0mq+sv5I+kcTjrqkZIYNoGLWt3hgkrhnaH+wnkYy2IyW EbZRzpBSXIkFRJ0yNwBqivTruvpKLp+jWN4W0uAezukUwn/GcyEKIJmY3kY9hASAZCtvh09KBdBbG rm2xRxXeO6vFA5jPAO7pW1B+4dEJEUhQH7uS6ptyA8r5jsYSz7AwXFwtwhb77OrEXoXLd3OiL12jE 5gMXxTdYCAFMjhkuwIdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxE-0000000EBMx-2CHg; Sun, 02 Jun 2024 12:04:52 +0000 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxB-0000000EBLh-38jk for linux-arm-kernel@lists.infradead.org; Sun, 02 Jun 2024 12:04:51 +0000 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2eaad2c670aso1608861fa.1 for ; Sun, 02 Jun 2024 05:04:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329888; x=1717934688; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=pQWdjTwgnIdZS6takOhMDQQy8XjSBnwUC2ksC3WzZco=; b=jumH9A7G7HCj0cwEp9q9kbPFcGesapPs2iE0AFYV+Rq9J5LiCOyhVUdX44x6j5md11 Pwo7kdGq0erVt4yFpy0Jf6z61EpMebN6I76Rt1dY9JzXvarUe+xgf977jGwjkSa8Q9Rz p0ubfQkTm6HN8ld6N3l/2hU7M0xkI4rpmQQeqyGJCbEivQzsnpCVRpcgHmA6jTevujMO OCa4RNU4EsxawOWWCjFg241r17tURT9rw6s2OHyLpP4gPjr5s71W7FAgTo4qY+cx+W9r YBrSqXK/e7Ib3ogP46iZjlWeklL0ZdnkOIvq25Z5bnAYl9XC+9bZXXJ13JLjBUI0ot75 I7MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329888; x=1717934688; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pQWdjTwgnIdZS6takOhMDQQy8XjSBnwUC2ksC3WzZco=; b=qfIf5a5vF8BfVVVc/rgpgcCkoywBaRa7hav8wqUHJoXHNEjG0V6G8A601ZQ8aa/J4k ufzUkYeAKK0T870XtKln959VE2xMRsgrjPYvNEm3Al6joORsABcuYmgQ5xENeYLwfyLl mvR0+ZQiZ2RRR0P/UKPVSQBDhy9Kebi8YW5ojmSbUW1LL9Jy8l4AO26abrneaVRS6YRS +a+6c7wsk+gWf+BoPf/d05j3XPwSdep+mt4aIv5y2UhSQEONpBAEPK0XuMGaaVvHqJdD NjbeTuaexz3V/xBc6st2YSOUEd99LmsUn3dKfUsRkNi1oFMkDvSekNcMZog4emX+0Hco sZzQ== X-Forwarded-Encrypted: i=1; AJvYcCWSGRbQYd/qXb0kIB9o/sd/mCcFYHzYP/efe6APy6u3fFXnoHqR1zud++i/se1MDndAyEe2OYg8XnquMg0sdNZFugZOCVIdoA93uUd3zn80tLQtbeM= X-Gm-Message-State: AOJu0YwGviHOzepknX3TQoX+aqlC/KrZvUksacMmB43oqv3SKfiOSlkw MAOSPHyWcuqs2BZ1gzpsEuzaFNe/gpZglWJCzCc1Mf+6/FHZiYydK0/1/hWnui4= X-Google-Smtp-Source: AGHT+IGfozs4AwvcZe4Ex5alE8/DWJLLE0peGqkDlWeKv2/RBkKRrvdguJMijbWU1spsIZJp4mhVRw== X-Received: by 2002:ac2:4c86:0:b0:51f:696b:949a with SMTP id 2adb3069b0e04-52b896c7ae7mr4279067e87.48.1717329887841; Sun, 02 Jun 2024 05:04:47 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:47 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 02 Jun 2024 15:04:41 +0300 Subject: [PATCH v3 01/12] dt-bindings: display: fsl-imx-drm: drop edid property support MIME-Version: 1.0 Message-Id: <20240602-drm-imx-cleanup-v3-1-e549e2a43100@linaro.org> References: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> In-Reply-To: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1524; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=SFNXn1zh/yUH5lKBoXzlQkp+p1CQ7cqY5rYlPQmKP7Y=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQ1pM/J2vZz5Isk1dyi0v4TtXuFzuvoLEo4zOkvkbo396q dcI1ed2MhqzMDByMciKKbL4FLRMjdmUHPZhx9R6mEGsTCBTGLg4BWAiU1XZ/8rn3ldQjYy/vUz1 1W3lC1Uxdfwmr+15haMreA5z6us5d1/sl+cV/7F9nXztqmde39LbHA92W/Qtj45XWC+yqWq6cnm o6kz7LPszV7Zs+CexOdpE66wmb/XGx3kHI74KN8i9mXT1Q6KBwjwe7WePr7ulZ175o9++4pSA4/ XeGol1K6oq/Ccu+y+iqv//ntisVcpnG3LXJdpO+K5p6WibssF/v/r5d5xJhofe5laHLpvEbSs9/ cjR8tJ/P3kn64tv2c/IOPeMt+ExH+ZZneyquzqenwhae2POpquM56XPVp5n5eP+nqMczKm1UIFd ebftxBcS/UqXLzhWyVYne6S/jPXIdGhpeWhuFu1v9O8BAA== X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240602_050450_009710_03DF5594 X-CRM114-Status: GOOD ( 11.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org None of the in-kernel DT files ever used edid override with the fsl-imx-drm driver. In case the EDID needs to be specified manually, DRM core allows one to either override it via the debugfs or to load it via request_firmware by using DRM_LOAD_EDID_FIRMWARE. In all other cases EDID and/or modes are to be provided as a part of the panel driver. Drop the edid property from the fsl-imx-drm bindings. Acked-by: Rob Herring Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt b/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt index 3c35338a2867..269b1ae2fca9 100644 --- a/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt @@ -119,7 +119,6 @@ Optional properties: - interface-pix-fmt: How this display is connected to the display interface. Currently supported types: "rgb24", "rgb565", "bgr666" and "lvds666". -- edid: verbatim EDID data block describing attached display. - ddc: phandle describing the i2c bus handling the display data channel - port@[0-1]: Port nodes with endpoint definitions as defined in @@ -131,7 +130,6 @@ example: disp0 { compatible = "fsl,imx-parallel-display"; - edid = [edid-data]; interface-pix-fmt = "rgb24"; port@0 { From patchwork Sun Jun 2 12:04:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682806 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A9F42C25B74 for ; Sun, 2 Jun 2024 12:05:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rF1CiT/XF1L7ck45Kgfa/2a8fA6Zj4elibB3WUJCJYo=; b=xw1o7mv3XBvyfp 6vPC4DDY2zoTHbeImzwXKM//b2t0ojhGtEGo24x9XTJzMR9JDoAHYrHMbDYdl/cAxBxK+UJrPzqkf 0w9BSCJi2GIMDsy1h34WG8diOFNtT9DJ/1PNybFrAy9pybBovVgk7OPU/b6OHUJPEmwWV82iqQ4rQ DICAuwGezEwcu3H5UZExmie8SjRLH3D8u/Ttq9uNWHxGMmgzBeVvk5sIqRjZy4kHWM00Tu7B553XU BMhDZifQ4WkE7iVxEUth1K0njWcvI4yXOR86UO4BcwTmZqe8/cq1CrRvo0Ca1mqztgypYVPAOV690 9g6EXe5zQ1yvqNeM0ZZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxH-0000000EBOa-3CzT; Sun, 02 Jun 2024 12:04:55 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxD-0000000EBLm-1Sky for linux-arm-kernel@lists.infradead.org; Sun, 02 Jun 2024 12:04:52 +0000 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-52b88335dd7so2857202e87.1 for ; Sun, 02 Jun 2024 05:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329888; x=1717934688; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=BGWVh/Zr3LGFqNC/PDJ+t+m+rq2p7BOWG0ebyvpQons=; b=kZptOz/BEQnKVD5FkdZB7QhNzLvi3haovaEjI5HkynGP9aV3lTy3lX+SArg341Wy4z r0IKzkS4l4gu/e6RtusLuLnzd51IvYvel9MwM/tTncMACAUJA17qdEKJPOrOjv1+6FVX Vm0zd02Mo5G+esWKPWJWZzuzMhRgI2/nJUnAN7sH4koUj6CenFUZEykDFwV3y1GKGP8N CxokdGi8Y9Ncu6JN9AOnVNXePowyv4bGtw7OUMRBNAkxk66GhrP+qFbPA2cJz/2X0Ybu QA2ylQzF8SAZ59L/cTpD2ZE9CZf3UgEYU2oeR3pKYWG0tvA01vlV0bDXxWy8losinFgE Rr4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329888; x=1717934688; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BGWVh/Zr3LGFqNC/PDJ+t+m+rq2p7BOWG0ebyvpQons=; b=Y8gDK+3QH6PUESTMm4adIVI5+tMMZ3iFpEd/Pcu4O+ZRoXxqZXPq1h019OnEgd7rbE srI+gGxdzlm9icQngpkPfKvWnVGiUa0palcDb8NGrpPWk5jtu//2OsZGk/J0c3L+WMjG SZTPJgKHs5aVlGsAEJLnXPdGHENn8Mc3xRDA9CLY6K4Fcg5E73Zd/bUM5bjlNzGAwz8l o5eMhTSvLq23blUB/vkGc0BX/v/vZnr29omJZQBex42pyJhpx5rCrEb0TTYMem/akqKO CF6pOeITSUXn2WsxabMEYpp7u5onuROZi2yr9sfvXlSXLlh+p4lecL3G/00KGzSjYdWI kXnQ== X-Forwarded-Encrypted: i=1; AJvYcCVmUg8tCdNVKFG+Z6XsUcQPZ7KdmXcLW0SLBkzeBBDmK5xXucb/7PNHQgm+KuuLjcGBcKhXP/HSAy3X4aJjd1fJDIWEJsLSJ2J05qTcFULs5cP2xUE= X-Gm-Message-State: AOJu0YyJwwN0Va4vd+vGu8zd/8UfsaPlbuJDruP2zZzm9HjIdbgQtM+L x1J63yK9yX7mMMAWTrnZWJj4arSWoiuarBGv2PUTQIOj9Mzpzbu1rNoam/KhJb4= X-Google-Smtp-Source: AGHT+IFioojHdR8Li3FtAUmWNxJNZSvKgoMY/dETwt1uCPkRs8JMSzzF/VAu/d9Aejv8BYFZwW5OPw== X-Received: by 2002:ac2:4e94:0:b0:52b:7f00:5695 with SMTP id 2adb3069b0e04-52b896d26a1mr3567965e87.59.1717329888558; Sun, 02 Jun 2024 05:04:48 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:48 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 02 Jun 2024 15:04:42 +0300 Subject: [PATCH v3 02/12] dt-bindings: display: imx/ldb: drop ddc-i2c-bus property MIME-Version: 1.0 Message-Id: <20240602-drm-imx-cleanup-v3-2-e549e2a43100@linaro.org> References: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> In-Reply-To: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1144; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=3Nz5IHmPVWRwHFsw4a2c0uKZtmM9s7xJPi4nSL2SZJE=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmXF/cS9DynlRGL/q+FhwSBFBcGFVl4UCT9geOY UOhOg3+BfuJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZlxf3AAKCRCLPIo+Aiko 1dStB/9ur7o0ZT1BGSJZP85LBwNFyha0XzFbawRG0NkoKwEt/qs9Ss23XuP64+H0Cgyv/lVZjih EIYQvrftDLxdSueWB7OoHv+r853IRqJFX5s/L3FwrhUoWR4NxzSmt+dwf5i/uyMTsq00ulQE5cn bZEqh0UlBGShgZQEb8KmODQEGST0F5Y1hIct+TfuXs13DQYdkp02ie1uKCpXSeBRPqWG27zz+K4 +1/03y1P7Nh61Dh/a0EX9L9v4YVhfWy/URMe2TNrE2Lt9GPP9AZjKCGZc6sPeAnsig6dVr6e1bd LvZnaiOQHvUe+FMP8pELJ2COAaNjL9n+YQrHqNflOdiRBK+b X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240602_050451_425771_29B0F2F4 X-CRM114-Status: GOOD ( 11.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The in-kernel DT files do not use ddc-i2c-bus property with the iMX LVDS Display Bridge. If in future a need arises to support such usecase, the panel-simple should be used, which is able to handle the DDC bus. Acked-by: Rob Herring Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/display/imx/ldb.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/imx/ldb.txt b/Documentation/devicetree/bindings/display/imx/ldb.txt index 8e6e7d797943..03653a291b54 100644 --- a/Documentation/devicetree/bindings/display/imx/ldb.txt +++ b/Documentation/devicetree/bindings/display/imx/ldb.txt @@ -62,7 +62,6 @@ Required properties: display-timings are used instead. Optional properties (required if display-timings are used): - - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing - display-timings : A node that describes the display timings as defined in Documentation/devicetree/bindings/display/panel/display-timing.txt. - fsl,data-mapping : should be "spwg" or "jeida" From patchwork Sun Jun 2 12:04:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682810 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 327BDC27C44 for ; Sun, 2 Jun 2024 12:05:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bLHNpIdLegnwgKgSOyd42wTOH3ruEmqN60P1/uPgFDM=; b=exnk9Yhd8VVf4j j9jQWdAFTK1q7NBCChWd/uTe57Kv59YRlG8tMowFGY36fBMVVj4fsLLawFKaIWw6o/35Z1M0zXrkC c6CgMbSggY0KFjDQJHH7OG6E8Ya2HtZ4fTN3hA8uHQ3ck92rxKhWRSOpNChFxCeE04NvVqWc0MsJx gKGu0xhwibNLXPlYZK4z2Cal+awGy56yrVarJQ41AOgbYkBUi7zA7I1zt/HahSVMXH1HH/FNLJKvT gzkyFoVXueYZkk/O36r9QXObPVSzT6VeMrG5xCvyQvdPgEDvAdLy/Gv0WRAHr7kkOX1dr9NZWSqKu zqtq7vtGgwp0FoH2iKTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxI-0000000EBPL-31Dz; Sun, 02 Jun 2024 12:04:56 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxE-0000000EBLt-0vzg for linux-arm-kernel@lists.infradead.org; Sun, 02 Jun 2024 12:04:53 +0000 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-52b7e693b8aso2831558e87.1 for ; Sun, 02 Jun 2024 05:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329889; x=1717934689; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=nxc4vHH87Y1eSO87AR835I7/5WLCpgJXyFLj/BGpZY0=; b=SfRVutst4BFezohgvIjKeEKlboV6u2Q7DxeCSFkWbD3YTOKiKlQpsh8Haml6HMK0I0 Y0gez0kVYs8P7/3SXOIv5isinC3zdMqf/JZO8LyccHFB3ckDqtczEvmhZwO3Nss2yQWl WaI3hkgaa7E9J4g9PTDrEn7fcImpmdGNKhlHUUzR2Nno6Yw76AWqbUvfI2S6oH//vKfK FIBgST85FK6IhbLXlylirehnBxVboEPtWRitRfFT5WVotozpLUaPDPfy7UrpU9gnqz9q OuAReeCL4nLe7qEBekheTnxwFWOh9564sRVFgkJu57a6i/IJerpkAO6+M9sx5eUetlnK ywbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329889; x=1717934689; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nxc4vHH87Y1eSO87AR835I7/5WLCpgJXyFLj/BGpZY0=; b=jLCh5Qem0HhCOzfyOShkpkKudNIuCgb0cZroLW1ppDoNIcspVLNbZUH9nfQOETh+RF 33BvZsyelMZGvbQRD74G5eCUf+e/Tab0TaQac8h35ElweV7PdLtbLu5+MvwvdrxR7X7y TUJ/Fk1wbW9tPDuxhThJgCMMEjSIl23VPlMkpnXX1PuQemLlEBPjYnMhrJJh+GJD+jMr HCv4Bmh91yQGIS7C45E4DSsQb3gtCis/Y58hGzJRG38QSm4hy1u1hqSlbwNmg83gTY5k NzCF0uOlAvXJFtagdorrnHgE7Dxy/NhFWUMd6PZoeSPmj2HaLFvHbQloqRQNiYbgO5t5 V+bg== X-Forwarded-Encrypted: i=1; AJvYcCWnegAjdBZxU0C6rsjCZe3AV/skH5hKd7Pe3vyINKKTt3tefEgv+qbatWzdht5k5nizjj4+9SN2FHbFbK/8Iaiibx+gxAuFES/9SUamvDHDBGI8HAc= X-Gm-Message-State: AOJu0YwQ72AjD4JuiXP6FZ0RuBWuugfPQ5iIT+m5CkYlvjONrKgODtXW Pe/+k7BXZvB7YqddK1q+lAojUEgOzq6wG7h42bxAxW3Ts2t9hRylGzxI1w/yJxM= X-Google-Smtp-Source: AGHT+IFPOiv0yb9NenXs61eeyl+FTzUia9VO7YGHEV3B4cyF+m7yIyCA+pulo20IEMCgPXGBKi/V/A== X-Received: by 2002:a05:6512:3d20:b0:52b:963d:277c with SMTP id 2adb3069b0e04-52b963d2864mr477027e87.33.1717329889449; Sun, 02 Jun 2024 05:04:49 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:48 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 02 Jun 2024 15:04:43 +0300 Subject: [PATCH v3 03/12] drm/imx: cleanup the imx-drm header MIME-Version: 1.0 Message-Id: <20240602-drm-imx-cleanup-v3-3-e549e2a43100@linaro.org> References: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> In-Reply-To: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1410; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=ZDw9je94QoyosO0168STtseYxQQ179pVpV6GiETvE+4=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmXF/c9m9P02PzAYv+Hvngg0pK/UDBTwhhmG1zr 6YIzCrb9vGJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZlxf3AAKCRCLPIo+Aiko 1fjzCACVJAOnM38OBMjesvSYWvhCttUEqRnqa1cwq4nlLesJDTMZ2OUTNhRtlYVXOyjfQdPCZoY sFg6k3yFt2WWYJBGVbYAc3fuchDTgb0HEb98vxj41NM9rI7BNJSWHJlLr6XS7RGIK7LtSQ9vpcj ESAFP3iCtlpbs+a0als6qX4eWKJZOLwj8uq1Lt4aQSHCSo9e4RyTzhFKMcp9PsbQWyhhWQLek1u ABZyZLlg4UbyRcy0FlQAFgPnpEw6Y5h4FovYheyJU3SjH1hxE5Ve5sHgaXMJ8/nqFD0scxw+dML s3IqxYlKtclaMDhG8+vC5UlutqEjdAQVKc/YRM0Y6WMrzg/l X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240602_050452_295518_388568DD X-CRM114-Status: UNSURE ( 8.81 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Drop unused defines and obsolete prototypes from the imx-drm.h header. Reviewed-by: Philipp Zabel Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/imx/ipuv3/imx-drm.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/imx-drm.h b/drivers/gpu/drm/imx/ipuv3/imx-drm.h index e721bebda2bd..e01f026047de 100644 --- a/drivers/gpu/drm/imx/ipuv3/imx-drm.h +++ b/drivers/gpu/drm/imx/ipuv3/imx-drm.h @@ -3,14 +3,9 @@ #define _IMX_DRM_H_ struct device_node; -struct drm_crtc; struct drm_connector; struct drm_device; -struct drm_display_mode; struct drm_encoder; -struct drm_framebuffer; -struct drm_plane; -struct platform_device; struct imx_crtc_state { struct drm_crtc_state base; @@ -24,16 +19,9 @@ static inline struct imx_crtc_state *to_imx_crtc_state(struct drm_crtc_state *s) { return container_of(s, struct imx_crtc_state, base); } -int imx_drm_init_drm(struct platform_device *pdev, - int preferred_bpp); -int imx_drm_exit_drm(void); extern struct platform_driver ipu_drm_driver; -void imx_drm_mode_config_init(struct drm_device *drm); - -struct drm_gem_dma_object *imx_drm_fb_get_obj(struct drm_framebuffer *fb); - int imx_drm_encoder_parse_of(struct drm_device *drm, struct drm_encoder *encoder, struct device_node *np); From patchwork Sun Jun 2 12:04:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682807 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 81D74C27C53 for ; Sun, 2 Jun 2024 12:05:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=k6R94972TaPoFcUPjeGL8LJH7VLlxg1u7cqNpvQr0XU=; b=HhbNpsRizzQZPm 9NvW4fs2wKJnmIThHglbGCAEfk9XWwNpUdna4C3m1RgnHJxF3MxpVX8XOfvozjM8ZHmtKFyKS09fG Bhk441U0M50y+8OduzxPuMeVIzK3S+YmG5Qg4D6Y0cdcS+txI2s1MzK/kI73Dak5I1GdTVp0iPJE+ TRtAV+P19ia0I0IHQWXUMgl2fvVGXU5zR4P8VO7LqKBtfDAa4ZAgIWejkzo8nN3oF+Xlcl1HGKAJV qRA5o+TMbpOCXUGqGKayCKCOBRh4dJYjvvm5dP129/AIF/IdZZxNAZJFRi8UoBs10lUDamOqX+3B6 KzJZ4PLVyIRAcIcrTI/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxK-0000000EBQd-0amm; Sun, 02 Jun 2024 12:04:58 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxF-0000000EBMJ-0EfT for linux-arm-kernel@lists.infradead.org; Sun, 02 Jun 2024 12:04:54 +0000 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-52b938587a4so822664e87.1 for ; Sun, 02 Jun 2024 05:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329890; x=1717934690; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=qCmMEV20sJhl6q9JP4BtOvE1ThwKifoA/eb2lcmOX/k=; b=TQzhoztEHLvN21lsn/8GnLLZuQR7h67VCxsxaYA9QPcBC/XJowDimsQhM8FlmyV2/h uMmgPQPWxhKkONX4S9X9uLuvyqm0FlIMHtNcjBGarfl8tm8nIqtd245MYSQOcPV9jFkm zhDI91GKcI1F7ePPjU1mVpXBuXMzdNWqNO/kAx1bejRe+g2lkqJ9xTm6KtP1S/mUT4VL ZocnZYPA8IaBOgiKF0dXLc3qMhqOrmJXlfwwp6Sr6T4JCKumzUWpq+11qAjk5A1SV9W7 qzc79QEPkl+3OS/evnvSaDz0lVWV1+aCPp08yPPn6ZmYxv5eiTDw1aT1nBmbwMeTQpOD jo+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329890; x=1717934690; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qCmMEV20sJhl6q9JP4BtOvE1ThwKifoA/eb2lcmOX/k=; b=Dketg7Gkk26eFIEweX73FZaJF1Wv7tsXNWAiMvSgvgNgml3/gR4y71MeX/YvfJLzZL EIIzq/ISkfz+WyG2s5rXCojH+ajnBAodevlfOwVCoPWGtVOY5d4tME5w0fURoT4uSe75 1IEwN4MCwNvccVahrFwiAUXnP3PGlFajNyBofuAhTBhiCgYjXm7NZlnCOqSbI5WnF/rB UkOU7tvUp4a+fNEL//zMH3C7TZLenx31KAqMzrc8EZsByw0e5P+H9VzxZKzKtWhoOUYg lsqIUIqhrcdvSgjXpZdo828TXgkgDIqyApCpzBU1kXGF7kzyXQuSuSmO+du1yzM9WX09 xGbQ== X-Forwarded-Encrypted: i=1; AJvYcCXnxfkXikdcgDmTb0m/gkzCtPHGjtp3JLESoxUs9s5Haapk4o8UqILHR4UiUh6IKWTG5pbIjugwY9rJY1i4RdAgSKArQi+6qDqb1hT/FLPGkfozAQo= X-Gm-Message-State: AOJu0Yz1/4+gV0y6319TSFFViex3vr0AhZSijEb99cz9bhcb1IfR9o3K AfvE5muNNhyxlh91Pg44sbbKugdGJXaL9PNcQJRq5UoXIkgaDPXKvXJ12vsG9xQ= X-Google-Smtp-Source: AGHT+IGCiCd1TG61yPuHP2aBTp9MSL5cxIMjf2EW/NA9zU4V8f7CT49VmAhc+8/OK+n9wpRK9ETuPg== X-Received: by 2002:ac2:58ed:0:b0:51c:c1a3:a4f9 with SMTP id 2adb3069b0e04-52b896d8790mr3599090e87.64.1717329890158; Sun, 02 Jun 2024 05:04:50 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:49 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 02 Jun 2024 15:04:44 +0300 Subject: [PATCH v3 04/12] drm/imx: parallel-display: drop edid override support MIME-Version: 1.0 Message-Id: <20240602-drm-imx-cleanup-v3-4-e549e2a43100@linaro.org> References: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> In-Reply-To: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2329; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=p3R84UdnZzJNiooJHROp8P8TIKNW8VASKGnwF+31z+M=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmXF/cNOEQ83ng70X09QmeKaF0NL8z0h92yMj9M 305afztkWaJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZlxf3AAKCRCLPIo+Aiko 1XexCACDSDdz/1zzBjj/fpPm9P74sgM1RPvq3rFuMSGAAgAMTldnUNhsH2r3LcogCivWWmXLeQF FqDenyVNvckt6NZDDg6cToyVSWnoY0/ZPbdNrI7al6UeND2y/snsiBo+L3ozuiDfoDdPm9ntfyI kBjy+bvMhGTmH9M5MvVwx9D5yk3XRVD6h2WP7dYTK0WpupSnRdq1EMF9Tl4jmYZY5LxwM41oc0h xvy5dVsY3tkCZI0dutTeNAPMJ5H4I6LVRLSiqOob7HGMrppHtwBbxjKtIro4Lqr1zr3Co29GKT4 Kx6xBvRoI1UOucJZYh4Ditfs6oa2OpLJk1rEb2MW/QQnLOZQ X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240602_050453_141914_02874D28 X-CRM114-Status: GOOD ( 14.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org None of the in-kernel DT files ever used edid override with the fsl-imx-drm driver. In case the EDID needs to be specified manually, DRM core allows one to either override it via the debugfs or to load it via request_firmware by using DRM_LOAD_EDID_FIRMWARE. In all other cases EDID and/or modes are to be provided as a part of the panel driver. Drop support for the edid property. Reviewed-by: Philipp Zabel Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/imx/ipuv3/parallel-display.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/parallel-display.c b/drivers/gpu/drm/imx/ipuv3/parallel-display.c index 55dedd73f528..4d17fb96e77c 100644 --- a/drivers/gpu/drm/imx/ipuv3/parallel-display.c +++ b/drivers/gpu/drm/imx/ipuv3/parallel-display.c @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -34,7 +33,6 @@ struct imx_parallel_display_encoder { struct imx_parallel_display { struct device *dev; - void *edid; u32 bus_format; u32 bus_flags; struct drm_display_mode mode; @@ -62,11 +60,6 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector) if (num_modes > 0) return num_modes; - if (imxpd->edid) { - drm_connector_update_edid_property(connector, imxpd->edid); - num_modes = drm_add_edid_modes(connector, imxpd->edid); - } - if (np) { struct drm_display_mode *mode = drm_mode_create(connector->dev); int ret; @@ -312,9 +305,7 @@ static int imx_pd_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; - const u8 *edidp; struct imx_parallel_display *imxpd; - int edid_len; int ret; u32 bus_format = 0; const char *fmt; @@ -329,10 +320,6 @@ static int imx_pd_probe(struct platform_device *pdev) if (ret && ret != -ENODEV) return ret; - edidp = of_get_property(np, "edid", &edid_len); - if (edidp) - imxpd->edid = devm_kmemdup(dev, edidp, edid_len, GFP_KERNEL); - ret = of_property_read_string(np, "interface-pix-fmt", &fmt); if (!ret) { if (!strcmp(fmt, "rgb24")) From patchwork Sun Jun 2 12:04:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682808 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4BAB3C27C4F for ; Sun, 2 Jun 2024 12:05:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/8wdhCGldKZ560hJikZaN0An5yOc9OlN7nAP1RPTo08=; b=IW3t88wwMAO5WU vahqyBV4IWnLp9c8E8C7v5srXKwTZQd/BKo8cQOZaw5jU7PAcFQxhHaSza3GhTwQMLfUrNNwhtRNa dqkElmY8cWd5TzILq+2hx5WnqgeKU+tdN0m5MC9bcvEEqeZYfbGJKT1zS+l2hyaS5vhE/kwwfVxLc Gt0YHj+CkgEzIwchEHzCiI8dIfHq7salRyRzHAog5xiQxtMrELJRO4FjGF9RDJIZZCZUpHPFcnil6 Db0WP6V8UNgZr/sg8BE495Yeu/aiJmACAuBFAyde/9l+xmv0BNTngIX3V5y3O6R44smSdQ0cYkk7W Z7ApSil/YHgEmkGz5vog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxN-0000000EBTg-35xh; Sun, 02 Jun 2024 12:05:01 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxF-0000000EBMR-2WbJ for linux-arm-kernel@lists.infradead.org; Sun, 02 Jun 2024 12:04:55 +0000 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-52b93370ad0so1210154e87.2 for ; Sun, 02 Jun 2024 05:04:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329891; x=1717934691; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ahx0B7IRhOU2KryLmin5A3x+RBjSRe40YtgpLFgn8h8=; b=hVtLueDN7YgOekBS3LkgUsoxNdGJSjq6GT8OG64YnVWTinS46rbUEb+ag3KCgyhewg c9TTjz/HayDc/sEbSpkXixq6ZW3qD3fziJiUegHhLezAk/i/RsQ7Kgn1A+t8gxr2nE6A H79OIPVibnluMbkK0RhhtZiR7hJwfcpvJEJ5bfOhUVuIrQMtIa/eFD8QWvpT1m/usM4J sU8sJO34bXsE2z1PU05EpZSLUXHicXpAq1fua3reR/l9qfNSIw62xxpCJLdq7zeswGrd 1SZqj50eZvnEHMySKYKsP9G0PYih9PAdkrRiREye+3fF5UFnreZUhNwJN84jV/6dmrak u/Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329891; x=1717934691; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ahx0B7IRhOU2KryLmin5A3x+RBjSRe40YtgpLFgn8h8=; b=mFIcC31UFKpvn5hWe/6zu54pgnda0/c+XaTlUySONohPkbXoXQYJs6rOAKN34+sdU2 Tx+H8jW0Md1v8VRevhV2ASrBTbmAmbIGyPKAI4Lqk6y9+JkgYOT2Kb5FKGbGRC9syemp mjk9Lk2O8HU48UISz+aEEpPLC0Vlzbo/3q7D+rBYJiFGGzYTFk8N7UoUKEhotBdenS2c kwmGd84csV6ofkPRi3qS0oTQ8iAdnip52q0C566duRRvf0Zn/EFcPoGlRvyJev5Pg0le FAZnT3YCxjtccmEZ6lFhOCsykfWVOJ0b22n6KBaTI/86aEwSEPGRbcGL1ia0ORPwNKIS 7ADw== X-Forwarded-Encrypted: i=1; AJvYcCVDDwDGf2zPg6B2LMhO5V9REyngbIZIQTmjcfu7bSJURB4sbXC8ER0iMIjZF9AMaN9bmqFhw46sB8qKXi5otlPOG4/bKwK2W6SlqNxR/JR8Pjrwpr0= X-Gm-Message-State: AOJu0Yy7hENIHHOYR0f0lagRNnSyiuKJW+lAV+GELqUlWkT2eUZK4BzH 51wtDXgOvkp4575uv1PyQtQp3Sme53NOEt6cE5xg3qObypKbLhRDQWRzF194+7k= X-Google-Smtp-Source: AGHT+IE9DlkDZJ/q6anZcEZCR4WzqVIVNYRa7q0Ns7NW+snWcKddBdYHt8pvqycOhI6UxRrnqrZ28A== X-Received: by 2002:a19:f603:0:b0:52a:e7c7:4ce6 with SMTP id 2adb3069b0e04-52b895633dbmr5188478e87.39.1717329890815; Sun, 02 Jun 2024 05:04:50 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:50 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 02 Jun 2024 15:04:45 +0300 Subject: [PATCH v3 05/12] drm/imx: ldb: drop custom EDID support MIME-Version: 1.0 Message-Id: <20240602-drm-imx-cleanup-v3-5-e549e2a43100@linaro.org> References: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> In-Reply-To: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2531; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=l7M3G39iu9nNrCk8sJLPBZk54Nd8nGO4KLe4Ou6kT5o=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmXF/dci5cApIh4CbjmDaF29E9SsPPCAy9IC1BP ookreVYSv6JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZlxf3QAKCRCLPIo+Aiko 1cwKB/4xCsYHUgD+LgO7CvPxVhR6dSFIH9rYipIXrsQtH3yVtnXKxqJVgzCEVAa05JbbXYH4ozm RGrPvgpfVs5QGXj/4+MKxODCFxUFgqKcXQVdlh7exxMGFAAXoc1FMl7K7Kscd59HZM9ALmd95jO nkRvO0T+JiSJhIy4mucD6HAXICDqQ9iH64hAwCiC+og87UzNN4W4uWK+Qn5WpFYsn9h9eCL0GR5 8Aa0ZHfyxbhjEw4Tpo5oN3TLUtg/FfUdILUEkXtOi4Dzy8tLxkjc7eP84g4JYJrwZytzOUmXqlo cj1OsANGFG1AJ4XbaaYw73OVV6ibGtMWOB3FKoFa7K2w3JKK X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240602_050453_735332_8C2853D1 X-CRM114-Status: GOOD ( 16.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Bindings for the imx-ldb never allowed specifying the EDID in DT. None of the existing DT files use it. Drop it now in favour of using debugfs overrides or the drm.edid_firmware support. Reviewed-by: Philipp Zabel Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/imx/ipuv3/imx-ldb.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c index 793dfb1a3ed0..1924d8921c62 100644 --- a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c +++ b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c @@ -72,7 +72,6 @@ struct imx_ldb_channel { struct device_node *child; struct i2c_adapter *ddc; int chno; - const struct drm_edid *drm_edid; struct drm_display_mode mode; int mode_valid; u32 bus_format; @@ -142,14 +141,17 @@ static int imx_ldb_connector_get_modes(struct drm_connector *connector) if (num_modes > 0) return num_modes; - if (!imx_ldb_ch->drm_edid && imx_ldb_ch->ddc) { - imx_ldb_ch->drm_edid = drm_edid_read_ddc(connector, - imx_ldb_ch->ddc); - drm_edid_connector_update(connector, imx_ldb_ch->drm_edid); - } + if (imx_ldb_ch->ddc) { + const struct drm_edid *edid = drm_edid_read_ddc(connector, + imx_ldb_ch->ddc); - if (imx_ldb_ch->drm_edid) - num_modes = drm_edid_connector_add_modes(connector); + if (edid) { + drm_edid_connector_update(connector, edid); + drm_edid_free(edid); + + return drm_edid_connector_add_modes(connector); + } + } if (imx_ldb_ch->mode_valid) { struct drm_display_mode *mode; @@ -566,18 +568,10 @@ static int imx_ldb_panel_ddc(struct device *dev, } if (!channel->ddc) { - const void *edidp; - int edid_len; - /* if no DDC available, fallback to hardcoded EDID */ dev_dbg(dev, "no ddc available\n"); - edidp = of_get_property(child, "edid", &edid_len); - if (edidp) { - channel->drm_edid = drm_edid_alloc(edidp, edid_len); - if (!channel->drm_edid) - return -ENOMEM; - } else if (!channel->panel) { + if (!channel->panel) { /* fallback to display-timings node */ ret = of_get_drm_display_mode(child, &channel->mode, @@ -744,7 +738,6 @@ static void imx_ldb_remove(struct platform_device *pdev) for (i = 0; i < 2; i++) { struct imx_ldb_channel *channel = &imx_ldb->channel[i]; - drm_edid_free(channel->drm_edid); i2c_put_adapter(channel->ddc); } From patchwork Sun Jun 2 12:04:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682811 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 10D84C25B74 for ; Sun, 2 Jun 2024 12:05:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rytcVQM0fT9ukd/e0XqICBLgHCbrlu87N3MV5Dd+zKI=; b=h70xzNznE6rMRF XwC9gQwQ/UJ6+mWHKSV35pDSou7N4JRZwxDT4MnTrCAVMuLOv2YLB/N/Olq/e/AYZs7T1F3q+Xhc/ y6EOJxCkn5P9YhWWrIyk+7F6NrSmDKlluNBj9PWc5mFadO0ZCp2+LsTFzdoRSXZL1WiHXSHOEeSSc +IRkWdooTdFJZ1wXuesSuwMEISyQDjfVM7Wkzn6dVg2stuNTl4kt3OosYFdlXOEv74gJ+ikMpGGt9 /tBmwuzJRnb/aLjBi1WH4R4hBVbBt9a78Iw/pXMBeN+WyRS/dImPkCg3q6aNvpOvIZmcsPggw0VWq 88GPIQ9em4svvbqGT66A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxL-0000000EBRx-2TG2; Sun, 02 Jun 2024 12:04:59 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxF-0000000EBMo-0zdV for linux-arm-kernel@lists.infradead.org; Sun, 02 Jun 2024 12:04:54 +0000 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-52b976b5d22so369751e87.1 for ; Sun, 02 Jun 2024 05:04:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329891; x=1717934691; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=h3z71OOWoNWZE+/hRN9KTPkL2PegZfYXg/orVwPR8kc=; b=ApZaDSovOQDE89hxqKsVLWIdlSow59uN8jO4p2a2i3DSBApAtXBBeY7ikYZBeIzwIU craR+BBd9YBf5ybEKy2op10uDEIdaRNBjkmKURd9ysbfW/eI8DmQbYxTAwHF41Uu8RWa ViD+icCbHS6fiQvPPC6CZjvXp9wJMpxpopIEa1I/Rle7cpMwny79zBlsrmIixbtUsWk6 4Q60SaAV+WGg2os011W83lq9CnabgD+DUTWzeQSv6LxQhhcd4VNdBjrr2CakuZtvsAk6 glHy9rF69wAgFz0POTjY0yvp69XvUMURk6VLbLUnP4cTHjUnsE+QA6dOSeam8S7eX2bO yJ+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329891; x=1717934691; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h3z71OOWoNWZE+/hRN9KTPkL2PegZfYXg/orVwPR8kc=; b=QEvZuPIPBwjHINeXhYcJIstB/GKCA7zXUOAosOxaCTRNUP6uw8yugYvFJ6RgSP+U/Y I4OLihDY1Fs85ZULR/wHeJxzSuK3v5GFMEU85XwdzuT5xWJgzZwAna1Urktjqf5oIoDn z8drQbd2KU8ne5tdyjb+nI/jFvTTbdLJvgcDN4s0ZVke+AwN2Xpq17sX92VpbJdu3UAv OlyDUEFxZnim5utuDeHl0m+ed+fFWTE5Tl3s4zgDB4FYCmt2kBWaPY1ceg1czqxh98zR SyO9r1B1bqIzs7Uu32nTgYYJg1HoQmdTLNidtDmDMBclf2DEoHLbw0whOKpfdSfCfhOl GvJA== X-Forwarded-Encrypted: i=1; AJvYcCU4fWZXEWmpJc5ijt9vc0lUXrXBdM2kWKq2gMf6UFF56OqEurCxWMux8dafsyiJ1K5GI2o3cLTbWwnj2V349jw2oHDQLdjbXq0PwUvlqB/1LRGXAqI= X-Gm-Message-State: AOJu0Ywh5/ibvbpoQNDTiy/J054lgtfAVjBvJcRsfg9E+fHGAw+PaJci 4c1So4swTzzu8QElwo5l8Ox+nIkkY1KaMxmeIrJPr/vDtTij5RIA6gr+g/5yFJc= X-Google-Smtp-Source: AGHT+IEU1T1JPwAyrMO5IbBAXktjwF9BMNKR9KPMqWrnmSSf9vVuZkPir8wiF0D+duaCctX822ai1w== X-Received: by 2002:a05:6512:b24:b0:523:8cd3:42cb with SMTP id 2adb3069b0e04-52b8957ff7cmr4204463e87.7.1717329891515; Sun, 02 Jun 2024 05:04:51 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:51 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 02 Jun 2024 15:04:46 +0300 Subject: [PATCH v3 06/12] drm/imx: ldb: drop custom DDC bus support MIME-Version: 1.0 Message-Id: <20240602-drm-imx-cleanup-v3-6-e549e2a43100@linaro.org> References: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> In-Reply-To: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4225; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=OpWhxY1X8SkMml69I2Dn6lgdN1AEsg7Y8hzUgxz6Gx0=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmXF/dvzraZ7ctB4FChev2m27M7qCFXal54iU0h YugcsfUMBiJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZlxf3QAKCRCLPIo+Aiko 1dQHCACQB3JwnhGjzPIYoevRPyg+W/8rjb+b4FiGCX+8kr4tglyyDGDSnXk3TUYYOIH6n2zC0RH LkkwktFI2o9qKaRhqVxLe27I7goSpmnC0mPwKCoOFj5OumAxioG+Yr/QDUsuwsmw3h+NMODYwEo gmIxHDx3DQ4M9HKdiMgLzoAyK5qOluYntgRSjeFQnYW0ailrYrcufrco7bdLl67alAiN6AcvNJ7 FH0eg2FEpb6RdAavpMCIYXfAZHZ0Ti6Y2ssjWXo4cjxcXsFg9Oo5IV1O1QLU8AE+DWuX+LkrtWi 7eO+NGUo1rAm68FAuK5z66cLuVS1LQTHEFw8cuoOfgtEKfAz X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240602_050453_324052_5CB710CE X-CRM114-Status: GOOD ( 19.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org None of the boards ever supported by the upstream kernel used the custom DDC bus support with the LDB connector. If a need arises to do so, one should use panel-simple and its DDC bus code. Drop ddc-i2c-bus support from the imx-ldb driver. Reviewed-by: Philipp Zabel Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/imx/ipuv3/imx-ldb.c | 73 +++++-------------------------------- 1 file changed, 10 insertions(+), 63 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c index 1924d8921c62..3f669604377e 100644 --- a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c +++ b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -70,7 +69,6 @@ struct imx_ldb_channel { struct drm_bridge *bridge; struct device_node *child; - struct i2c_adapter *ddc; int chno; struct drm_display_mode mode; int mode_valid; @@ -141,18 +139,6 @@ static int imx_ldb_connector_get_modes(struct drm_connector *connector) if (num_modes > 0) return num_modes; - if (imx_ldb_ch->ddc) { - const struct drm_edid *edid = drm_edid_read_ddc(connector, - imx_ldb_ch->ddc); - - if (edid) { - drm_edid_connector_update(connector, edid); - drm_edid_free(edid); - - return drm_edid_connector_add_modes(connector); - } - } - if (imx_ldb_ch->mode_valid) { struct drm_display_mode *mode; @@ -481,10 +467,9 @@ static int imx_ldb_register(struct drm_device *drm, */ drm_connector_helper_add(connector, &imx_ldb_connector_helper_funcs); - drm_connector_init_with_ddc(drm, connector, - &imx_ldb_connector_funcs, - DRM_MODE_CONNECTOR_LVDS, - imx_ldb_ch->ddc); + drm_connector_init(drm, connector, + &imx_ldb_connector_funcs, + DRM_MODE_CONNECTOR_LVDS); drm_connector_attach_encoder(connector, encoder); } @@ -551,39 +536,6 @@ static const struct of_device_id imx_ldb_dt_ids[] = { }; MODULE_DEVICE_TABLE(of, imx_ldb_dt_ids); -static int imx_ldb_panel_ddc(struct device *dev, - struct imx_ldb_channel *channel, struct device_node *child) -{ - struct device_node *ddc_node; - int ret; - - ddc_node = of_parse_phandle(child, "ddc-i2c-bus", 0); - if (ddc_node) { - channel->ddc = of_find_i2c_adapter_by_node(ddc_node); - of_node_put(ddc_node); - if (!channel->ddc) { - dev_warn(dev, "failed to get ddc i2c adapter\n"); - return -EPROBE_DEFER; - } - } - - if (!channel->ddc) { - /* if no DDC available, fallback to hardcoded EDID */ - dev_dbg(dev, "no ddc available\n"); - - if (!channel->panel) { - /* fallback to display-timings node */ - ret = of_get_drm_display_mode(child, - &channel->mode, - &channel->bus_flags, - OF_USE_NATIVE_MODE); - if (!ret) - channel->mode_valid = 1; - } - } - return 0; -} - static int imx_ldb_bind(struct device *dev, struct device *master, void *data) { struct drm_device *drm = data; @@ -694,11 +646,15 @@ static int imx_ldb_probe(struct platform_device *pdev) if (ret && ret != -ENODEV) goto free_child; - /* panel ddc only if there is no bridge */ - if (!channel->bridge) { - ret = imx_ldb_panel_ddc(dev, channel, child); + if (!channel->bridge && !channel->panel) { + ret = of_get_drm_display_mode(child, + &channel->mode, + &channel->bus_flags, + OF_USE_NATIVE_MODE); if (ret) goto free_child; + + channel->mode_valid = 1; } bus_format = of_get_bus_format(dev, child); @@ -732,15 +688,6 @@ static int imx_ldb_probe(struct platform_device *pdev) static void imx_ldb_remove(struct platform_device *pdev) { - struct imx_ldb *imx_ldb = platform_get_drvdata(pdev); - int i; - - for (i = 0; i < 2; i++) { - struct imx_ldb_channel *channel = &imx_ldb->channel[i]; - - i2c_put_adapter(channel->ddc); - } - component_del(&pdev->dev, &imx_ldb_ops); } From patchwork Sun Jun 2 12:04:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682813 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E786CC25B74 for ; Sun, 2 Jun 2024 12:05:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7RRm7n6IN2ZUK19QD5qT6i63EHrFYEtfzBqjHMEssBs=; b=ffzDe0jPE/oi6e SHonye4O8VvB3AtL3aVdNb/iGw4hHth+8m3dvRCfencPfKVL0B6yq4wOVD9q8MCW1OAGE+PTxwVC/ wT6gTGMgPv5JDmq6+KENpb9qbDL5sVEBSxcCIL/E4T+rQTK4Ex1bIaSat8gZZDztXMBiPO1lG/P2a bfx7EKn/yqErnwCLzM+DW2/gW/IpEve7NTOzLv7AQ81dX6ymP1SLTUqoNZDwBzmvTGa7vqZ3J1J5l PoaF9rHgzGA+tMZXwal/Ec7eWjQBvrlqSOfPDSnP8AxtunVXOdCq0h7v6Gy6Re2rKhQlDjC47y3dB Lm5Dm5VkEeGj/apsjU0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxS-0000000EBYb-2WTx; Sun, 02 Jun 2024 12:05:06 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxH-0000000EBNO-2BIJ for linux-arm-kernel@lists.infradead.org; Sun, 02 Jun 2024 12:04:56 +0000 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-52b8bb0c059so2518012e87.0 for ; Sun, 02 Jun 2024 05:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329892; x=1717934692; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=gC4tSJBea8UmW/N+lhpg1fIpD1gqTE3H4TGkKQw6PNs=; b=XabIscfHzjNgZiLh8a3B8bKuzOeyqonXEdcbby3VYwpJJ7fWbfmYSx4FZRWID+h5TN nrdC+fsde01bF++L7Y6m77QtIHThgVWWETPbdPrXPxyTQxgXo96QXhb+JmxLea0ZeCfR sw6/OcxxLfkVn4KkQt0nw6D9UsYDQ6XtwqBFpJLlpVlLFHLF6Y7qe7fR9GM6PS1l7Ark VPk2rYX6w5QmyobuxwOq5X+3b5eaOZMZ3ILioAAYMbGORZ4kpJc6ov23x334xeHGxVeX k6M2M/b9FlpQCo2IF3ROs464bYIzH4yFnowSuD+wJN0Ph5+LkdgTNb20nQsorgA/2522 wkVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329892; x=1717934692; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gC4tSJBea8UmW/N+lhpg1fIpD1gqTE3H4TGkKQw6PNs=; b=CBjJ2TVg8NCmesNMWpxKXWs+RP07wkF4Q55QaTb4zqwS16p40+I72JJ9uOlKDiYQJr ZK3+8fAl7Mu7wzK3ZxqHs8b9noYwk9BQ1SV6aO3Xw1hWTyvi0giHng4D69sf16k3lj2w vqnXV0gSk6aRVdhrZB/2MDzuFJZJRmKxcd2pAUbNbF66oj+/Jy2U+7S4zN39vf9LGQPN F+UIvoqIWXaHtk3xl+6dYwJOLwEE0gUp/yo9zqWtqC8tLMo/M8pzsnOgG892F5PMXd85 L7v7/fpH90wFx7SHRavNhikg21+c4HaGA/lJOE07HjvsgbZxOjvMLCO6obrUrW+/MQFp /o/Q== X-Forwarded-Encrypted: i=1; AJvYcCU/I54pUK6wJMrFFo0zQwjhl6gio2j7XIwNfbg8nZbjuUPsNy51tEI3J5DnszU9aQedYr1tol8VXqmT/Q0IlIDfSm5pEZJltxTUX9CPsDitj5w27y0= X-Gm-Message-State: AOJu0Yz0yw+yAyZr+KQwBspGRRcoDZUfnph58BfGB0/uNiBUqlQDRUKt 8cFkqz/j3HZKyiyeRBcQapU2R0Z87NWe3h2ofvkiq7QPLs7u5PXfNH5km1Vt+sc= X-Google-Smtp-Source: AGHT+IHXq2dXnaN4xvg4VJ6ZhYzE3eiC4TjSwrCDwgXw0dsCBzUpfF8VdkGxF7KGe/zlEOchf5dRmQ== X-Received: by 2002:a19:7708:0:b0:51d:3f07:c93c with SMTP id 2adb3069b0e04-52b89560924mr4547518e87.3.1717329892477; Sun, 02 Jun 2024 05:04:52 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:51 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 02 Jun 2024 15:04:47 +0300 Subject: [PATCH v3 07/12] drm/imx: ldb: switch to drm_panel_bridge MIME-Version: 1.0 Message-Id: <20240602-drm-imx-cleanup-v3-7-e549e2a43100@linaro.org> References: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> In-Reply-To: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4752; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=WBClGWrNVswdIn4UlsSFs/7q2W6RzczPr0uXKZRLUaE=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmXF/dMKaGCWF4xzbQpN9kDrjKai+DQFg5AY1OU B3N3BGopfKJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZlxf3QAKCRCLPIo+Aiko 1W8bB/0W9wht582BaLK/4++Mstz6lJY9J8D8p9faJd+tTSYsGFkysEZkXrFJ3nZhT6mNGzNkRQ6 QXSlyP4rfJ1d3lmEYkjo8fN09pK9Sp+lx8c4+F7Kvp7ck8Y/1OeMIu/LitOdjJW3trxUGqD2u8I uocvla1K0+SsLtT1KrA/z9bh/OFaXpX7DIMbjB3hce0HIv0BIT/adoGSrinENUDL/uRN1i8/wl1 nd4klFahiXtNXeALmLY7inN9GTE/cThbtJyX3Uz48ReTPC+hjdRO8GVmXmWx7HPyMpTZwXpNEOa 9XT024wPuNoOU5VQ5xKjJ8rPzjXFeI9wvCpCHkXx2E+UgVpc X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240602_050455_643960_9298FB91 X-CRM114-Status: GOOD ( 20.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Defer panel handling to drm_panel_bridge, unifying codepaths for the panel and bridge cases. The MFD_SYSCON symbol is moved to select to prevent Kconfig symbol loops. Signed-off-by: Dmitry Baryshkov Reviewed-by: Philipp Zabel --- drivers/gpu/drm/imx/ipuv3/Kconfig | 6 +++-- drivers/gpu/drm/imx/ipuv3/imx-ldb.c | 44 ++++++++++++------------------------- 2 files changed, 18 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/Kconfig b/drivers/gpu/drm/imx/ipuv3/Kconfig index bacf0655ebaf..6abcf9c833d4 100644 --- a/drivers/gpu/drm/imx/ipuv3/Kconfig +++ b/drivers/gpu/drm/imx/ipuv3/Kconfig @@ -26,9 +26,11 @@ config DRM_IMX_TVE config DRM_IMX_LDB tristate "Support for LVDS displays" - depends on DRM_IMX && MFD_SYSCON + depends on DRM_IMX depends on COMMON_CLK - select DRM_PANEL + select MFD_SYSCON + select DRM_BRIDGE + select DRM_PANEL_BRIDGE help Choose this to enable the internal LVDS Display Bridge (LDB) found on i.MX53 and i.MX6 processors. diff --git a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c index 3f669604377e..bc7ad9697130 100644 --- a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c +++ b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -64,8 +63,6 @@ struct imx_ldb; struct imx_ldb_channel { struct imx_ldb *ldb; - /* Defines what is connected to the ldb, only one at a time */ - struct drm_panel *panel; struct drm_bridge *bridge; struct device_node *child; @@ -135,10 +132,6 @@ static int imx_ldb_connector_get_modes(struct drm_connector *connector) struct imx_ldb_channel *imx_ldb_ch = con_to_imx_ldb_ch(connector); int num_modes; - num_modes = drm_panel_get_modes(imx_ldb_ch->panel, connector); - if (num_modes > 0) - return num_modes; - if (imx_ldb_ch->mode_valid) { struct drm_display_mode *mode; @@ -193,8 +186,6 @@ static void imx_ldb_encoder_enable(struct drm_encoder *encoder) return; } - drm_panel_prepare(imx_ldb_ch->panel); - if (dual) { clk_set_parent(ldb->clk_sel[mux], ldb->clk[0]); clk_set_parent(ldb->clk_sel[mux], ldb->clk[1]); @@ -233,8 +224,6 @@ static void imx_ldb_encoder_enable(struct drm_encoder *encoder) } regmap_write(ldb->regmap, IOMUXC_GPR2, ldb->ldb_ctrl); - - drm_panel_enable(imx_ldb_ch->panel); } static void @@ -311,8 +300,6 @@ static void imx_ldb_encoder_disable(struct drm_encoder *encoder) int dual = ldb->ldb_ctrl & LDB_SPLIT_MODE_EN; int mux, ret; - drm_panel_disable(imx_ldb_ch->panel); - if (imx_ldb_ch == &ldb->channel[0] || dual) ldb->ldb_ctrl &= ~LDB_CH0_MODE_EN_MASK; if (imx_ldb_ch == &ldb->channel[1] || dual) @@ -346,8 +333,6 @@ static void imx_ldb_encoder_disable(struct drm_encoder *encoder) dev_err(ldb->dev, "unable to set di%d parent clock to original parent\n", mux); - - drm_panel_unprepare(imx_ldb_ch->panel); } static int imx_ldb_encoder_atomic_check(struct drm_encoder *encoder, @@ -640,13 +625,15 @@ static int imx_ldb_probe(struct platform_device *pdev) * The output port is port@4 with an external 4-port mux or * port@2 with the internal 2-port mux. */ - ret = drm_of_find_panel_or_bridge(child, - imx_ldb->lvds_mux ? 4 : 2, 0, - &channel->panel, &channel->bridge); - if (ret && ret != -ENODEV) - goto free_child; + channel->bridge = devm_drm_of_get_bridge(dev, child, + imx_ldb->lvds_mux ? 4 : 2, 0); + if (IS_ERR(channel->bridge)) { + ret = PTR_ERR(channel->bridge); + if (ret != -ENODEV) + goto free_child; + + channel->bridge = NULL; - if (!channel->bridge && !channel->panel) { ret = of_get_drm_display_mode(child, &channel->mode, &channel->bus_flags, @@ -658,15 +645,12 @@ static int imx_ldb_probe(struct platform_device *pdev) } bus_format = of_get_bus_format(dev, child); - if (bus_format == -EINVAL) { - /* - * If no bus format was specified in the device tree, - * we can still get it from the connected panel later. - */ - if (channel->panel && channel->panel->funcs && - channel->panel->funcs->get_modes) - bus_format = 0; - } + /* + * If no bus format was specified in the device tree, + * we can still get it from the connected panel later. + */ + if (bus_format == -EINVAL && channel->bridge) + bus_format = 0; if (bus_format < 0) { dev_err(dev, "could not determine data mapping: %d\n", bus_format); From patchwork Sun Jun 2 12:04:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682816 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 00AE7C25B74 for ; Sun, 2 Jun 2024 12:05:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gnwmk+RLzVr6T1qx746ZO/DZtPJ/0jtja+SGoZI9qGk=; b=yFCIr9/wYnnEXx dsBGCw8pUnDg2XSttGubeywwEtYfohxT3oSv5THiD7WVx8/gCXaPXuzmPL08gfkBOTyRFAO+QWL+d wjYAUcE8QfBTQ3vD+8dS/xRLwzgqiQHqG1b7/EHCLQ3MpGEmOhqt9hH5bCXgHnw3kZZdNzD+bGtYj gH5DwvkKKCf1Hk9ULmSabiAO1q92z8iUDqXN3CEO63a0UWjqEqAiWAuihwFpR7S9QeiPV16mqvNJE oI+5AmiecGk8DZoVWen0McKesu+wtk+wK6YFU+oKouiV1oeK3BRRc1mu16Ngjzt2oKAMHJ+bikTjJ UBpR8lHb1tBNtvu8rvTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxh-0000000EBmi-1nQa; Sun, 02 Jun 2024 12:05:21 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxI-0000000EBO1-1kHp for linux-arm-kernel@lists.infradead.org; Sun, 02 Jun 2024 12:04:58 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-52b83225088so3032803e87.3 for ; Sun, 02 Jun 2024 05:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329893; x=1717934693; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=VGU3KUiVmuFO+I88v9Ywk6Wx4j7BTcNcPl2nGJzsGdg=; b=gyCTJwGkjUxBQj1da2d72GOgD4iDHk4Kgw3ANbGeYrIAwXmUYaBv9U3dHNnYGRp8qO MbAIIMmlNGpJSA8hSr0+XJ1ze1L195xFpWikwtYkAO2fgJcOt7flEwdO3SaGd7wGjT5H 3+/GfJZjF8Obe+d5f3JKH8/7QGvd3ztnYZIR2ue0uWvUfIbCL4v6xagh/V3c2WCJMnV5 mR/LNJqOh4AGOE8v2pMT1Ic4QTdBbdkMI0LtmYFWg67c8hqvrRJOlpaAoUKL7PwUR/bX 9xXI16taQ1v6pFzGe3jR2JIp1XrQ/6Dx37sqP1sgC6RUyJzmRWwAHUChfHEhSLoI64Sx kzbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329893; x=1717934693; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VGU3KUiVmuFO+I88v9Ywk6Wx4j7BTcNcPl2nGJzsGdg=; b=BQQont5NdXVA0euIMaQ7NRcrnCdWOppWAsa4ztrxBWpyUfwIUXSXXY0G7OD5mAgtF5 5gF12TryS+BLJxmMnpKt1zyC2O9vJI3E1tFa1xJp5fAasQHY5qGvOomssFikTIeFb7sv gGEqw3IZxhnaVJxVApazOdzHrBDH/iq4gvmum+Tr/wcRtEiUt9XiVumbFQksZ0SqKurI tQdk8mdlWd8NBuffWcwcs7XWMcCGbdtyIx8ugLeZBkXn0EiKio56PPEXAc4K0LqHwy4Q Yk9/iUNYH0bFHTuI/XntITn019o0zN5XemWgYkdZd/NuWx3PiBmRMh/fgsjOfhb9SfPO stLg== X-Forwarded-Encrypted: i=1; AJvYcCXpWQg9TacfW1PKz/SiljQoyOBM5PJTQEB7aeqKKrDMf1lL3ECF84yjMTEEaptd4fkoeI5eI7AnPdHeC6ltp5xHVdBIOlw5aVcOCy77IYweftSVT+w= X-Gm-Message-State: AOJu0YzJbbG55iZa7CufRwqAyjaVOlXr4wfPxxOVvT0kd3M2poJyHPYp pM4NndSD1vZAV84OqbJdGYw4NnOignNAWR+QFzVaQWFnJcwccC905n7M6gayW2s= X-Google-Smtp-Source: AGHT+IF7TZ4Bpm/utFW2oKfvXnr5l8lwnBKGc7QMlT6c7QNw81zMgz7FkneTI496TxRY8A1Eax7xNw== X-Received: by 2002:a05:6512:250:b0:523:90df:a9c6 with SMTP id 2adb3069b0e04-52b896da5f9mr4155392e87.50.1717329893396; Sun, 02 Jun 2024 05:04:53 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:52 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 02 Jun 2024 15:04:48 +0300 Subject: [PATCH v3 08/12] drm/imx: parallel-display: switch to drm_panel_bridge MIME-Version: 1.0 Message-Id: <20240602-drm-imx-cleanup-v3-8-e549e2a43100@linaro.org> References: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> In-Reply-To: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3514; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=g0HHFds0a5m+nPSqV1AB/dYMtVHavA5UQkGivvC5OrQ=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQ1pM/N3E6kytV+tmb/OYlNH0h9MlaeGx8gffX3z6ynyX9 caZ8vbTnYzGLAyMXAyyYoosPgUtU2M2JYd92DG1HmYQKxPIFAYuTgGYSC47+18Rn7eeLQY3ckTl xSu1Iz4Z/Xn5qIi1ednvXUFJtdMYbJ99PvY10Xr/1fSPWYaaitEJXFmO7/Wv1nze8PNZn9PdzYZ KT/QrYhfMXD91JlPxmWnrpv9T3qkhvtP92X+j1sKvcxrmPTQwcVPszZ6us+5wl17LzOXKNQZxqb 2XjBSTKvX/adtf/OWmM4u35XdmaOqEe4WVL0vW+D8I6HdjS9HMEme5OqU7PeDBrGz3fZ6y39JdK xy4zMr5N9dVyuhKZz3sWVzhFNP4Mou/oeW+3obl//UizA3lts4XPrm+yI5rh2r/jIcPvr/L3NCs tK0pv6Rm6l7NHnVV7xLTZLdviWv4jJe6KXN/Ol8clr4UAA== X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240602_050456_530314_FEEF63D8 X-CRM114-Status: GOOD ( 15.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Defer panel handling to drm_panel_bridge, unifying codepaths for the panel and bridge cases. Signed-off-by: Dmitry Baryshkov Reviewed-by: Philipp Zabel --- drivers/gpu/drm/imx/ipuv3/Kconfig | 3 ++- drivers/gpu/drm/imx/ipuv3/parallel-display.c | 36 +++++++--------------------- 2 files changed, 10 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/Kconfig b/drivers/gpu/drm/imx/ipuv3/Kconfig index 6abcf9c833d4..f083d313d1d3 100644 --- a/drivers/gpu/drm/imx/ipuv3/Kconfig +++ b/drivers/gpu/drm/imx/ipuv3/Kconfig @@ -11,8 +11,9 @@ config DRM_IMX config DRM_IMX_PARALLEL_DISPLAY tristate "Support for parallel displays" - select DRM_PANEL depends on DRM_IMX + select DRM_BRIDGE + select DRM_PANEL_BRIDGE select VIDEOMODE_HELPERS config DRM_IMX_TVE diff --git a/drivers/gpu/drm/imx/ipuv3/parallel-display.c b/drivers/gpu/drm/imx/ipuv3/parallel-display.c index 4d17fb96e77c..9ac2a94fa62b 100644 --- a/drivers/gpu/drm/imx/ipuv3/parallel-display.c +++ b/drivers/gpu/drm/imx/ipuv3/parallel-display.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include @@ -36,7 +35,6 @@ struct imx_parallel_display { u32 bus_format; u32 bus_flags; struct drm_display_mode mode; - struct drm_panel *panel; struct drm_bridge *next_bridge; }; @@ -56,10 +54,6 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector) struct device_node *np = imxpd->dev->of_node; int num_modes; - num_modes = drm_panel_get_modes(imxpd->panel, connector); - if (num_modes > 0) - return num_modes; - if (np) { struct drm_display_mode *mode = drm_mode_create(connector->dev); int ret; @@ -84,22 +78,6 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector) return num_modes; } -static void imx_pd_bridge_enable(struct drm_bridge *bridge) -{ - struct imx_parallel_display *imxpd = bridge_to_imxpd(bridge); - - drm_panel_prepare(imxpd->panel); - drm_panel_enable(imxpd->panel); -} - -static void imx_pd_bridge_disable(struct drm_bridge *bridge) -{ - struct imx_parallel_display *imxpd = bridge_to_imxpd(bridge); - - drm_panel_disable(imxpd->panel); - drm_panel_unprepare(imxpd->panel); -} - static const u32 imx_pd_bus_fmts[] = { MEDIA_BUS_FMT_RGB888_1X24, MEDIA_BUS_FMT_BGR888_1X24, @@ -237,8 +215,6 @@ static const struct drm_connector_helper_funcs imx_pd_connector_helper_funcs = { }; static const struct drm_bridge_funcs imx_pd_bridge_funcs = { - .enable = imx_pd_bridge_enable, - .disable = imx_pd_bridge_disable, .atomic_reset = drm_atomic_helper_bridge_reset, .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, @@ -315,10 +291,14 @@ static int imx_pd_probe(struct platform_device *pdev) return -ENOMEM; /* port@1 is the output port */ - ret = drm_of_find_panel_or_bridge(np, 1, 0, &imxpd->panel, - &imxpd->next_bridge); - if (ret && ret != -ENODEV) - return ret; + imxpd->next_bridge = devm_drm_of_get_bridge(dev, np, 1, 0); + if (IS_ERR(imxpd->next_bridge)) { + ret = PTR_ERR(imxpd->next_bridge); + if (ret != -ENODEV) + return ret; + + imxpd->next_bridge = NULL; + } ret = of_property_read_string(np, "interface-pix-fmt", &fmt); if (!ret) { From patchwork Sun Jun 2 12:04:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682814 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 32030C27C44 for ; Sun, 2 Jun 2024 12:05:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RadwQllnLlDR/deJJfhMDd2f6E7vDZqHFjvqHkyHl3g=; b=gBAgo86AxHpOuK tFl49gLmH736ylivgKN0CGWhgWdDKANfIbGikYG41e6Ggd88vXU4FBw/0ofg4NL9x9CTGSPvh8bMW lhz9ssfqlKvqAdgIri6MlezZ3rWpn58srmNtJnfVWl6JQKj38dodibmYyXvJg5JTJBfvQ5Wb1sMbj j/ec3U4IgawiK6InFlOCPcaNvkV/cP8P+UD4QGb+iYn14yzqofes/dcVGNnX3ESpIHO/z1PhrleZM 4E+S7NLNR9PscGbbzSBxFqijXm7TG5lSbLGdFlSa+8kWG/kCbhonmVlkS8jm63fVn8XojEcG12c/4 ktknO+ESYe+y2axRGydQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxX-0000000EBeU-3Tsr; Sun, 02 Jun 2024 12:05:11 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxH-0000000EBO8-2ne4 for linux-arm-kernel@lists.infradead.org; Sun, 02 Jun 2024 12:04:57 +0000 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-52b976b5d22so369774e87.1 for ; Sun, 02 Jun 2024 05:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329894; x=1717934694; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=YwLGlhS8c4MSDhZlnMfqrMoYx9jr0+buWOu6Q2vrZUo=; b=Goof2f1XaOrfq9+SnlJpyZFhpZVZVeXupnihy+Cn+2A6JfyeqKZSC2eGrncixFeKga dFRdGApJsaSenGzhQfbqhj0MFqeViWBmkV4pqfOPceDQQW2FKQeXZBwrFTbjd1eNECkr Ra/Qb0PK6RFdPDTa4YQ1i5kLJn0IVCcL+CTQAsRb4dXFJyAvnkcRsxTfw33ZTGHGVbZ4 tOhXpV5r6/yFQtrXbCV8VnLDzsQAG3LjLtQH8LV7xZakIRYbQZ9kALEoOOFBS30bKCVp Npe1yfgEIBY7+qQdLpKO54sdZpokBIAYerCvczkCi3rTyYImrYmGuDRQbzGpAUlqdOcM bxqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329894; x=1717934694; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YwLGlhS8c4MSDhZlnMfqrMoYx9jr0+buWOu6Q2vrZUo=; b=amGx5xMy3g0e/o4dHLCZKt82jS9r7IwCYfoUltV88f6/VKoAnU0VbaoFSKL6BMFNJH rm9qrxkBgArQ868K+VUB4HYhLHAi0bwmzM0AdIbw564WGyuLbjDviku9NuHCxhLOxq+j vQ5Q3lZ5yZZ90yHQPDkyy0NT/UnRtMjVNi6PWSO4WCRneolXun3jKeRvoke2iFbYdaeZ Qc5Ju4Cic3ZvNnClyEX6S5F1RkBVpgjdnbXCQ4b7P92sqIgTSDRKvcCBFtGS44u5P3vs MQLaGHcG/FOQniSlVUDyYO2GFrwmXqvcUHHzfPHfggw9za8wjOIUrtv3yXTrBIC0qwkk rLgA== X-Forwarded-Encrypted: i=1; AJvYcCWCynRi5j5KZEETOW/yroEuir78gpXFWJmDVti3ExPKqyUOyy72Ujjhmr0+6DaAAnR0GSL9RW/hcsi1p1vfbkUb12uS2PkVjJ51JACV5Sy6a1bSq+0= X-Gm-Message-State: AOJu0YwJirEyLULQh488zW9uaAAJVzjIKlWl2D9Q/b1BsOhfQegpwz1Q Jcj4zH25rW5XM6vsxtYkeoYIxF7rIvmR5Uov0x/xi7CZ11SYqhiQEA5OvdqONOI= X-Google-Smtp-Source: AGHT+IHQTqu9po4Q58mn5dmh/iNF52AD9wdFkQoRIF/Qt4N/Ulzqw4wOqZkzdJsVft3tRiPNgYeHdg== X-Received: by 2002:ac2:4556:0:b0:526:81ab:191 with SMTP id 2adb3069b0e04-52b8970078fmr3604279e87.60.1717329894052; Sun, 02 Jun 2024 05:04:54 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:53 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 02 Jun 2024 15:04:49 +0300 Subject: [PATCH v3 09/12] drm/imx: add internal bridge handling display-timings DT node MIME-Version: 1.0 Message-Id: <20240602-drm-imx-cleanup-v3-9-e549e2a43100@linaro.org> References: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> In-Reply-To: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4905; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=5qwH6l5MO1K0SbjK3RylTsbBZG/ntitWTbJUNUocDzw=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmXF/d/Fah3CGztXwsM4kY3CMDCT+cEaYdiMGWa 3/3qeABMJSJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZlxf3QAKCRCLPIo+Aiko 1YFGCACQRurwdwe8yveOmxw8xeQgho8g6nkzyJ3kQ+gCq9JB2tSgAze+ZI4VDVW41MZ5u77trMB jfxDeC7F4oSTGz0+cvoLiqd5iFxLg7fOsLjLaW0XsFp5HqR2Ujgj69oLKtl3eCZwW93VtLwVjCV QF20Qc398qLsZoCWU/DUtwvUYH2kchX/mmQ/gLK9qeM+b8/FuKCix3CWW+BrLY3dWXAy5bxKdFS vUdTre5Ulmcdhsz8hpehTUDFyUjcRd3913TosViZUGou2j6GgO3dytGOOZ4mZIuzqodgchDtXBv Ma13/Sp4iomIpGUDn+j9HQWTADrjoZgk42vPGI3UD63QZZHP X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240602_050455_767133_DCA0CE35 X-CRM114-Status: GOOD ( 18.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org i.MX DRM DT bindings allow using either a proper panel / bridge graph to provide information about connected panels, or just a display-timings DT node, describing just the timings and the flags. Add helper bridge driver supporting the latter usecase. It will be used by both LDB and parallel-display drivers. Signed-off-by: Dmitry Baryshkov Reviewed-by: Philipp Zabel --- drivers/gpu/drm/bridge/imx/Kconfig | 10 +++ drivers/gpu/drm/bridge/imx/Makefile | 1 + drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c | 85 ++++++++++++++++++++++++++ include/drm/bridge/imx.h | 13 ++++ 4 files changed, 109 insertions(+) diff --git a/drivers/gpu/drm/bridge/imx/Kconfig b/drivers/gpu/drm/bridge/imx/Kconfig index 8dd89efa8ea7..9a480c6abb85 100644 --- a/drivers/gpu/drm/bridge/imx/Kconfig +++ b/drivers/gpu/drm/bridge/imx/Kconfig @@ -3,6 +3,16 @@ if ARCH_MXC || COMPILE_TEST config DRM_IMX_LDB_HELPER tristate +config DRM_IMX_LEGACY_BRIDGE + tristate + depends on DRM_IMX + help + This is a DRM bridge implementation for the DRM i.MX IPUv3 driver, + that uses of_get_drm_display_mode to acquire display mode. + + Newer designs should not use this bridge and should use proper panel + driver instead. + config DRM_IMX8MP_DW_HDMI_BRIDGE tristate "Freescale i.MX8MP HDMI-TX bridge support" depends on OF diff --git a/drivers/gpu/drm/bridge/imx/Makefile b/drivers/gpu/drm/bridge/imx/Makefile index edb0a7b71b30..dd5d48584806 100644 --- a/drivers/gpu/drm/bridge/imx/Makefile +++ b/drivers/gpu/drm/bridge/imx/Makefile @@ -1,4 +1,5 @@ obj-$(CONFIG_DRM_IMX_LDB_HELPER) += imx-ldb-helper.o +obj-$(CONFIG_DRM_IMX_LEGACY_BRIDGE) += imx-legacy-bridge.o obj-$(CONFIG_DRM_IMX8MP_DW_HDMI_BRIDGE) += imx8mp-hdmi-tx.o obj-$(CONFIG_DRM_IMX8MP_HDMI_PVI) += imx8mp-hdmi-pvi.o obj-$(CONFIG_DRM_IMX8QM_LDB) += imx8qm-ldb.o diff --git a/drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c b/drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c new file mode 100644 index 000000000000..fb3a030928f0 --- /dev/null +++ b/drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Freescale i.MX drm driver + * + * bridge driver for legacy DT bindings, utilizing display-timings node + */ + +#include +#include +#include +#include + +#include