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: 13588612 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 4EFB4C54E58 for ; Mon, 11 Mar 2024 11:20:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6FDDD11258A; Mon, 11 Mar 2024 11:20:41 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="PQ5qEanL"; dkim-atps=neutral Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) by gabe.freedesktop.org (Postfix) with ESMTPS id DB37211258A for ; Mon, 11 Mar 2024 11:20:40 +0000 (UTC) Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2d4360ab3daso17880781fa.3 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.freedesktop.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=PQ5qEanLWhxDyjGRFa+eRYKfXJBLDVtULsbqUODwKQiZdrUQ6JkAWtOLCV3WSaLFel bmKzRmioLIIy6P2G58HZlmv0oBpAQURQAcFB9T+2gOvjpoYWYqByEz6mgMLmKzFrvID0 /Vy1Gi7hZPRPCsUsI9/sXFP6OeEn+yvLru8WzMbuTwl6nCqsvGJ+kAliP6ixE6aO2M5B s1I8FUfbfPgJRgL71m6AGdvQDt6NxhNSh/KIId3M3CogpKJTa53peqXRF/UW4yKgMNnK hf+dP5sGCuYFERF9sRNi2j7yntjtMwQ/TNbfwhvYRkrukSJKGxWEFoU6OG0HeeQABsir sF0Q== 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=UfFEb1APZe2G9ZSyN4oK3320aDfUfHmx33eo4pZrt/D1GWDA5vZg8TYbmKAtgCxHML mR7JOHiL5xShjq3Ws6n+B9TtDtVAMLztUW3Knz9qt7sH8iYrKDFQFeuMWGt8X0zWxRQo k5GN/3ZCUgW2cYddoV2x/50Zn0EmF7L/R/zFzo/HTgM2kOPkA6sZ8iiQJmzMArMCa9WT 1ZvMhnGFVBkd+OmSg3Cf9BJPLZDpRvzBXB8Q+MXy4iZ0LsmJb/2Z2nHyh72r8WR60pIu TADQSRwT9ClCPqHPv46WeRzdnTKUPwb5c5eH6yjFQ03HDBdJJqw7Vz51cv2NTwtv1jWA Jn1A== X-Forwarded-Encrypted: i=1; AJvYcCUsWde2OmsYWhciUnr2HJZj+F5ca/4RqpieUkhrdnsMTgEXQSP3HqXc2b9VVvZ2YOErNUeVj8YAm+yI6LHH61kv+x7ZQXM1CG+PS2YscXpt X-Gm-Message-State: AOJu0Yx9DxKfeYQFIJAYyEbLWwu1Gv8g52O19RCZn+tgaL/zxNflch3x AuDV512dUVzV51xAlZ23tUd9Sam6uCNcjXwcAzB3VHku+WBeBD1NvhL7t1RE/ws= 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-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: 13588616 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 262AFC5475B for ; Mon, 11 Mar 2024 11:20:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2E21C112752; Mon, 11 Mar 2024 11:20:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="x/7/0Yp2"; dkim-atps=neutral Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) by gabe.freedesktop.org (Postfix) with ESMTPS id B1AF111260C for ; Mon, 11 Mar 2024 11:20:41 +0000 (UTC) Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2d09cf00214so43585641fa.0 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.freedesktop.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=x/7/0Yp2LpR4l9jIMKx5vf0EysocH2jRRWSiCbyd4TU6GriziDq0bY45esFLkZGrTW 8OVT79Eh3PSulFIdXA8h9VAhtF2MWk96Wi//lTroU5XwAIpJYJJyHl49qt3IFPXdDRQs RsfZq/47dIAAfXb5I3gorJ2dQMl6JEziMzbsln82KfcEHKcKlNG3JqvnHc+lhj+pdIkM rCp8/lkjX1ghRN943KqZtRJi9nnyN1Y9JxOnvk0gXNTgzZ6dMleOlhgbtTI4weaGGchc L26ffClLa5JKJRpfiBLcsBa5bJa7XwZd8nRkZohiXa1k0VuTu+AbgI1WKChUS4hgWV03 gF1g== 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=sMPEJJqefHfBkMyca9fil97WfhOvPEFP4NFUys2BVwpKgL2lOce5dCyUbDizMmBEV4 rhmSub3ACPCmpS9VjLFX8e0KF5ycC2hxKRNfhiHtvYOz2Qq5VUE2yJznKyNSloN3rdJV 1Nwrf5aks+ZwYOYnXckI3oRDesH+NWSalKjjPkkGdl+T9fipqjZRVMCcvQ0XKVuPx2tx +edbd915hnmNF2dracHtmu+VWK1tBWhJD4kasJqxvne5JecBSVeFyB7NTUx22WkB4tCJ 0acS1qqH9fOxwB0pzpqwhTWTJU7aVKUijHaBE5bX16L2rf+X6M6BDpb9eCGHNeB0b5G+ jCTw== X-Forwarded-Encrypted: i=1; AJvYcCUl9r4dpStHlVCGR37dcRNBUXH0DFS3g4GgQnPDg8ztkLDff8BQSrEdB4KxCeHgyUs6XJVNQzZZfZeosKYO1hVVVqqaIlL/MGkBmvv0e1Cp X-Gm-Message-State: AOJu0YxA4wtI0wQ/ZKBTNznzif46wKx2nb27Gmp/JeIhxpRlXlbGgV0S VbRjinaG2fPxlHKa7LpR5vG8GDJUWNCBK6p2VxJBUg1ZOG5znQG0kuHAG88Pxg72U+Ko228eMIJ Z 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-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: 13588620 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 352B4C54E60 for ; Mon, 11 Mar 2024 11:20:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EF5BC1127BD; Mon, 11 Mar 2024 11:20:54 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="gNkBXQpZ"; dkim-atps=neutral Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) by gabe.freedesktop.org (Postfix) with ESMTPS id 27EE61126CD for ; Mon, 11 Mar 2024 11:20:43 +0000 (UTC) Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2d28e465655so63815871fa.0 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.freedesktop.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=gNkBXQpZS8FMGtSuYA36Yv0BW5LT2LTVLGmOiPc11tuK2CUsGvWvY5PwhSpHH6o6LB eJvHKSehykBzuPUQsVYHGqbHfKv6k1GQPgwKwWs9jRg5sruMCLtA0TqGI4vAC24MDT9j WG5mYDEWSczJAAjhKep75sBeRWTuu1T1Yxe8P6uaQlMC5du1WOB/N5BK87Iv/IQuLino QCtHhutpqdcL2/zw7mXFyp6G0ZFuEfzbidZ4OVxCXUW7jid/sLqo034e1sPuTc6X7lA3 u5VSkwHmMh1zkyFnO1rBKAki/WMDh1vXA9Bp/j/F0oJwm/K8If5cUz6YIgQb+mjRCX93 lbJA== 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=SeQlcJSJgdQT0wddtUDkj2EtHsRkNHw76Ingt1cyTex1U/T0CXb6CqglSdGGBBMOzv l9EEQaFLSFa4HU1Lc7/FERhSAsZNCT618Mg8u/sl8RK7Ow/b28woG3KIHLvOzq0PFVu6 O19C5qSS8RbNBZFfvGB2DpVe4n9etL8qAgIORh+HyL6+3TGfBdt1ZSNnSno6BleTZknL KYg7pVkCBEiRWO4tD4kVWb/Y9FT3OPtnqOuR2sdaje5FgK09TXffkBKytuSitAnzIGpi BOex1TfwWdfZmFgoUtPiTRDSFVYu0flNlow/L/hOfreJQfLo8zhaVdgDyQ53h1m9U/k3 35xg== X-Forwarded-Encrypted: i=1; AJvYcCV5D9Yskjd9iYQV0AeoCmIqa6NkXrpVrNCMwxglbBG4eVOWKyCKEOxcFTYKXi972xTyai8aasb6h2mrMSt2nEvy148CCWTruxLmcg1CtCiJ X-Gm-Message-State: AOJu0Yzt6vpvwl7phvWWByF5oB0Sozn7Nc5w0xtEOppXrX9x+mqnPXLT SPmYzLvb0Jm3zJ4BwgqFMhcebup5N0KYoDL1hBcmBibmyEgPDOGUsBrR9LRzOfw= 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-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: 13588615 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 6EE50C54E60 for ; Mon, 11 Mar 2024 11:20:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ABCFA112754; Mon, 11 Mar 2024 11:20:45 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Z4G93CPY"; dkim-atps=neutral Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by gabe.freedesktop.org (Postfix) with ESMTPS id D6AB41126CD for ; Mon, 11 Mar 2024 11:20:43 +0000 (UTC) Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2d3f4fef377so53779371fa.1 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.freedesktop.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=Z4G93CPY8cMS0IKI0Im7NZGWlMhY9G8NWsWe1pl7AA9a7M74Ly8QPNpaj08jio2Lbm Ev+Xljbn1J9rddOcLYfpxTFQ26c7eiBBus2QdLnu3Zdz2NkzNfKS/Bdc4Fy7eCunUAG0 b16JW9iLmJtezHHRxvV6jhFkP9iQhBy0g7VPAvzRUAPBjpFzemGNSSuGY/T1gjvsP0n4 s/CMzDTn7Mczrrng9q32dHQ1aWmT9553XcSxiVeXUy53c5Vptb7lbYSad3npygiOANw/ wWfwoKetlX78j0iU5I0Uevbp3/Ufbi4JcWdYtBplNAzIEk4fea1AYOcseAWp8nOByJeo CEJw== 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=FzLBTk8ErFGhfUPUVsssRtvUF6l6F6WFQE48Vsh24a1uFAJaqsxbFdn2QX4VzzcvOh TL47SqhqcTCEo2g+OY7ZJUXTM1kRSag/lMWZlcZW2gSajcmGDTC7axpV8ShwUogmU95E iFuAWufsClROUFmLBqt2BpoCGtYfpe2mhIPTZQ88nQ2xpiS1NXPa+sN3RN6NlKOgDX9K fQaYZcuKz05XBspebfeI5e5hY9QR+9NTVQUBN2j8fj7wD2wQ+vKP7mYMgdGVZ4nUq38T mc69H+U+gxdZDOg7mgUERvJ8q7Reo6B4GwNJL34S0hHmhd4RZfrrtra2JC/EseLU6o97 jxJQ== X-Forwarded-Encrypted: i=1; AJvYcCVLmqtit6bhIjG09IweMLKZ1OkY9iJP9mfBjukZiu4an0XmzgU9VvZ3/XgNwxjpr6Veja9zcqfGlWoTu08yQLeYn0wEAvZ/jY9M/bd7lp51 X-Gm-Message-State: AOJu0Yz9hEPtEFtZiarUXji9IPchfyLy3JnOe7shXidWgUuYt6tkVG6z LBjdAaFtxqQIvEcbyq7Q1jAH8GJ8N7oyb3/r5eIhAthCuNOWsIgDXG26PdUBN20= 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-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: 13588614 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 6F61EC54E58 for ; Mon, 11 Mar 2024 11:20:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0DD3D1126BC; Mon, 11 Mar 2024 11:20:45 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="s+Y4q17X"; dkim-atps=neutral Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by gabe.freedesktop.org (Postfix) with ESMTPS id B952D1126BC for ; Mon, 11 Mar 2024 11:20:44 +0000 (UTC) Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2d41f33eb05so31972691fa.0 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.freedesktop.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=s+Y4q17XoPyVQue7iASQnsAnmhkaDckMtnFiFAeVcSf0BwfYXhA3A+3/8JrrycTTgB h8Z/EebvDz++wDiBzeasiHfV6jiL7OPC8lv+qn6sKBr5GwOb3AGYqD/2uYz/VCXcqFBR TkSe+ZE2Um1RS/KW5s5WeEYgvS47JRKBuva0pLjrVVP5w5iFZBk52I8EhG69MFZINLX3 /ddpAJv+K/2k/m0MP+eCsuO4IIEpJlq8qKVn/lAmS4Weng32pjB1SN2LVrrcIPWLOV/T jTayFJ/SUB6HRjWM43RxXnmyqSjHyTmVsxcq2O38pf7tH8gcotNr/2YhMt4G3j5v1yG+ DB/w== 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=O6s8whihbSVkpMWn7GfmqARdXyEtegrCoFzvCsAkS1LusfnX4BjfDHihnQD7T639Yi e928GVPP2b8QWj7fmXZd4MoIHW7WCMd6GCkqUIkuw8NfyPbmjo6rNxPdsNV1EFyMLqIw EfGXXI+7pGkFegRAWF6me88irJhpqvnQzJxfqqx6rLOtQUm2bMj2bsoOJDxhwTyGoPqh bIFttB0sPBv4uJwRTMHPK0xiE+Ye6FwR29AGKmxjbTHQR/Og7LAz4MkMhk9a0HvpUFzh zXjOuOjIlMDHUpRMZqzab2nVGB9psEclPaouxBj2XOq1MINv62zYXMiaGTPZtlDOGdp3 889Q== X-Forwarded-Encrypted: i=1; AJvYcCXBiBBc+8rtScmNNGpDQNGmiu9q95kP2+Jj54+4kM65t2HDmaVfbPjnslunVREaBCbKcppqvz755/CbSh6JqSH/21g6GfF+n05t22SsfCpp X-Gm-Message-State: AOJu0YyAnlJD3u6/Q/VsnqbVCNCzhNkGyn6qpT8jXacvkBdGrjM2yaIL xh1m9mvABbDi/vk3WgFfIutWXq7M5BWdgJkGJ6cJXGnNpadtDJqDyQn+6TatrbQ= 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-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: 13588619 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 04405C54E58 for ; Mon, 11 Mar 2024 11:20:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D54E91126CD; Mon, 11 Mar 2024 11:20:54 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="cg/8hQMh"; dkim-atps=neutral Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by gabe.freedesktop.org (Postfix) with ESMTPS id A4D96112752 for ; Mon, 11 Mar 2024 11:20:45 +0000 (UTC) Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2d269dc3575so38684841fa.1 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.freedesktop.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=cg/8hQMhoJcyg/AaT5Sy/qJFn47p/udB9sIIYmCMmxgcYMzAJHUM7O35H99zomeI0Q EYnbKpaolnNQHz27ChwXcHc5LoXyGwe3mkb5Li+34mSoqTIdWmbC7yzMoWzHQFpGs5ib HIPQnKQwv+ZFLBcJGywrvQ6bu470BXf3wj6580n36NYO1loDdRtR2oKuEA8KIta5cqfj mvzAPqTZYj4XdyLDas/MlfjGYV/5l4d7ikv0V43zUqadHCMUWOw13UKOXFIoHC431SuX 4hxD6utKq6brDGA9OqZTU9cB8FxdzJESCBvsi6Vv9uGPrFtmXagOM8Jxk6oQzDwk/jm7 kHkw== 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=OHQzjlLlXIzTa6d5E0MhTNo9DKacxoYB+2/Dx5T6vm30KsFvistG7TMHUJrryk4DyN 2s2p15LKF9isn7bhmRD1NbswlM7/IYIhY0G5mf7MLC/vd8qfyYyHcE3DH08jAzuBUz+m BxKsObxKtSoKzNJBCkETRbF7s1RuXVRjeLKK2tfs4ul9hxqg02LmdENHt+e1ZVaUMEvF p1mpKI5WI1ReWJTC1Bfd7bUD8e9sKfL4WPrddKqKHFK9viRM45tXkiNobANS54gymuu4 hhAkFv9YpIt3ltib7+OiJJ23yF5zAVEf9b0Pa+Q7tmtXgzd74+dywDsQJzs30JWOyUGg RE5Q== X-Forwarded-Encrypted: i=1; AJvYcCWLl4iY37wx9CM5umWhcJBqEP957BXhWDwyZZdfV6yPwc3Jsqf2olol9pOmFXI6CgpdM2rak+DbWOFaUczevDLIjIaUIGVk9Sj6nigh2W7q X-Gm-Message-State: AOJu0YxLZtfnj0wYEZsu6F2ibqhOGKX/ikKc++Cjnael7ppz/9USSQMt uxOCpw6EuYrQt8H9tqYk951IPC68opHcoOCebpP7jSs8hw1S1skXRuFrlsxRdyk= 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-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: 13588618 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 7044CC5475B for ; Mon, 11 Mar 2024 11:20:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C211411275A; Mon, 11 Mar 2024 11:20:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="e4wbM1vY"; dkim-atps=neutral Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6FA70112752 for ; Mon, 11 Mar 2024 11:20:46 +0000 (UTC) Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2d3fb16f1a9so52680011fa.0 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.freedesktop.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=e4wbM1vYd0AhD9iefAUehW0p2D7ZF+PAeGT9PherbPOv71goEStboyfcBZjeegh0rg Elm2o+BDXxmvmdxUlDHw5GUxeKrQ0pyTuvekBUKg37iG0g5+G2nuvmGoz3fUd56LF6Ig 35hLWNyFfEZzua/XscBFntgwF9FpIN1Jwyc2TJYaI72LDBU7gdZzT7DSRp8NhnpggrDZ N2J0Q5Y8yREhu6EBNpCS8yGXHGwU4K3sTtbA1ME2mU6NB1F6+kka09KHaC2/gHCxXYlF 5to/6oQ9VuB8XekWzz7UQtjjvpElmcXC9ss5vYAm5B5bflPJjUCXEVMneCl42C8K8q1c DVxA== 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=ERL8S1HWY1DAYMKY3mWwm6mRTygZg58KmsaYm8Y+pa3CKMvX3Gi4zyGZjz7yOVxpG4 N3YLDVBkgfxR9GYZCBHIqAal+flV/hzrRgTxLgHzzqfzqjTah0FPfU6MclULyX/d3upC 5ztFuinmfd/E759nWRz+1pSJ2z06ynDJMVT5cdVl8Gi7dd9Nphj2/DdMA/RPpLrmSOFY V5I+dCjADGu5C1V2EonbAhGKv1p3XRvgYOaKpjK3mwxQnrfZtqxe41JPoXkChWhpjpYu IZtNP+WPkYhSuaKAEChvX51ADgrb+aEFJVRr3RJd61SGjYKu7viFcmOyICn2RuzcCfin NK6Q== X-Forwarded-Encrypted: i=1; AJvYcCXShXTzS+XbzPfC/NHIqIa6/W4NuO0uL0PDJk+mFXSzkPoGx4mOLpfx2zLQpWhK1BxCDM/S5K6pl2pE2xOVIRA3HFwBvDgCieWFQGnxZ2kf X-Gm-Message-State: AOJu0Yy6pzTW7EuQOgUVHlU7wpmpSyJQBvAzH4TJL+ESBt63y2F71oyI 6aSDeP9vlBNP6qV4dRVzIJPkpc4bn1ScNWpuo9Huc480DjlF9RIeGenprOVgkqY= 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-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: 13588622 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 19CF7C54E58 for ; Mon, 11 Mar 2024 11:21:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0D72C11285E; Mon, 11 Mar 2024 11:21:02 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="gYhcmboG"; dkim-atps=neutral Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2FD5F112752 for ; Mon, 11 Mar 2024 11:20:47 +0000 (UTC) Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-2d26227d508so64259421fa.2 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=1710156045; x=1710760845; darn=lists.freedesktop.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=gYhcmboGKyDlrPqI+ePQGIRrF6uWXbZf3iWqo4ZK6bkHOdBW0JZxOB87aTN/zm1E0F wWc0wM3oSNj4VfDuSgbg7S/vhUhiw4HDRtaXPj6200+EQaHFORmSVpM1vNG4L5CAd9qi FNrfJsuLnVDe/NQ6CxRsfv30N3mFuSNhqp7be7UIQLaTcZoFMNNNguETBWnYtkvoTokF oqXiNtU8wYIKgoVNXJib5CEDGHCVjluHNboQ/sjADhOu/GfsnaDgc10jDU5l5fmKmXM4 q6IDP46khCOvydQSj/KOE//Fc73hQh9AwBJQlZR56/WSuUN3Rio2Ui8CF63lyyODJV+K vtKQ== 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=vcpAhFDbekk7iyPaLjsxpBpnpOeF1cHsKNM2UkIuqy4go9J545sWpcrUkZP5J8VARh 2RlXEYl2Td5dG2onjsECZtH9mmUgNBSW93Si4E9Ng4o/VNhf9rd+Y2AlJCaywUleeag+ dEen+QH2gGEXqD0PEUZ52Fgn5gYTE1qjSfEeJ6G+pVcCfTB2OarOhFhMrvbBaA3xJ9Og vw+hfKzRSYbTqoDasHZqfXOGm5sKw/bL3120fM7vY/m8+RK0aUbWPP9mEjDlYUzl8mrc tnhbio4LpuUMDd/N3mY/ZsV9FOEr+dm1tar2LAzdktPiNM9hzs3bfhgQ7/wwNQsg97PE oEIA== X-Forwarded-Encrypted: i=1; AJvYcCVSi5rGUfJWU801x+JAu1ldhD7O3efPz8lXA5kZzTF/y31f6ZmoOKENUVGOpKTboT+NCWVfHa68K/0ctFmeZMTAHaB8/JudplvckySPsS8K X-Gm-Message-State: AOJu0Yzylva24WE3AxWwCvzN96yZO2JVArn8lbyZUabqElGNtB5WGWkl sUsf+58kI0iJNpJZ7jwr3RtLAZje9Mswbuia7eNSjtZSsgn7Idb7dH/NsgQiPL0= 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-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: 13588617 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 B5485C54E60 for ; Mon, 11 Mar 2024 11:20:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F14A112777; Mon, 11 Mar 2024 11:20:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="hua6G3h3"; dkim-atps=neutral Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) by gabe.freedesktop.org (Postfix) with ESMTPS id 093DF112752 for ; Mon, 11 Mar 2024 11:20:48 +0000 (UTC) Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2d220e39907so69056201fa.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.freedesktop.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=hua6G3h3yhxNkJHFuRDCr0L4gabRB28bxOZLW9c9CaV4APjOvwoy1YsyiX3KYrn9TA 2cp+gbbuPkJ5slzlG5xYbEvkfHaDIL70jGQQWAY7nGD34E29lbWbR9MqAZPo1XxK/4pM tLNDkNa9xa1l6V4m8eAXt7PfxObDKlK04q0g7Zb778/dHAUU/7sBB8tNvXTjTfP2r7Kn kP90IY2B7vo4u4Er1XXkcblO5lBi3EatqQZCz7XMfxeB3qSmEVNYLu5EUctc9dPez3cs DhlhLWKk8aFWSOfweq+nSNkZL8Ty/raXpFfg8P6VPFcFqF8ycAzUgeX1vVCiO428a6Vk q6NQ== 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=bR509+PgQBAdCQ2g8pFfopm1syvYGEOavQpBL+fv1nRk5sYYK4Z/cKrA6TOxcm9pDE L3IBgD0Q+Zc5VRxMNjpJkHqMf+6yMORKaOPNm/uFUGNBdCQkNopa9aiSnr5pMKdrtDiq bys80d6gZKf47wysVq3RCNIhbQ9CzWd9VKYLHe/xNKMk5lQ8oKwtnpgkfL2c8OYY/7ON Vly/NFkPSBJESdVQIL9RDp9Dmue2TLvB1aAqUKw+vOS9AqbbQwBtiZ9IbRCIP7iZYRdh gNVUv4A4xHoNUBKx2sSLpfepCrrD/uyY2QnazqqtdmWEqtdMtXBpR80wfz44loiHDFIw PDOA== X-Forwarded-Encrypted: i=1; AJvYcCX8r7zGcx+f7BPgEccufqMHjtt8Un1zWRPjj2j0M2aQqgFavsHpoBO2QwgdvKlhc7yvEqnTV3qI+u8iMm+wdBIu/GY9xC75tvcXIpGr+5EY X-Gm-Message-State: AOJu0YzsxuE4tnWaFXPY8gs2o5Nnyvj2OANEq48v7smAcn5L0OYeM/wz I9l/hmB58al50v5zaKsSVrVYaqiwYUjIMsyqPX6GEvZZo3SWy4d2CiCx2XUoUCo= 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-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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