From patchwork Mon Mar 11 11:20:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13588641 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 D8ADCC54E58 for ; Mon, 11 Mar 2024 11:21:11 +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=msTGs+RTpQEarDTvgC5QavDLmiQy69P9UTPSyDU/dWg=; b=3nF+CJVOcfdNL5 7QrNfGreJder67T/tdYzU4u3VTjljG9fPX0xcD7EKqKWegoViVpZ2xnsEDa7f7kLQ3kvlQ0088PsN dYWokBkgfj4WpMwW1IOTwMQsWg3CqB4lqHZG8OlSics1DPrJU+8a9Dx1fQDexaNAWIgFaFoAf827z MwOMBVLQ1NPUJL6PrZmDguP242rLY5gaKK0HZK/UVDXH5t4NKycj60DB9IdpZm5BlwHlBx361Phtl A4+aZ0Ysr2hnP2H3mbSq8/K/m1npoxq4K+ZNxGqoWQ7m9lCy9VwjR7SQnyX1m3QpGmx0x/d7FAOkz f9kVUazEWjSmgc7Bhi1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdi9-00000001Fmd-2bq7; Mon, 11 Mar 2024 11:20:53 +0000 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdhy-00000001Fe0-3lDC for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2024 11:20:45 +0000 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2d29111272eso67176231fa.0 for ; Mon, 11 Mar 2024 04:20:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710156039; x=1710760839; 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=5K+8RS+ahU3ghC9Eek+RlKhdxsgzsxyDagZOon3+/co=; b=PVALfoc1c0KAbbTLDoN6t/33Qkd4w+oNY81k/hOwasQTsZy7FhUQng3tgawfgKnByS IU+9pd1MuqvDx3dANvmMoE/j9C7T6Csdicj1WDjyvaCtrPln7KJKNEfE2dgkGqKDZBkD 4rqhTY7u9o/yCgVZJ7hD7NyP775zwUguFekUSfu4S86V8/SnsmunJeksmBfMK8nP5h9O /KxONhVYV0qAuckt53oqhb+6V8i0uJQ7Itzly00ElnoJuYCCva0rGZyLJb6T5OTARxe6 KF9LFSMkm1eQrJsdFXR5L+WAXWo3Zpb7kfwdXrM/KmSR0qGzLEJIMJnC8uzMSFJEAVM4 cypw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710156039; x=1710760839; 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=5K+8RS+ahU3ghC9Eek+RlKhdxsgzsxyDagZOon3+/co=; b=afpI0aitA3FawJGNVDJ5qBMVOdjCdKOCuqtiaKP5g1mXr1Lgzn8wZfdSCl1fKIMPK9 hnGiVfeZKuCC2HMuwLkvysQWdFHlhKhPb74B6j++j4IpAdTNLk7mBBilBpVEJGeNuVlB xSFmAn3jEpLXsKWNsy/0qEDSJZolBWS87K/m3o9W7anWcPDIcrEbpR//ExzetWTqqeCT aEafZ4EWcUi18wW9r2N+w6l8G8TpW0G2TFUsTRAV3Qkh05/jm4SXeggUfDx8QnyLmyKQ l9K/a9KD2/1ga7fBVN9p/reT859UWtSAC4tMQ7b6MQ5+iOYJl4KYLo7VDRvd+fbaYE/m 9r2A== X-Forwarded-Encrypted: i=1; AJvYcCW3+8A5I1oOXKWQWDt5AoB8aa4FXPalTKrZrASTiXoRSKX0K8GOjFeWlb370XwnM6pcd8rwpUmFN48C+VmYTDJ1Me6zTVQzKmzBbbaP5vYubIOUTlU= X-Gm-Message-State: AOJu0YxEAtbUT0YcTHNcgVijJlcRDAtb8GWMie+K76OQ3bTNqka4T9Q/ FayajQ6lsXfYBwAaxndvUXhbsmA2s2Kyb4toEItKo83KkYyryC3vhZSlxsiLTeA= X-Google-Smtp-Source: AGHT+IEJhMAtLOGdKJeKecm7sYEKvYcwwx9duwSC/xm8nUskzRXaHqSqFQNqsYJ+HOB9PEoneZGAlw== X-Received: by 2002:a2e:bc17:0:b0:2d4:2651:1483 with SMTP id b23-20020a2ebc17000000b002d426511483mr4965661ljf.35.1710156039078; Mon, 11 Mar 2024 04:20:39 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id by10-20020a05651c1a0a00b002d2aa0b0d01sm1075200ljb.82.2024.03.11.04.20.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 04:20:38 -0700 (PDT) From: Dmitry Baryshkov Date: Mon, 11 Mar 2024 13:20:09 +0200 Subject: [PATCH 01/12] dt-bindings: display: fsl-imx-drm: drop edid property support MIME-Version: 1.0 Message-Id: <20240311-drm-imx-cleanup-v1-1-e104f05caa51@linaro.org> References: <20240311-drm-imx-cleanup-v1-0-e104f05caa51@linaro.org> In-Reply-To: <20240311-drm-imx-cleanup-v1-0-e104f05caa51@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=1483; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=qEtbmPTQ1hWUAljrEFOM5fEpd9T1vWp4LF7YuGb47NU=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl7ukDR8/XphsjX9E6ftv7NHIwcR6vVy3NYlC/d zXcBG5F1AKJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZe7pAwAKCRCLPIo+Aiko 1S/TB/9vuXwtn84QJjHwWRO7IIGZ4o7Fqk8/BZcRorA2Fibr15CVuzrPG05KtxepCR49FHcaL3o G4d8QEWJTkQDEdZge69TTVqoSWw1GyhXhSc4G3Fwwa8ZOiz8KRjjjfrU2hxcFbqH7iRn1/cJCtk 70J7bqowfyNagfeYY9+cyAzLGxG73o5my1xA5NmcILa/IwDguTDE3TFvfV2RLUVPFfeRSPmTiaU HTYUs7p0BgIoClf9wen96Ee/SZQ9lbbYlcNx2D0vNTe/EgUVSycN/80gkxjVxcteUUGIDLx/ibh kJ7Ypvg9Ti7aOhkeSWy65CdQpiACyht6VgF/WLPThx5CcM2z 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-20240311_042042_983707_BD5049B5 X-CRM114-Status: GOOD ( 12.34 ) 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. Signed-off-by: Dmitry Baryshkov Acked-by: Rob Herring --- 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 Mon Mar 11 11:20:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13588640 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 D04E3C54E58 for ; Mon, 11 Mar 2024 11:21:09 +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=xvEH8pKyi213wBLT64pkuKC04LdJ4dn1AGmQYd1dDHM=; b=c86MQyxwJHUyeU PwXJhP0GNCvj7RKS//HPeS4XNHSQ2oiEOO0Klikf8FCcLxVlYdA8BzoUreZX3h0yrgs5FjDV19J0z U6VvFu5lIYp3WV5+gjl62PMgkaB6c6DvSPQqwK8WbttqGtAJzR/FsFW624oZQd2LEF6z4B/8zsX7r yTIWDOSZ8kgJhwaWK375oX6r3HZkPWfDouuJ4K6Gm+m06y0g/OwB5a4V2GYAMyJGdKUB039oAvWK5 KUAyPLfv53b/00LT+yH9HEHbww5Ttp89OYMJ/SE+g/jvHS690nfDUTcDEPjleIVwOfRJtFAupwau+ OIzdQbWgOoO8N3n9MfPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdiC-00000001Fpo-2eKE; Mon, 11 Mar 2024 11:20:56 +0000 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdhz-00000001Fe7-3gdf for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2024 11:20:46 +0000 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2d288bac3caso43093321fa.2 for ; Mon, 11 Mar 2024 04:20:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710156040; x=1710760840; 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=FOnGUUSPDhVt2hmPu4weKhalmHR2vV5a1NMlqOPGhZM=; b=TQmb3YHh+433llVpkRtifrPcdD3FxGB+Ijv1lXj9UNAv6uoXPvj/ZxcHjqGm/M+Ij0 59JIxqNl92ygcjnpHQ/HF/M/dfOc6WkkmeXSx77hf6ivPw/fF5Iu6GQcBCSh5tN2B8rc tW2DrkblnNtCRdntrGrrxKK0tm46/+TqbSbutR0OoHI4eEOKbxv6UifRDahNYWGkn6wD x8poVoVpRzy7k2drVQu7sI0Ya5otIcxBBIJyoSTIlsbRGqV8olRiD6lmwzQLVESCmxYd oiBaTZ5SNjVGw8Am54/8lI0u0lqoFBY47+DByIOtgtYqF2FzmwHSPBiGUx1olxyd1nhg ZWkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710156040; x=1710760840; 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=FOnGUUSPDhVt2hmPu4weKhalmHR2vV5a1NMlqOPGhZM=; b=wbKAxMwZVjrhFBrSaelpdo6s1jxb8WVQVQolHg+T3YzWynBR74jBi1fbCTWulVdf3y SovrzqycY2mekDoEmzA8gwnIBi7uzkrftZXF4SQ8VCp8z/sI6EUP+/wSgSTIza6wqajc 7dsvS52Gta9fuVCYfQZd8A/HM1utk4ikjapJsTLLuFuWwfUSyKAFKk1niEM1z66dNZLj cSfeV3h0hNMxyZTmkD1gjd19IBx65KqbDZLpUfzMYQQO1aRZcW9V+alVx955OXtWE1Zo j4ffePpfsSXFpbFugD3Fq5UuGdTYrbjEm5XBksZZLndQ/2T2mGIzfTsh6cQZ0IPOUCnN g1kQ== X-Forwarded-Encrypted: i=1; AJvYcCWES8/ymUPFPaw0/gySzBCWcDTM6JJ1TM3R3dfPHdVUu9JDSzGaM7dHsxdqG2JaW3DpIbUXt1vOdTpQdsaZ+w8QEbr+Yq3CwtxS/YG3sPV5IvOD7RA= X-Gm-Message-State: AOJu0YxPk08WTgAeaDGNNhEDJj46EgfLcYVzexkJHl5W17AYCOPK39DF tnKF6ebVaqbWwKjZj3k+A/arE2vgmXYLPlU1R8DXeTXurNsoJ3tvqbI7F9aVZb0= X-Google-Smtp-Source: AGHT+IHckBn7OVk6ZNbhFfGx+109UqdO7X75yFgk7cEh5ltxLP0S0lkQQAPlPytUbqRVpqfoZAqIOQ== X-Received: by 2002:a2e:9153:0:b0:2d2:9e6b:27f8 with SMTP id q19-20020a2e9153000000b002d29e6b27f8mr3942230ljg.50.1710156039914; Mon, 11 Mar 2024 04:20:39 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id by10-20020a05651c1a0a00b002d2aa0b0d01sm1075200ljb.82.2024.03.11.04.20.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 04:20:39 -0700 (PDT) From: Dmitry Baryshkov Date: Mon, 11 Mar 2024 13:20:10 +0200 Subject: [PATCH 02/12] dt-bindings: display: imx/ldb: drop ddc-i2c-bus property MIME-Version: 1.0 Message-Id: <20240311-drm-imx-cleanup-v1-2-e104f05caa51@linaro.org> References: <20240311-drm-imx-cleanup-v1-0-e104f05caa51@linaro.org> In-Reply-To: <20240311-drm-imx-cleanup-v1-0-e104f05caa51@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=1103; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=HJWqx05Y7sFlh+0kSF4Jp43KRSRtmVmSwPbpig+Jz/w=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl7ukDPDKCwBOTTQDaMy+fAoU3+mAeWJ79vy8hZ HXiIFHMrqOJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZe7pAwAKCRCLPIo+Aiko 1Ud9B/48QbueaFlREX/3zgbkla7nTCKzXqKHUxFNfTU0aFAnEG+CUtAhb+6cCPIwi6oHD+mONx3 rAkCur8LLUVLh9nVzExyPa2J8Q5BwXfN/Nkhesnp08Tf5l1PdYo5mAzE6yo0tfcmjZdHC8K9WcV w4g7PGdxRybCLJs8PlrR9Pr5xJLvylg29b9JTmugzVgK2y40F3xWWi0Zb+lbYHBQgguTOZapdYB foMN6HZnH1y+GbLZL3n/7/VwYRsYASaj3ALQs25mr62h/7lbUpy8sXtPEDvRvuAYVV2rpAOODJT b4Q3FFjDK2PKTczRrn62jy99/quRZ1HHaXCiyO0VsmrdQCO/ 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-20240311_042043_959451_11BC5C98 X-CRM114-Status: GOOD ( 11.85 ) 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. Signed-off-by: Dmitry Baryshkov Acked-by: Rob Herring --- 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 Mon Mar 11 11:20:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13588638 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 5A04FC54E58 for ; Mon, 11 Mar 2024 11:21:05 +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=hhdeGI5RuLXJkLwbka76LSwwK6CURMJHyeqYXnVTsZY=; b=jbWlOuDOSkDKDM eWFIvunEjExmSgEgDcUjGzWHeZarNZwXKM2aljPesVqWs5vSGuaEwf0cQIZ+Lzncti0qbNtDlfvfv 6Ht7g2NaYMaBbS+uEZPfZNMhVqhzNw0o2PvHDcO+6qSNZvNfgHNbHhrv8jFQ80GD8JXMGs13b1P11 GKYSnFlYv0Da6muvw4XG7tshn6qtjmpr+e2THWaEWwUoZWHGKUI48IcSDwVA/+mHS0bT6fm3VmsWO F7OSaPnbg3P+KDd5zNGEEzhM2gyCzHVeuaH/vpsHFNntkya7sj2N7Fs/DTw83inBxNcZI7qaiIuyP fe8PNSXSp3ZilcSh/4qg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdi7-00000001FkH-1vVu; Mon, 11 Mar 2024 11:20:51 +0000 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdhz-00000001FeC-0ggy for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2024 11:20:45 +0000 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2d109e82bd0so57543761fa.3 for ; Mon, 11 Mar 2024 04:20:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710156041; x=1710760841; 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=Zef0nzZ2xvfKTTGhbb7RG1PfMMOjv1sjApX9pDJjmRc=; b=RnqcPREgKjlyxigMmLL4Dvxb0UKmnEq1z2Mf/fLfLkXjaMX6qucsmyQtLoiexfKYFu LBCx3xjxIDrb0MGUhRIzT76Ck7EKg1YkYhBjZYFFxVLxEaOmA6g9f4RUAbzbv/oWDX+f /I6Gm4SPinSWc426UFu8oqc1bxZ+4oocSTiCgnT7yLByQ2h0RqK4p3A1rNYVq7oQ7DOq JuF8/JgIfJ1BhcMiAp2PUqiIO8HpL4bINFFFb3mcQuiouIEq78q1YUayytiOyg7ORfO/ oNiCwQ2CBEfgVxCm3nra/8KqXw+qsN30ehVrKuLXpxlWHFX8eqwpm6KXEstB2HJXnHrN Sn0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710156041; x=1710760841; 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=Zef0nzZ2xvfKTTGhbb7RG1PfMMOjv1sjApX9pDJjmRc=; b=Uz2d+8A03g6mjrwC8QUR8ZZsaMW/NsobUVBhfhKvTJ4FKa4b9IYOnRYYaDR5CWLaao yACmJ6EWCbLeDHLsId9Hn436ue5nXIY6tr0SA6npCMfxJLBnvu+6EYbVTRWBx+eUl3dk aTYHoBYF6fd3HzQ/rZMuReYmY2lWze0vcDW8lSkQSyKQgLDz/v45Q7xLW88pM1LPCiNq Q3FhAEztoRORkoy5dIfHDethkbLINxLOFyhqgcw6tIeQE4pncSv7fw9f/RDefpqgdSju p0CUD4bbgqXDg30Uks6T6l84RGWPlE/vZcmU0W65X/0/dpQWWbq+8KBN/VVQixux+u22 tyEQ== X-Forwarded-Encrypted: i=1; AJvYcCWOWJUWdhvebukI6zrm27IFpQhlwzcRJRIaDG7ICe/Ztcv8+jR70U1Rny6wwm/d+FVq5+CCluXocKY+U8TpzvR1stH1olsE72roNLBvRA++kA/QJYo= X-Gm-Message-State: AOJu0YwQ6Dl+PJOQ5RXjZpnIZp1Rpmj3/kGnZbxvJfswZOlOvztS8dlt 6vhIT+b0qHK1+aihgJAn+qMPkzp8RDIIcnY74Yc4v/nfMkCqL2zn1qiskXdDQpU= X-Google-Smtp-Source: AGHT+IGayv+PpX9zAAHSP8SflubaUb3k6JWZQzkHKZXejF/ylBMmobaETzEOak+dTBGpNFNxaR8l9w== X-Received: by 2002:a05:651c:1a0e:b0:2d4:49d2:a3d1 with SMTP id by14-20020a05651c1a0e00b002d449d2a3d1mr187992ljb.1.1710156040918; Mon, 11 Mar 2024 04:20:40 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id by10-20020a05651c1a0a00b002d2aa0b0d01sm1075200ljb.82.2024.03.11.04.20.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 04:20:40 -0700 (PDT) From: Dmitry Baryshkov Date: Mon, 11 Mar 2024 13:20:11 +0200 Subject: [PATCH 03/12] drm/imx: cleanup the imx-drm header MIME-Version: 1.0 Message-Id: <20240311-drm-imx-cleanup-v1-3-e104f05caa51@linaro.org> References: <20240311-drm-imx-cleanup-v1-0-e104f05caa51@linaro.org> In-Reply-To: <20240311-drm-imx-cleanup-v1-0-e104f05caa51@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=1357; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=Ur4bgiHo+4NL+0zs7qW21KEsP+z03vz9MHkP96MxsJA=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl7ukDYTLRCINK5qAZo9ZeD9v6zVyvNykpsNtd3 gn8XZDNDTKJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZe7pAwAKCRCLPIo+Aiko 1dGLCACi2am7a7E0ilLnUCgllinsWaJWythlIwTcuZOie4ikmbjYL4Luka6hmBbxx7mzPZT0T9K /v61fhn0eAbp3pvUrj+2Bi7N7fUszoaqRnsYDUqNThrQmNXrL88AHRHWE1KOKbcwVebi+hC6sBO dLiKou1b7bVLZiRbw14yy0IHSrbye1n0k9qq7gGgXwpVJHrEpFu7hAr/BlCrzOUCPfbS1MDOB2z O+hzrmfY5oZEcT3HZxr6QYeanQaye4pmmFnVEDe7dQUy+pbgxzJ3tNPyzpus3pVYQ6GikNt3bXB 7kiBHQMJYPpISn0Zi75Uc3XnIq/neudkPfEOQgcI7NSUXFA3 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-20240311_042043_236064_8E7ACE3A X-CRM114-Status: UNSURE ( 9.27 ) 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. 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 Mon Mar 11 11:20:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13588643 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 DEC1AC54E60 for ; Mon, 11 Mar 2024 11:21:15 +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=QwVOt22g3BUiDmHmHjvtFV2wj07z3UfVtzJnPPMal5U=; b=vhlMBLL/zbqaHg aLmAF5IU4d0NV+8RQWulxw9PoRHRINLxxgJ2p/67nO2VYawTVbrC4RqiZMJOCzJ8jUvZLC2ZR2d6x vJH9lakb6E3LQn8Gl19Eo3p7p/qOGe3RQtDYkZO43YIAJtYcuTSPX/pXHWyY2Mo6jvarSFAD7OkXm xNPwab+Hw1S0UHM61Ea/HK1TIf+39g8zZqcFIjhGvlLDTnzWWGSNzrwaJKzNIwNsQeBCZXBgkyZ0g q0u+nsJKl0QxpnHrmsvyvYhf/53D48znn8RT0UTevm4TwrBHoE24hCN8GKG3r3/ltVYCgNc3nsLv9 BLFOFVvtYVvDW5kSByXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdiF-00000001FsY-1k49; Mon, 11 Mar 2024 11:20:59 +0000 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdhz-00000001FeR-4A0v for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2024 11:20:47 +0000 Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2d26227d508so64258421fa.2 for ; Mon, 11 Mar 2024 04:20:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710156042; x=1710760842; 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=Y8Mz1SrrU5s0SvG5lNUUvBk8SH1QEwpuUJsxf2sSYp8=; b=JytZ+xESjYN1v6XdQ7BPxK4NgT1pDClymRz672ETqQfUVrauKisq/olasiRiCxtQWo /kushNkKlbenOCAaDYl3uAuA3kBEGy01IvCyxcFmU81iNiKkqEHfMt0CnmIoV7i7Gx26 sOTH1Br7kA+BWFrLThl3g6xDKYk698cm+Awu7f2lLNLBe28UIbMRoZFKKKXwjqLrpJ2L 9yn9NrVvEcBBFSrbZAQYmZh/BulEfSYaNuL37k2KJjIKuXtYnl0HP4G5Y91Fa7nmHtr9 31/NNQk1j3n6N98u/mffpYL48c1FOswzbRa45m0ZLC/Er29IaPUhcr3swYAtzxNgRzQ4 tHgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710156042; x=1710760842; 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=Y8Mz1SrrU5s0SvG5lNUUvBk8SH1QEwpuUJsxf2sSYp8=; b=aQpkEb2kvBEoU3JfAIu4LanOXRtH4DBW/Bmo7MUnDWybxBqQZN1S5N0Ygl/Ca1VPYM wjy9xlS+mmIcriS3Hs5sivCbVTzV2PN6JMURmyyMsgKvucMQAH3JvyG06QmbfHru5BcH P3TD7uzVMHDcg+X21tij3APuAtcDNPFdOFS3WXaNv0Eqk28fPbzpD6ierUyVJkTCyk4r XvrNfWwc/odmAjgSrp5ZuG78hvH2vyf70O3JUqlQ4nSTZkIdA2yOQwQ6m0Yj4pAOl20d 5E056umunANme8jO61OiB+erZmm3LMyvb8l7Q11kBwqsx9uXKA/iVZz0JPGxSWR23/l+ ncpA== X-Forwarded-Encrypted: i=1; AJvYcCV0NYHeNwV+bh4zJbip8GIA7TM2pQM6Z6AU6crzJn6iSl+zg49r+HaY8k1S2tT6/4e9kgOcsZDgPT75qRr6g+MwL+hbULUH9fx/HlQM5zvjytluKbo= X-Gm-Message-State: AOJu0YxygmmkJcMyALLHNfPIRT8CmLY6j1LR7HIhJ8V/7bSMhYkKG5t1 L2QFEZ8hJpvGiSLD7HwWgETH9laAE8QbyUl+UGZplIMbD3N1QNAPWbY3XUYiLS0= X-Google-Smtp-Source: AGHT+IGqAhe+1Se4Tmw4xu0A3Nkx9yGY4+FnsmQk4e2SdM2jX1oMyWDtYqtFTQ/d/Sc3k+n9g80tow== X-Received: by 2002:a2e:3306:0:b0:2d3:f352:3406 with SMTP id d6-20020a2e3306000000b002d3f3523406mr3846006ljc.46.1710156041996; Mon, 11 Mar 2024 04:20:41 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id by10-20020a05651c1a0a00b002d2aa0b0d01sm1075200ljb.82.2024.03.11.04.20.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 04:20:41 -0700 (PDT) From: Dmitry Baryshkov Date: Mon, 11 Mar 2024 13:20:12 +0200 Subject: [PATCH 04/12] drm/imx: parallel-display: drop edid override support MIME-Version: 1.0 Message-Id: <20240311-drm-imx-cleanup-v1-4-e104f05caa51@linaro.org> References: <20240311-drm-imx-cleanup-v1-0-e104f05caa51@linaro.org> In-Reply-To: <20240311-drm-imx-cleanup-v1-0-e104f05caa51@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=2276; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=otRF0WM2vzdwskj5zPMELQrxSXcHtXRqOyPOOstx8go=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl7ukDNBWN5PcXva2X3BynfIJxAxvscbxmupR6u Q+OGRG8YUWJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZe7pAwAKCRCLPIo+Aiko 1XJOB/4osTf+FfxlQ2fIHBLSA/xhZy3lpIvGKap6LB4bJ/znr81eejo3rbmP2tbHlcCb7m1jN69 u0Uarv0On6KIWd+tfUJkhrVa/0L9s7ZKLd3qYdStycR4YOxJLrAZmjyzj2dqjWd05m5IlXNJpRS 95yIOp8ilWbKOzUp/n++/0QrfM6+ZfuTW76c9w1QolXh2IssHXKwKcWrWkpWsfC4QX5t+d3OIm6 X1RFRKadRehNzHpmrp7zyFYtlBsHP/cgvEf6e/5a6RIZJAAtVN8PFOQdLOJ/WiqyXNE0ZIdQB7K R+YBQtQor6Cb68P6+ShVR3o7mkcMW0WiGg6Rgb7s5OS+1p29 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-20240311_042044_334203_11A86532 X-CRM114-Status: GOOD ( 15.34 ) 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. 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 70349739dd89..2d044ea1920a 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 Mon Mar 11 11:20:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13588642 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 3E240C5475B for ; Mon, 11 Mar 2024 11:21:15 +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=MY4CCTfk191YaxGhk6h/P2gycRkGkSX1X+AjE8Z92kE=; b=OZEbEkBKEbwift FUT2zMJSmsWIkhwMUrnyyLCQmqjzrP8I2VXysf4qtkl5ho7TSiW1PR7GZKwFqp6l5fv2QQHVsV8gf Q5w2l5jGoRRrNRlK+/Ce03mBLlVn//fUcT+xIk38COoTCWRHvRafNw4dr/xVLNKYa7Jz7a3lNasZm a7JzgNY+ovOomsILzcqJ9nKwyNqOh/6itqZc83kB3LFAt5s+Nx2rQE6pljSteOPRZC0//G8jQeygP qgdbNeQ2CE5Mw0xD7KGOqxt57Zh7OvzMR6sjKExM2ljsbR6e+xF7kjgg1craraxeWOeXKRdlJlJXP BNp3Q4WX786Rmxfp3n6g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdiI-00000001FvC-037P; Mon, 11 Mar 2024 11:21:02 +0000 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdi0-00000001Fer-1flx for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2024 11:20:47 +0000 Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2d4141c4438so64087031fa.3 for ; Mon, 11 Mar 2024 04:20:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710156043; x=1710760843; 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=Wz3UhJ4xYSdgm48WihXb5Ur775HB6HGFpy/cnlygSBk=; b=LpHRWNA8kQqfyeIpS7vCqLoR7bMuo82+Ogo5raQg6emwp9UnNw2GmrV3D74P4oq4uE vG2B9ETN2QSnjqPI02iM5LtVF0/ig9PiIwRb8+8NpiDUY5+JyB6UV4aoq9DS24Ca7f4g pgxr9a8NOw8vXTUzA/QXD9gCip7uE+8bVGr8VOEWm0t95FPkKA4Ya5/f4MrjjZLngljT 1ObUvffVJsukg1QAIbTadtGjj44JGBHj0mVx+U9OvXna9eB6ZmKY/74MDtTzIKe0XitM kD7Z4clyeEPEprjZAYYh2WjPjRMTr70whEApBN/cYImh+li2G8YKQkwrr1VJIsdFeAn3 Rb7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710156043; x=1710760843; 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=Wz3UhJ4xYSdgm48WihXb5Ur775HB6HGFpy/cnlygSBk=; b=RIHLSBq6S2Bt4rCcIFqtXR0BDq0FE/ZnlK46fYn5lrndRIpz3rOkvq+OeQO3EzflgX Rx/9iuRd2KSB99nE3/BTD74ei9lvRKct9PxELEYgmwzDSDEKiY66raymNm9OHwIt6PVW HQo6mpqyb91/Ny2cQnIOS8zAiRQ80nLmANNSp+/KLLB7K7RG6M4JAtTo0Fqhe32/2Tiq vxPSU+2SVgZv9IBwZjtzBimHcjz4ZpCnmwLLQKt8JdrWX6Yo6pjpOejw8cARWA1d8j+n lmVWTwW4AFVR3/DrPWioqBh4PCPyNiZ/j1/Bg/vPUF4wCX7ioqAuBD4w0LrFF6RlI6rf qNlA== X-Forwarded-Encrypted: i=1; AJvYcCXeqK0LGKuw291UnykmytgT8859qMST/U7XdqK9OMNsiCWYUHUBVyBdZYiYRQTNWRymoqFB+YP+7jN4D9BFez2UVz3kLrsEbk/wzOCjfJxl+VmdXkA= X-Gm-Message-State: AOJu0YxWj5jSbtoFzpvF73ZGLXxY2xY4y+b920z49D/fCtpWIOyYY1+d pK4hwxjql9genepKbw6IXPPqIcuUBuvM7k1Mn3FgmXRmVRfBJGolHigfwn5pT+k= X-Google-Smtp-Source: AGHT+IEcrnshK1w7qRhGX7J1qQFS8RoY/QO4JJhjPIx4w6CjPb4xuFxESOZluR6Yd9MQJXRSu/TXJg== X-Received: by 2002:a2e:8610:0:b0:2d4:251f:c151 with SMTP id a16-20020a2e8610000000b002d4251fc151mr3665506lji.46.1710156043032; Mon, 11 Mar 2024 04:20:43 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id by10-20020a05651c1a0a00b002d2aa0b0d01sm1075200ljb.82.2024.03.11.04.20.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 04:20:42 -0700 (PDT) From: Dmitry Baryshkov Date: Mon, 11 Mar 2024 13:20:13 +0200 Subject: [PATCH 05/12] drm/imx: ldb: drop custom EDID support MIME-Version: 1.0 Message-Id: <20240311-drm-imx-cleanup-v1-5-e104f05caa51@linaro.org> References: <20240311-drm-imx-cleanup-v1-0-e104f05caa51@linaro.org> In-Reply-To: <20240311-drm-imx-cleanup-v1-0-e104f05caa51@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=2635; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=yY+O3A74gJfvweSEVBsGsRQtsdkU2oXgLZzLvkdvTv4=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl7ukDC6SGkJoT7Ekr4PsAmo6dSoo+Gf1u0/3DJ gwDjZoJ5MOJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZe7pAwAKCRCLPIo+Aiko 1eKzCACTNs01xJGKPm5lsPlqv3CTCY8fSPtMKnuroBpExiZnViiBAeih4jx0cWvFr26CtQG5IrU vyrmbCYeiaVx9uWqcEowRyXWnd/1/meuKQOtLzH4cpi5m9XG87ShQAIA9fJuAV01Fi14cE0WsaX UTmqC85Yojt6AgOoBPLvrUc5Mbm2gGDYn/jEi0g7BqriqTuQUyrdm7+MP0ZjxZByGFX4/ZWPMOJ 6P3N2KUmYFQ3wFe7faxji1b/pafP25ixxYdJLAZecg4sNjlTL1xL9uJKY5/D611m0rfnbVWdzCl ycYVsgSfXOyYCEPyVWBWgA9ejuncjHd3kJFVaCnaZH98NizX 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-20240311_042044_523939_0E428D19 X-CRM114-Status: GOOD ( 16.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 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. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/imx/ipuv3/imx-ldb.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c index 71d70194fcbd..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; - void *edid; struct drm_display_mode mode; int mode_valid; u32 bus_format; @@ -142,13 +141,16 @@ static int imx_ldb_connector_get_modes(struct drm_connector *connector) if (num_modes > 0) return num_modes; - if (!imx_ldb_ch->edid && imx_ldb_ch->ddc) - imx_ldb_ch->edid = drm_get_edid(connector, imx_ldb_ch->ddc); + if (imx_ldb_ch->ddc) { + const struct drm_edid *edid = drm_edid_read_ddc(connector, + imx_ldb_ch->ddc); - if (imx_ldb_ch->edid) { - drm_connector_update_edid_property(connector, - imx_ldb_ch->edid); - num_modes = drm_add_edid_modes(connector, imx_ldb_ch->edid); + 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) { @@ -553,7 +555,6 @@ static int imx_ldb_panel_ddc(struct device *dev, struct imx_ldb_channel *channel, struct device_node *child) { struct device_node *ddc_node; - const u8 *edidp; int ret; ddc_node = of_parse_phandle(child, "ddc-i2c-bus", 0); @@ -567,17 +568,10 @@ static int imx_ldb_panel_ddc(struct device *dev, } if (!channel->ddc) { - 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->edid = kmemdup(edidp, edid_len, GFP_KERNEL); - if (!channel->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]; - kfree(channel->edid); i2c_put_adapter(channel->ddc); } From patchwork Mon Mar 11 11:20:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13588645 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 A4DF2C54E58 for ; Mon, 11 Mar 2024 11:21:27 +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=f1v8Edoqpxd5D+dKU5hTYS8055bGcmmXIigSZB/NW0o=; b=lr3IT+T8KduCkS /xOwyySrVgvHEUDJQZOuVTWJfgIAeqT04t1gAxt3P4IleVJDY6+0czeU5b/apfQV04o0KExzr4cfW zt145GfUadMWMk1EnvD0rpvLBobv0MzToDk1e7Na7+NVxQ7wZsfH7Y8oBBQ5nSmDzgDziAaZLRrRz haskbC0woEHiwZRYP4J7ZeU4pW1VCDjPNzH8PvKxaXqOaQjQaURTjGWw4NUCAk2gTN51x8peRPIsD YfXMzrFdVxVzPgrt7YX9/CebrHcAsvZnlOfEqmL8H7TNLY4orUDkzgv9zeEsD0z/Bf4XACZFdN5lH siboR0WYsyNdc+pz3EJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdiT-00000001G56-3nTb; Mon, 11 Mar 2024 11:21:14 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdi1-00000001FfV-40JP for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2024 11:20:49 +0000 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2d2991e8c12so40233531fa.0 for ; Mon, 11 Mar 2024 04:20:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710156044; x=1710760844; 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=hSjZJV2J4iFvn9E2c3TLDDuj0HnPcaUsZUNdMjQiU+w=; b=Fp8Kcw9bA7pJ1fyXHieeboNDou0aY0r5FvsN3rPprxz+rNOufovlV5AShhvIEstkqz +9fFQKiI63ktC4qOGyYyYRVk0eewokZrX5+UF3bH+VZpULTkbuoIW6+Q8jMciGLEqs6p 9/IxrseWOKkzy0AqZi4pq8WpSUssXE3g71id5KkNAK0vNryGFsZIw7OVzUAnTGLU4nG2 0qgIN37oslD3XMgsbKN8sL6MFmDPf0ftTAy38jMHiGZAk74XYnKRnPbmOSoA/cgTW0eX Xod7yke4VCDgIJ97KK+Q4y/NUF/7EI6iqq6IeOJ7X3pDXqxmZvQK3rIuzJZDtMaLZeJl 3E8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710156044; x=1710760844; 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=hSjZJV2J4iFvn9E2c3TLDDuj0HnPcaUsZUNdMjQiU+w=; b=SrSAznBKPIju7GmLSylc0vTTWtle7scrHb9By9bTwro0QzyRMHstrB9qpEwstqW9ri 81tOVdPgvojh/PRKeM5apDjolE5SLfZ900Yjij4KbB2tUWdQsYu+OiUy1G+7F/ogYCAN 0DxkNmu8FmNccIIjM9EQyvz9Ffwon2ZSTOsJYzOFlVbpzLL6qNPm7z7Vy6dM8ktYDNpJ /eveHGcPch256GR4TLNWEJFsrXb1GABoxMWJgipTHcKMeMO8v82sAP14/3+aXaZxeEhv 2W6a/eku7OYbO2GqdxVQpxYoad36NBCTeGDIzLvxHsQKQlUc3jdKA9GNXHFQROviOgIh VFbQ== X-Forwarded-Encrypted: i=1; AJvYcCV4Nejlu64tM3Flz+53wXMFfgUaWk+bhXBXTI6O5ehpAoqOyn+jwS64dRZhDEf6vTvJE+jbF96QRIOnAkA+l3dvC1Jf7BqX311as+6LNNylcSqJ97M= X-Gm-Message-State: AOJu0YzGDpo4v8mVBLguhNDGRzwdTz9/TyOYcqE3kIzJQc7/mYA3EZ3f pOEJ4x93tmibHrQujbYcEOb9xTFaJEfIqsTDYFTPXnPhon5CdWgRPwqlBJWy+JU= X-Google-Smtp-Source: AGHT+IGVBBPOzyokNgjue9WKbIEUBC9+ZEPyPANqxr2XeItpXiFyzfNywUSOajCNnI5OsBJpltZThw== X-Received: by 2002:a05:651c:10d4:b0:2d4:2839:96e7 with SMTP id l20-20020a05651c10d400b002d4283996e7mr2218502ljn.20.1710156043819; Mon, 11 Mar 2024 04:20:43 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id by10-20020a05651c1a0a00b002d2aa0b0d01sm1075200ljb.82.2024.03.11.04.20.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 04:20:43 -0700 (PDT) From: Dmitry Baryshkov Date: Mon, 11 Mar 2024 13:20:14 +0200 Subject: [PATCH 06/12] drm/imx: ldb: drop custom DDC bus support MIME-Version: 1.0 Message-Id: <20240311-drm-imx-cleanup-v1-6-e104f05caa51@linaro.org> References: <20240311-drm-imx-cleanup-v1-0-e104f05caa51@linaro.org> In-Reply-To: <20240311-drm-imx-cleanup-v1-0-e104f05caa51@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=3942; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=m11CFuEduJHyQCwHyCLs0Yco+X7++CQ3XEHXdiz1Oro=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQ+q7lyzZwW55NbIlAr7rdxgeZNY/9dh1/4JwdolFL7V/h 4b+77PsZDRmYWDkYpAVU2TxKWiZGrMpOezDjqn1MINYmUCmMHBxCsBEnnuz/2bVrK7gyG7Mncuq H1LIKPtxQZDpfUF14RK+hz+kDRKerLg2feeXWZwF/1+bvWHM5qnX0pYpNedy1Jl0cL9rvG/g/83 1miVHWRnc/181Syx8soApbnkp8xLNtm3SW4wZEpzf27nkNqvaTK1QvP5daI5/o9NV1pxbvxvVV2 yfsTPslprKsXe39rSc3et5KjanUJKlWenjorqJZ+YIHL0as5vPK7j2oPPOA0XJHAv882KNtu0ql 39+ktnxxv/HZ6PNEmf1st3deWBWgkytXjfn4vubvfxDejR60v4IvNbWOdnh6LL8q+KPXSu+n2tx jfu8/ri8ytUPKcHlIX+yW01aNvw8u0jogWzWMhuRVYEhAA== 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-20240311_042046_198309_A2742AB0 X-CRM114-Status: GOOD ( 19.67 ) 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. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/imx/ipuv3/imx-ldb.c | 72 ++++++------------------------------- 1 file changed, 10 insertions(+), 62 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c index 1924d8921c62..380edc1c4507 100644 --- a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c +++ b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c @@ -70,7 +70,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 +140,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 +468,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 +537,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 +647,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 +689,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 Mon Mar 11 11:20:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13588644 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 30101C54E58 for ; Mon, 11 Mar 2024 11:21: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=0NwMWq1EQwKlNZOOdWKcOLmwCabDj9+d/YS+GY12k4k=; b=eAeOTp9cuJ9URK H1cG5ujQIOjrL9EQvQDFO8Szv4zBS0MDtaWaDgohaeUHimZ3YfynlYTHM1olq5CPoZ4YwsKVeJqHJ tJs/Y0GGbfoctXEJ0kXws7l3kCwa5BAhqOwSEtQhFCznAsxS0Yj5iMC+JJhhZqWVefJxvEdwjYyqm zWGrC5eU7G4v7Rj6KyhIAOQgA46voRcCRcMr8x4b5vxoJ2eQm5mL/ATkm9fdxZjLmP/vKc2k2m+wq /jf1DsqtaZohfMU64Q4KN0xS2ruvm32yx7LMrtbNhGydXoIt6WQNNCUduK1fhAyJh3taDfG28PqQA 7JVzv3YYjcamdfaAZtdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdiP-00000001G0n-0HIs; Mon, 11 Mar 2024 11:21:09 +0000 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdi2-00000001Ffy-3L8q for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2024 11:20:48 +0000 Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2d269dc3575so38685011fa.1 for ; Mon, 11 Mar 2024 04:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710156044; x=1710760844; 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=gQrqHaLGIND2BZg43nPVGmV36Lb8S+V9//5yRGyhuc4=; b=jfazLA12pTsngpYTB/040iRNTOwdYz2ipZbISKzyTK51oiMnaVc44pxsbWA3oNuTaQ XJA9Mkkh36NCKFvAaqF92vQbcHG8v2WlfQ1S18zpxoD8u06uySur7O0W9CpyG8cyzjQA DWrrUKyqgEwzOHwId6jRIs9yfVc0gp3coRvLsKHDu6NIpVx18BxpK2tfuqjl2K4MkaMy BnL2bVRef6Q8rExl5AfyLkUE1CUitSbLzT/CMKpabeOp0PR0jWAIJZoM1ygf4nJO5mSZ GJzxZCgYqp90kx+RWszVihSlDZwskn+Cn62qMgiSa1/h8p4OlQq9rfYwaAZt+bAZCmFz lYqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710156044; x=1710760844; 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=gQrqHaLGIND2BZg43nPVGmV36Lb8S+V9//5yRGyhuc4=; b=NPdMZC3TBBTgUZKwByE/kToDD14FgOiG8/sIUKOCcYHKoqBfU//IIk3UZ6wjIApb0v x516TgbLWYghbds5I22ho1xA/ahf6iAWiB1MyNKUk6JlxkHrech9eVM+BA85Q9oMYYbk n31CIwQxrKeUsy/I28bHcc55XbNH34wTSP4EZU4J09Mz/+YlMU78YFsBqDN5xXwm1kHw ICYGccTx0mLtpy5+FdY5IJhe6kGLcG2refGKhnX2zZQAnS50pqeEjE9DJlRvpyKoj3Oq ObOwQJneUja7JBQ9595JvWs7iBjO/GEoVTuAYI0ALQ8hb1NW4N5B0nYSeQEX2NKxUAgs J+4w== X-Forwarded-Encrypted: i=1; AJvYcCWFBLBYfQ/XCN2Qt/9VGEu3AWj2qrWDAtNTmuifouMwEvx9jLGr9jxcqJpkXLQjmv0joSgye3E9fNeCmlicp9uuU44KfHpd44cnC1Wi2t7Ey9sBbrc= X-Gm-Message-State: AOJu0Yxj/tWld0JJc4AT9Qa0Vdev4tXIOTPBg2jtQYDyeMOg2A5UKHm0 al188nQqeqgSzFLs6KW1MN9v+dY5UbUf6sViQtvxsp1kh9kvKbsmUlZP1Mp4ABQ= X-Google-Smtp-Source: AGHT+IH6UahIcH0xokwgC7YJw7isfzx6l8sVfamAGKfOqjY8LOUzxiZzIWKs2Nzu6jrVlAhbY6hHJA== X-Received: by 2002:a2e:9c06:0:b0:2d2:31a8:cb1a with SMTP id s6-20020a2e9c06000000b002d231a8cb1amr1858765lji.13.1710156044598; Mon, 11 Mar 2024 04:20:44 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id by10-20020a05651c1a0a00b002d2aa0b0d01sm1075200ljb.82.2024.03.11.04.20.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 04:20:44 -0700 (PDT) From: Dmitry Baryshkov Date: Mon, 11 Mar 2024 13:20:15 +0200 Subject: [PATCH 07/12] drm/imx: ldb: switch to drm_panel_bridge MIME-Version: 1.0 Message-Id: <20240311-drm-imx-cleanup-v1-7-e104f05caa51@linaro.org> References: <20240311-drm-imx-cleanup-v1-0-e104f05caa51@linaro.org> In-Reply-To: <20240311-drm-imx-cleanup-v1-0-e104f05caa51@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=4608; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=tuqhthD0wjId065PEfgLTntUyAjkA53+U+9j/aDpxnU=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl7ukEmhT2g9v70pVpRjRRLZO32HM8uH873G4o0 jbzBvbpyEaJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZe7pBAAKCRCLPIo+Aiko 1TO3CACoX3ore58uBQubmaeZX8paIziCF9nJNUNQw1M6qI4YJt24XMx4KTE1rP1N0ERtW36OhF3 JSPEZKvuvF4Vad7qPhkOIWVvnfLdAlPnTBzXpq/i16Sck8cKpYiLrcyw1O+VaCYJV4ji2ZW+2Pm UNfneiaArfU7I/wp/kCJuFGuesJH/CRIi9VYoOshitCjE29rsGcRHqJ/7o1xD0bgLYavkxqlELb xnbA6U+X86xaFV5p7Rui1hs/qiUWrkEo9wAIBl/OWPQ8IbIds40CJaZ/+uGiBvfR1SJUVFUhkLp 8EAuK7OnT8wCfWs3qqOtdU8v98W20yDUBiU5CLcly6Y8uTcu 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-20240311_042046_905080_31C402CF X-CRM114-Status: GOOD ( 21.43 ) 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 --- drivers/gpu/drm/imx/ipuv3/Kconfig | 2 ++ drivers/gpu/drm/imx/ipuv3/imx-ldb.c | 44 ++++++++++++------------------------- 2 files changed, 16 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/Kconfig b/drivers/gpu/drm/imx/ipuv3/Kconfig index bacf0655ebaf..4e41611c8532 100644 --- a/drivers/gpu/drm/imx/ipuv3/Kconfig +++ b/drivers/gpu/drm/imx/ipuv3/Kconfig @@ -28,7 +28,9 @@ config DRM_IMX_LDB tristate "Support for LVDS displays" depends on DRM_IMX && MFD_SYSCON depends on COMMON_CLK + depends on DRM_BRIDGE select DRM_PANEL + 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 380edc1c4507..74b41a507219 100644 --- a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c +++ b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -65,8 +64,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; @@ -136,10 +133,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; @@ -194,8 +187,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]); @@ -234,8 +225,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 @@ -312,8 +301,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) @@ -347,8 +334,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, @@ -641,13 +626,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, @@ -659,15 +646,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 Mon Mar 11 11:20:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13588646 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 54493C54E58 for ; Mon, 11 Mar 2024 11:21:36 +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=Ho3AivXZC/Bb+nvLHSGAbatCACXwOtscWuSxhpcOVJs=; b=AZ+NsZ2HK8RtRW 4DohmsIiOKIZi9R2z9cwue4Nd/qPnatgAb3mkow/5OuT3gnvr7rzZAmHB3Vn5YFQtQPrYtaKw+YYf aMWifX8730joGuGvKjU+Plm0iwu/BVo3xR+RGfd5t8RUDF8Zp0TYoA9B8OgyUahKTE6svW7XGmeOx zGRfZ99GIavhFd1qp2ebPqw48F980H2I+5Q7Uo+1KR/LX/WNDhVm64zq7/Yb079JnyA7OJZX/c69M Agr2SOaam+qN6keSTU71dXgUhk8ha5qwL88KJWvjmQiCvssOn6oHkfFKWOkPvvyb89v3Qcew3cY0N OYprEMRzc8IStVd3H/1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdic-00000001GBE-1Z9Q; Mon, 11 Mar 2024 11:21:22 +0000 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdi2-00000001FgQ-3a9Y for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2024 11:20:50 +0000 Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2d3f4fef377so53780001fa.1 for ; Mon, 11 Mar 2024 04:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710156045; x=1710760845; 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=ckBzZnx48RdUyZurHjiq3WjM24jb9QKg0w7hY9V6JDQ=; b=m30I16cCbtZaTXWafXp0I1yzBKbxUXE8xzuYDeZ1gOXl9kylmfsbQc57vrfu4GIkO/ G0kh8k7Gb05RWCR31+gA7UEzRUV7YydBecewvpqvqU99LBrnjlCTwd1Ei3NHowVFZBA/ rJWe+SmvbJyXl9CZffl3fnoiqpXkF4TjjiuF7qToPMmAkzggHEhi4fOzQLboyydWs4Un WERvKln8N+xkjzrvgmWODKL/MpzsDxvWoaFRM5j+NifFH5p8dwUi+xnhpmgj2sE+2WEp U9S/Zl56vEJSAv5r0FXVAlePpQ9q2KlwVYPX/Em+WnZWFPcoBLV2qEdgwNIyP8NoH07s XZQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710156045; x=1710760845; 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=ckBzZnx48RdUyZurHjiq3WjM24jb9QKg0w7hY9V6JDQ=; b=Z92rTyoe74f8L6iI70TqWjaJ13bYKWlhtqakfsl7cwc7J3axtbOp4hj0Vul0QMPQDr tdzH/h9Af+MH+YlTibPCpimfRBwTDNpiPvzBPlJ48mY3y0ejoAiCbW441KwWLvXw1Al5 G5a5zbtNhbR6OCjIFDGHu5jqDXB/oETLjgiIm9A4eifc9PQeJv+Sx+RWCPw+lvrbe+s/ M3wZWNbkowttF/pU9iCMbO1lzCYVpLozWpohfOh6SE1/4qrSFBJOyFaSwda0SgIBL8NU VHfyvqpW8G7dkuoW9pRcPKwkN2vgR67KLuOtHiEVyE4k8rOy9zDx/pZt0rpc2CFC0D24 ou3A== X-Forwarded-Encrypted: i=1; AJvYcCUUw0xLksvR9VeekO8Si2c2QJ0ACazffUpDYVszQqjuJRvysX1BfTiqvDTKrIRctfeJyWrlaw37lnEodet0Mt3nd/Xe6clOt5EEBKO8pHHCfsCw2Z0= X-Gm-Message-State: AOJu0YyixMaFXzSiwQyhCHt8wiEFOaHaQPs0cvOEWbok76ihvEnmo8PR 1xVNTaxhYwv0KJgO42xOEzYhKdcYaDiyxefkQ/8u2khHs+seK0197BFyzyjiFtM= X-Google-Smtp-Source: AGHT+IEMW6pZQ2eG/0ZxeAV9RTTKWsbi9/nUH/kQZ1SQ/YTeqp2eyBCBOwwst1bBxtobs1RXGk9A+A== X-Received: by 2002:a2e:7812:0:b0:2d4:142:488a with SMTP id t18-20020a2e7812000000b002d40142488amr4067596ljc.8.1710156045463; Mon, 11 Mar 2024 04:20:45 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id by10-20020a05651c1a0a00b002d2aa0b0d01sm1075200ljb.82.2024.03.11.04.20.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 04:20:44 -0700 (PDT) From: Dmitry Baryshkov Date: Mon, 11 Mar 2024 13:20:16 +0200 Subject: [PATCH 08/12] drm/imx: parallel-display: switch to drm_panel_bridge MIME-Version: 1.0 Message-Id: <20240311-drm-imx-cleanup-v1-8-e104f05caa51@linaro.org> References: <20240311-drm-imx-cleanup-v1-0-e104f05caa51@linaro.org> In-Reply-To: <20240311-drm-imx-cleanup-v1-0-e104f05caa51@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=3282; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=OGMYbHUNFSBoWDKd5qcnaC+q5URHBrI8YOz8as3SMBY=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl7ukEmKCVfBgBFOhYbAaVKsEoQXHYa2nHGB+FI B/IfPnLM+KJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZe7pBAAKCRCLPIo+Aiko 1dMtB/0U8ABgNlb1PN73gBnvPSeUziNmQIXLiqz3b3XbXU1T/vxmrmcz1YCyin30tBvBArKJHnd tw7gKlVkt9zj0FFgDl+nXrsVUsq/O0HrXchzBp0mFSkZn6ey4i4pE8Xumq9UwpBTvvmQgIi/Y1P wG2D6ilDYD0JS1rRYwzSCvvJZTTL7X2XFL+1F+EATU3PEiYjXTy66AXNyk3nzNMX+wFyqrhztJo NaWGXWHfNz7OISUCLnoL93MDYkx9ZlA493hHW7TZ4SEn21yg3w/IWNqC0nBfrZxWs7xB1qZkDvI vnVaE8D1u12FsGDOC2n1Sb44NrEoZrHnEfMK0vgzXKfREcV2 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-20240311_042047_081222_0B66924D X-CRM114-Status: GOOD ( 15.38 ) 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 --- drivers/gpu/drm/imx/ipuv3/Kconfig | 2 ++ drivers/gpu/drm/imx/ipuv3/parallel-display.c | 35 +++++++--------------------- 2 files changed, 10 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/Kconfig b/drivers/gpu/drm/imx/ipuv3/Kconfig index 4e41611c8532..8aaf2441bcef 100644 --- a/drivers/gpu/drm/imx/ipuv3/Kconfig +++ b/drivers/gpu/drm/imx/ipuv3/Kconfig @@ -13,6 +13,8 @@ config DRM_IMX_PARALLEL_DISPLAY tristate "Support for parallel displays" select DRM_PANEL depends on DRM_IMX + depends on 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 2d044ea1920a..9b60bfbd16e6 100644 --- a/drivers/gpu/drm/imx/ipuv3/parallel-display.c +++ b/drivers/gpu/drm/imx/ipuv3/parallel-display.c @@ -36,7 +36,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 +55,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 +79,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 +216,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 +292,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 Mon Mar 11 11:20:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13588647 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 3E00EC5475B for ; Mon, 11 Mar 2024 11:21:37 +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=N2hoZNdioOgzs5PWWv+CPG4JIhwcyFjLf28URteu490=; b=A3RYQ4rsDexfAw S9qoPm92x44aFaHG3/Z7o4ZI96kZJ2b0/PNh2bdh6PceJ8yXeSfJ7D/g18SvNOiAp/w3Pd9wnAr5e 7huCVArMBtB+2qkou3yCKAfbZ6HbTC55GGxCWtiV/HXfr2129EbSKSQfqpDHMXpPnJFO3PnNDkZLH x7KDCERj3AXMBE0i75Fi5NzcQos8qcETNrp9D9HQlbWKD+my+GwMAZk1vY3Fib2Hq4YwVF85yXZIQ AS5beQVHmVkeNzE2oO/Mdqd3BwNmDrKynzPAQUAMC3Bq/QcohVTeTBqMWa71eMAB3tXeQ/h6HnVFO WCUrgoeVMgw29MeagU0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdia-00000001G9f-1JMU; Mon, 11 Mar 2024 11:21:20 +0000 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjdi3-00000001Fgt-37sj for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2024 11:20:50 +0000 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2d220e39907so69056181fa.1 for ; Mon, 11 Mar 2024 04:20:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710156046; x=1710760846; 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=DIYz4B8ZOSG+Y7DKuT4sPVVM3JvUfc/5hNpGzRUmXfM=; b=qpaXp+1NK2XRJL6I2RC11N/tzXaYzd55MTwKTgEE0EJSWWazIAd1Ae3xRgefc/yK0W F/o3yvjWESk4DzIN9mwI/V6pnZW0P2LOWT2dj9qJsPBT+1sCOc4Yn3LYQ09KkKkfcLTb IG3rgfVZgDjlohOKTdnhWAcfR64aLPiHSrBKUoqfz9C1Y11+d04EZ9+hhVqcSsjyLC/p CYqQ25eo+nrycRftvtXMyyUSLgdHqqF1HTgE9W95nvERdDqWoK3AezxKBCRtPW3mrbsR x4jwITINf1/doxzypca8Sp63+dBWZfcUR13ewnsn8NkuN18S/KJKyW2Ppgvd47utl3nm tbCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710156046; x=1710760846; 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=DIYz4B8ZOSG+Y7DKuT4sPVVM3JvUfc/5hNpGzRUmXfM=; b=GxmyILoDy9bNq/u4r/CoVAiEl8F9cKwY9BRjzeksWm1xcS0Ih6MO4hSQ+N6SYePFte OUUQ0P9P2wpmaEN583Z1O6hScgdaKUybO2w7T4xOhUAd7quJwoP3WaEKbqbPq7OjtE7l lokB1yQiAJcHbCZ44a3uro1KCPVqahlwGbuahFmmhfrlIPIt994bpdoRcse5dRukiZmY k2QQ2+ig/0Um0M+ecMG99Ci7sYKC3qKSfARe6k39aSf3jtzKu6VQeiEe8zGEb8XG4jZY xJwvoKVMFNN0qoFhRdbqoYrPuLbzkfdvCmUy+gCOfnn+ZvfalWGNOEliBsNP+kclhUzZ ZKpA== X-Forwarded-Encrypted: i=1; AJvYcCW3oE7/nS7Sd8NxlT3Uo9Snvty/cryY0q9OX/A+C4DcEZ738ACKhKkJ/wTnc09Jpln4C+7e7XlzX0zWuPhoH2TlCFZf5zhxNMW1UpAMtAyq/UTd/l4= X-Gm-Message-State: AOJu0Yyr5yD79o6nE3oCK+pfOLtTW//VEFasVkCf4OOzkC5qLTthFU2A GNlSUdzJVtyS0MW/vOwP003Mhx6IoZTL7vvh7lH2+z4eAZ+18xgh0NCVEX5bVts= X-Google-Smtp-Source: AGHT+IGU/7/dwO3YAwA43NYcOB8G8o2RoIjLDiWIgVyxQPGvLLiCKMFIsjTxtWIzaK9CURl38ycFKQ== X-Received: by 2002:a2e:7c10:0:b0:2d4:24cc:b499 with SMTP id x16-20020a2e7c10000000b002d424ccb499mr110587ljc.15.1710156046254; Mon, 11 Mar 2024 04:20:46 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id by10-20020a05651c1a0a00b002d2aa0b0d01sm1075200ljb.82.2024.03.11.04.20.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 04:20:45 -0700 (PDT) From: Dmitry Baryshkov Date: Mon, 11 Mar 2024 13:20:17 +0200 Subject: [PATCH 09/12] drm/imx: add internal bridge handling display-timings DT node MIME-Version: 1.0 Message-Id: <20240311-drm-imx-cleanup-v1-9-e104f05caa51@linaro.org> References: <20240311-drm-imx-cleanup-v1-0-e104f05caa51@linaro.org> In-Reply-To: <20240311-drm-imx-cleanup-v1-0-e104f05caa51@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=5036; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=3H9fCE7mPj818x+Q1/UwHSmVLPut7h2b14rUQzFEIk8=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl7ukE4AP8YIIr6aZRHLy1srF2zcsnsshABwwfU UzNfZKIAweJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZe7pBAAKCRCLPIo+Aiko 1bcDB/9jr4bSDVP/hHMlo3Q1hfu2LW9AjVffzljxaiUsM+DUqg9thoMTnwySV+eJjTqvqoI+6mt LxaeK7GPxnXVK2xLnErJRJtKZptWuUNG9RDeg9yP6IGjB5e00P5FwWVAFSIyikE2lKvVJLu0bZA RoCbHEhlqvKOrGF1GoSH7c6QR06zGxgX67Px4UjwlOB6nTSJKJ9+F4lGoEq4NaXQAhF1FjW9zK2 INz2yDbxUjE1UQuL/rNQIz0j+twJfXxHAmT/NI6Iz6AqUgvrzCcM2S0Pwks+I3cUZdOv//uTfxW Y57+PAdwMm8csec7+NcVSt8gO5zI5bXvT0HnGq88WbzGaV3W 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-20240311_042047_959752_5486E1A8 X-CRM114-Status: GOOD ( 18.47 ) 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 --- drivers/gpu/drm/imx/ipuv3/Kconfig | 10 ++++ drivers/gpu/drm/imx/ipuv3/Makefile | 2 + drivers/gpu/drm/imx/ipuv3/imx-drm.h | 5 ++ drivers/gpu/drm/imx/ipuv3/imx-legacy-bridge.c | 85 +++++++++++++++++++++++++++ 4 files changed, 102 insertions(+) diff --git a/drivers/gpu/drm/imx/ipuv3/Kconfig b/drivers/gpu/drm/imx/ipuv3/Kconfig index 8aaf2441bcef..119e1431177f 100644 --- a/drivers/gpu/drm/imx/ipuv3/Kconfig +++ b/drivers/gpu/drm/imx/ipuv3/Kconfig @@ -37,6 +37,16 @@ config DRM_IMX_LDB Choose this to enable the internal LVDS Display Bridge (LDB) found on i.MX53 and i.MX6 processors. +config DRM_IMX_LEGACY_BRIDGE + tristate + depends on DRM_IMX + help + This is a DRM bridge implementation for the DRM i.MX driver, which + 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_IMX_HDMI tristate "Freescale i.MX DRM HDMI" select DRM_DW_HDMI diff --git a/drivers/gpu/drm/imx/ipuv3/Makefile b/drivers/gpu/drm/imx/ipuv3/Makefile index 21cdcc2faabc..dfc495e495ec 100644 --- a/drivers/gpu/drm/imx/ipuv3/Makefile +++ b/drivers/gpu/drm/imx/ipuv3/Makefile @@ -8,4 +8,6 @@ obj-$(CONFIG_DRM_IMX_PARALLEL_DISPLAY) += parallel-display.o obj-$(CONFIG_DRM_IMX_TVE) += imx-tve.o obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o +obj-$(CONFIG_DRM_IMX_LEGACY_BRIDGE) += imx-legacy-bridge.o + obj-$(CONFIG_DRM_IMX_HDMI) += dw_hdmi-imx.o diff --git a/drivers/gpu/drm/imx/ipuv3/imx-drm.h b/drivers/gpu/drm/imx/ipuv3/imx-drm.h index e01f026047de..57a95926c492 100644 --- a/drivers/gpu/drm/imx/ipuv3/imx-drm.h +++ b/drivers/gpu/drm/imx/ipuv3/imx-drm.h @@ -3,6 +3,7 @@ #define _IMX_DRM_H_ struct device_node; +struct drm_bridge; struct drm_connector; struct drm_device; struct drm_encoder; @@ -30,4 +31,8 @@ void imx_drm_connector_destroy(struct drm_connector *connector); int ipu_planes_assign_pre(struct drm_device *dev, struct drm_atomic_state *state); +struct drm_bridge *devm_imx_drm_legacy_bridge(struct device *dev, + struct device_node *np, + int type); + #endif /* _IMX_DRM_H_ */ diff --git a/drivers/gpu/drm/imx/ipuv3/imx-legacy-bridge.c b/drivers/gpu/drm/imx/ipuv3/imx-legacy-bridge.c new file mode 100644 index 000000000000..4853e0c41ab2 --- /dev/null +++ b/drivers/gpu/drm/imx/ipuv3/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