From patchwork Sun Mar 31 20:28:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13612269 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 269FBCD128A for ; Sun, 31 Mar 2024 20:29:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2348510EA02; Sun, 31 Mar 2024 20:29:14 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Vt7r56DY"; dkim-atps=neutral Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6A8B210E9EA for ; Sun, 31 Mar 2024 20:29:08 +0000 (UTC) Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-513cf9bacf1so4286392e87.0 for ; Sun, 31 Mar 2024 13:29:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711916946; x=1712521746; 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=pQWdjTwgnIdZS6takOhMDQQy8XjSBnwUC2ksC3WzZco=; b=Vt7r56DYDUA8L6srgyMdYNctkwxVyzmHWOVmabvHh51LA+MYlwlrbg7AiAJt8SAGIY bUweqq8+W9hlv+KT/cK46QLq4SMpPIT06XLY2+NIZ8oso1VSn6HKAZxKhK9ryqCXR73L 9VKQKWbJ2F1VTULadq/SP7uMwHgb4Bbk0y2SfkhaTTvWqJysqFja9tnP1qFYvaimbi/r f7a5vENrr7g+JmjxhvCUcePYC5SbDkBRYFiAP1aASOsyqHTPqFWIBXC7xVhfEIS9n2qT uuCk+emErN/2/pHdUh4m//vlWS3vk5K7MHxKLStRw03CC04ouE14sgD6Ot2SszGKwJe0 NuYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711916946; x=1712521746; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pQWdjTwgnIdZS6takOhMDQQy8XjSBnwUC2ksC3WzZco=; b=i4NmqqZNceY0XxD8vSFpANipVtsDmv7Op8ea5DyZ5ObjSbRBU4IvOnXrdAdAc8ZG8Z jy3tlHyN6nqtwaCTR2WLAJIwENayBGUXUo7yVcHG797utqFmQDeWem25Sf9+8gI//huP OCmATHx2mfht0oCCLGv3RWVp9web6+CGipa+qfZu1deZCegJBiBLdbfIKQOA07jTpI4z jjgIBbp3F/5zKIs0kzNau7umytg8RQsfm1ijO7yLOLJfrO1Ua8hEHtcIuABvCjQYAKOX bnN9ZACH7/ZyDE1HMmQGcKTsQGhaM1xQY0BmxwaYShpCFqJxclJdqouLmMXUQnmoejvr KNCA== X-Forwarded-Encrypted: i=1; AJvYcCV3B6Wl7gywy0i4hP+h26j5wlXPNhMIt0kwt2Xfyih3wVwEhJhys0MDhABwMT1o3W0CQ0NTZ3stseizfpCAiR2ei0n7euomgFeRh5WCFkIQ X-Gm-Message-State: AOJu0YzMjiKBCPQBe1Mnh0QbtUPCVsyjJqDRCP9GTCmInb1v7CqICEkD dcXxPmaAcrIxTmHXhCypkmOTCCZTxILGdHfIz4TAoL38+QsaDUmbPEoJ3XOFgdE= X-Google-Smtp-Source: AGHT+IGQdqPZQuZrp4rMIkttCQZXwzzfHQ8qGULNfSAfqZZSLM5BQiVtoEAQJyL03sBpJPsmSiXibg== X-Received: by 2002:ac2:465e:0:b0:515:d100:1650 with SMTP id s30-20020ac2465e000000b00515d1001650mr4831112lfo.57.1711916946553; Sun, 31 Mar 2024 13:29:06 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id y25-20020a197519000000b00513cfc2a7aesm1237276lfe.71.2024.03.31.13.29.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Mar 2024 13:29:05 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 31 Mar 2024 23:28:58 +0300 Subject: [PATCH v2 01/12] dt-bindings: display: fsl-imx-drm: drop edid property support MIME-Version: 1.0 Message-Id: <20240331-drm-imx-cleanup-v2-1-d81c1d1c1026@linaro.org> References: <20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@linaro.org> In-Reply-To: <20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1524; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=SFNXn1zh/yUH5lKBoXzlQkp+p1CQ7cqY5rYlPQmKP7Y=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmCceOu5x7edAmH8+j3eGaGmmWCs+FoRdo+9fSq UX49KHJUhWJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZgnHjgAKCRCLPIo+Aiko 1XkMB/4jYrMQ2Pto+iPk8j5wCQ3lBNRQBXOOxIa36gpTWGBLXN2GMgq4T7AeSxsn9W4uYJAhsST zHQ4WQaOaSHhKvVfvr6alCYvShW1Yffn7kru9PtHsb1YlYvbfyYV6GJy4r+eOitmea2us9BMgqd 75bzb0KkIdLmVYWRygT8xARQ/AZ0RZRvmWJKAKq94B62Yj3eNCDbWUkpHtkte3s5Z1IawpY75jR RCDDAnQO9BSYH2we2tHqKiIbf4TJBGRQpIM3486HR19gxyNT2AVWyZVuMY2UxZ9drbNgwIfG20z 311P8qvYPgPF4VXolTrtGq+n9JR6WwA+ID/jrmIaxce/aZRk 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. Acked-by: Rob Herring Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt b/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt index 3c35338a2867..269b1ae2fca9 100644 --- a/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt @@ -119,7 +119,6 @@ Optional properties: - interface-pix-fmt: How this display is connected to the display interface. Currently supported types: "rgb24", "rgb565", "bgr666" and "lvds666". -- edid: verbatim EDID data block describing attached display. - ddc: phandle describing the i2c bus handling the display data channel - port@[0-1]: Port nodes with endpoint definitions as defined in @@ -131,7 +130,6 @@ example: disp0 { compatible = "fsl,imx-parallel-display"; - edid = [edid-data]; interface-pix-fmt = "rgb24"; port@0 { From patchwork Sun Mar 31 20:28:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13612270 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 D539CCD1291 for ; Sun, 31 Mar 2024 20:29:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1BA3B10E9F8; Sun, 31 Mar 2024 20:29:14 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="ARYvV0yW"; dkim-atps=neutral Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9C82D10E9EA for ; Sun, 31 Mar 2024 20:29:09 +0000 (UTC) Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-515c3eeea5dso3907963e87.1 for ; Sun, 31 Mar 2024 13:29:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711916947; x=1712521747; 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=BGWVh/Zr3LGFqNC/PDJ+t+m+rq2p7BOWG0ebyvpQons=; b=ARYvV0yW8dd2q7tA9dvNMaIozbGMrPes3sgXPPcAh5QrdUCwS7xhXjr7DSm65+l+4d aiLipYMix/V9zJmeg+ALnJJSozyD1ZE72curUg5RNR5Mz6FPweraZCOtfLzXelDqkTBa uOL8FB5zdjsC9hgTY51Oq4E1is1I1nFqU4CS1mUDeiI/8goq6LS36vQc88+P38jNa0B/ PRlMnT04h1lxbQcxH3rHTGtYzgNVEW7qxyyRiWQ/3Rte+BZv578IWeFijyeGWdqtuHRj L50+iOpax1OrWeVsQYbJqgCoJUVZXo1IwOuJWd8yXxb8SxHUoATvxKrluuoB/iBpalEN D/GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711916947; x=1712521747; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BGWVh/Zr3LGFqNC/PDJ+t+m+rq2p7BOWG0ebyvpQons=; b=dOonBxswDKP5YIxdFbNHg0ESaUJNFgH77dEM4/jfYAJKKdFahz3ILJGPM0Nmok5Ck3 WjlDOwgaGr+AoflMBSF4R85lnK/i0KWLlZgCMlUzyws4ADWcaGR/ySD/5C34/QexKBoZ D3dBd7IDgGZDMSBMMptywruH7pmHeJJ+rJS9zDLbYLPG5ca0PaQIlPbewZYfsPxb0xnD bow6cQEJGSVjbqJ+4ay/DGe/7H8gFwrk9E53FB0h452Nm1Po/+p9Rhg53XlYsbW0/rdz gCbvtrtnDDOFg0IRldLDrFHxmFXcx+ucP7eVy68Fu9eWagcgUVWhcL4LgoyNWsMGyYqG IsYA== X-Forwarded-Encrypted: i=1; AJvYcCWhoxakaSGbcnQovxqTGkapxcHuoVRSMiCc35u2McYhUgkzBxildafZujae9lYOiD2/rb9IDga8uB6o+/sjxPlNFFc0XkgvLsx1uHbc8NWv X-Gm-Message-State: AOJu0Yz8gzz9T4gXII9+9wiVNFLLq4exxWL+quENlTOBc4biaK0vt1tV WXpzU3zMdUKJptB3krdJXMvdhlf2Be1CneNmfSbx4BdlekogkIOaZBXEZzuyAjUef97PsJXv2xO E X-Google-Smtp-Source: AGHT+IErgrRoQvxgZumBivM+Pb0YMQVGa5TcuZqM+SRcVE2qbrjJzJG0RqIIHvoWbmgR8bTP+gcaJw== X-Received: by 2002:ac2:5e62:0:b0:513:fad:3a79 with SMTP id a2-20020ac25e62000000b005130fad3a79mr4662754lfr.41.1711916947600; Sun, 31 Mar 2024 13:29:07 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id y25-20020a197519000000b00513cfc2a7aesm1237276lfe.71.2024.03.31.13.29.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Mar 2024 13:29:06 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 31 Mar 2024 23:28:59 +0300 Subject: [PATCH v2 02/12] dt-bindings: display: imx/ldb: drop ddc-i2c-bus property MIME-Version: 1.0 Message-Id: <20240331-drm-imx-cleanup-v2-2-d81c1d1c1026@linaro.org> References: <20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@linaro.org> In-Reply-To: <20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1144; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=3Nz5IHmPVWRwHFsw4a2c0uKZtmM9s7xJPi4nSL2SZJE=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmCceOQEdxUBjYVGcqNd2OmrDFYajZlrsDacoPO CuZPZV1962JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZgnHjgAKCRCLPIo+Aiko 1SgTB/9h3CyJDldBv5uM4m088XmQ8/63HBIR0KmKsg2ApUeLlsUQVFPWv6HCxXEHhmoroNSzibq 6tblygXjqEY7bhNq3EvQb67kyg6LhARbVAc+3d/idawgHzRewcnAuylIV6WFd8nDUT8AMmhhYac El3My4G/fyldP7NqLXkTfQHs4HtfNnEjwjCXCeAxxccIsz+T7kMKndy1i8BUrqTk5kA/wG54jbR k5JMTXaOx6tshdQ0kirRA4BAkOgtir/k2M+Rs9/FPAI03mg9xiib6Mdhgee1nnns4riNinorjxl A03KUxKfJAma3OVCmDJoQmR7FaMLMBIwgFi9quEUEv5eKIYY 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. Acked-by: Rob Herring Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/display/imx/ldb.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/imx/ldb.txt b/Documentation/devicetree/bindings/display/imx/ldb.txt index 8e6e7d797943..03653a291b54 100644 --- a/Documentation/devicetree/bindings/display/imx/ldb.txt +++ b/Documentation/devicetree/bindings/display/imx/ldb.txt @@ -62,7 +62,6 @@ Required properties: display-timings are used instead. Optional properties (required if display-timings are used): - - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing - display-timings : A node that describes the display timings as defined in Documentation/devicetree/bindings/display/panel/display-timing.txt. - fsl,data-mapping : should be "spwg" or "jeida" From patchwork Sun Mar 31 20:29:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13612278 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 E9B83CD128A for ; Sun, 31 Mar 2024 20:30:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 11D2D10EA3A; Sun, 31 Mar 2024 20:30:03 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="LVAaNZ5l"; dkim-atps=neutral Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7124510E9EF for ; Sun, 31 Mar 2024 20:29:10 +0000 (UTC) Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-516ab4b3251so131901e87.0 for ; Sun, 31 Mar 2024 13:29:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711916948; x=1712521748; 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=LVAaNZ5lmhkeckvkESN2AJlf3T9sy2QoQew+yPLRPaPysZ/GW8ITQ7WNQ6Hw8sr/b7 qMbxO20PshhdDK7zS+BtCDurdZH3TLMvi+u6TU9cOYR3g75ut+it2tRiHL60cP/J9QOk 5s3gYbXs4yBJuuil6bpPfwrCSEKhhAU5xl3V85sGsClQfuxefwew90vF31ao2O2gVLrh UzAKDR1aqbrJHagdnCm2dTUqZcetiVxP6+H9kD6HVvT6kAyUdum+hIvzuXWgpVpX1+Mo Sw5i51w4iI3ac+3y8yvoG7NLcnT2wVaJZzvNlo/0lrSnkShgZrLAx8sVo485lsmsayUr Bwow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711916948; x=1712521748; 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=xOs0vXyasYhqdv64adTwa1qOKcdXHuJUv6d7SkdNdHCHh7d4vWGUb8QfuYDB9BpI8g UJxuPEJ4c4W4eggjgMey9cCNE46bgbSKn4ayLqlAAAgJPSCp6aFxBked0r3EtOCm487S Yuo0MJDTWqdNpD6qYYeKKIDs1GkRGeJAddKBjMkh8UTfFscnMx/VLKC0EzQSQK+w96c7 C4Hf1DbGaTKffFlSsMt2WmMUPnYZ9EEUeec7rF5n4YbkCQ5xEdArpJxe/mVFEyPf8f9C GBSuqQhGtxKQ/+ebUxL77R7v1/3j4AhDyMg+cpgfHwvuAxP+0I1Imrlk4XYq3REm9lc9 x3vA== X-Forwarded-Encrypted: i=1; AJvYcCXkZXukWeOxl+MAsM1MBxqSqmZd/9HHknYXLioZWUoof2q7JohOAPJoPrAM/rwaE1Nvd3gPq7LdJphnJRZJWbiFl4oXzT8+f94EaSFg9xFc X-Gm-Message-State: AOJu0Yw53ZjirXW4D1ryn19b5zjtDAPeeDHTkHNa3VdM29pAU2/8YCv8 mRa4qUySWW7DfjEFzSiHqPWcpyyV7sHZZujmL43sDGbIOekL1JDm4HR88B++GqY= X-Google-Smtp-Source: AGHT+IEeBeqNuZwIfLQbwY0vtR41HMctXhZ/hlhyqOsgFR3m8enJB1rayNnKs0HiihAbaUaz+EUPCQ== X-Received: by 2002:ac2:55a3:0:b0:515:cd30:cd4 with SMTP id y3-20020ac255a3000000b00515cd300cd4mr5778415lfg.43.1711916948521; Sun, 31 Mar 2024 13:29:08 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id y25-20020a197519000000b00513cfc2a7aesm1237276lfe.71.2024.03.31.13.29.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Mar 2024 13:29:07 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 31 Mar 2024 23:29:00 +0300 Subject: [PATCH v2 03/12] drm/imx: cleanup the imx-drm header MIME-Version: 1.0 Message-Id: <20240331-drm-imx-cleanup-v2-3-d81c1d1c1026@linaro.org> References: <20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@linaro.org> In-Reply-To: <20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@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/pANAwAKAYs8ij4CKSjVAcsmYgBmCceOtaRv6AfyisrG+WrNl8dGCI3K0Kw6vglYg sqv7jAKSTuJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZgnHjgAKCRCLPIo+Aiko 1STjCACN1Fcy46Njl3mD9RbVJ9J8+l5TVGpyE/uU2LNja6WGRJwELYrPl7UrBkzUfEKao7AhQ7w wKuB2eJNzk+5bi7T7wT3ICVV3mq39cxEK5weLsTGZTKKb9EDMuZwtI0CS2XIPRAHbQg/fPMRDo4 IvcpTt6sLExVGzjyJ2Wg7TwLT0xHwkrmJY4jLAmzefKAesmiyXwG6X6ubAeGnU8nbO+Gjw0G8Wm V03iQeFZ4f8ddwMkS9fH9FsOz7IWFekfRnHyvl3iY0xIk2mLAd+vZOx4IHTOp0S8FrvY3s2foC3 9BD/zTWcq0kEgalTxeqXaS2F9/s1TBSW+9/XgefKm00Im+1I 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 Sun Mar 31 20:29:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13612267 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 74D0CCD128A for ; Sun, 31 Mar 2024 20:29:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1B43510E9EF; Sun, 31 Mar 2024 20:29:13 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Eswf0eX5"; 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 4703E10E9EF for ; Sun, 31 Mar 2024 20:29:11 +0000 (UTC) Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2d8129797fcso6739651fa.1 for ; Sun, 31 Mar 2024 13:29:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711916949; x=1712521749; 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=2KzzvmMhfp7akZBSkslfuhmya0L5lQxB1AJ+Wft0o54=; b=Eswf0eX56rMezCGj2PBbcqXjHNybe8xIq2N4OJ0leV5+C1/7fZdzWiTx/nNxn8XGP8 +gHAhulLTj72Sc214BFh9Qq9WqH2Dp/TKBDeNDakLMpCG8MW52DkmpgZcl64z0t5xgpy t8CNfEIGfIHuTZvVTW8Fn9gXkbiit1I0L6Y3utfIcLwATPvaprjlfqUUskU8/kxj/ZV3 jRnVO2uCGg9Dbg+M8iNNWZNeVAzA/J2trpXLkVgAr8vwDUCq+SENsCi45b03RmTemM2q Hy6xdTpVDB1x8yoNPN+tJ4ToXUDBZvf1jtDBcp8G3WJnNc2MuRgkNxs/Gfptwzuoz9HN JY5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711916949; x=1712521749; 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=2KzzvmMhfp7akZBSkslfuhmya0L5lQxB1AJ+Wft0o54=; b=WPZunRfq0hBy81Y+iaPYNT/vQbxFpnbloAKtIs5atTWVfLgy57/Fpu+Vjy5ReshA39 oVjEh5bCp68mzkUfjl9l7ya/LATapQd8pILjjaAxRDAbwJzePnCgLUR6WHH0OZKrUsth 6ThHWxKNZ5pDcmJdcNe3HjjKBDa8zNUPHsMLx4VKgnwrJLa2Jl0Ua7PjrvP6G7ni5bok vakfTLEMsEVcphx7mu3ng5CG9Ymp2sji7Pm/nF9gPXjTpra4yNzyYKfEJZAjVO24Qv5r /dEA1229vGvCIIhHv07P5ldsRMFILdxyagCzcTbyAvq6BeA1lDnvACLioHIQrm5WoJiM VRDg== X-Forwarded-Encrypted: i=1; AJvYcCX84O5e3SX74ZC+y1Ws1BNOmb/fvB5XDvEzCjm5eBcYtw+OqOwwFi2XutlUT1neA+3NuvBFCyAOb7vwjaRQvK+VULIVJ4xdOf8UM8bDqKmt X-Gm-Message-State: AOJu0YyCcDLpzBsNH1KBKIA28XUCiN+v1BPQo4OhDdaZnJbWXEZJxiZ1 BVV7GPbS8Yt5nyaQL/WI0sMIfZJvuc6Nj5uUW7jU42e8L1mJmspoiGeH+5zWFcc= X-Google-Smtp-Source: AGHT+IFlkJbTHllJhmxuQLe8rza7jxEC5/tq80FTXBgl9MrRzWWrHRQfdLsjPQ9eVX4jnPTBNpNLUg== X-Received: by 2002:a19:6a10:0:b0:513:aef9:5401 with SMTP id u16-20020a196a10000000b00513aef95401mr5436071lfu.66.1711916949484; Sun, 31 Mar 2024 13:29:09 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id y25-20020a197519000000b00513cfc2a7aesm1237276lfe.71.2024.03.31.13.29.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Mar 2024 13:29:08 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 31 Mar 2024 23:29:01 +0300 Subject: [PATCH v2 04/12] drm/imx: parallel-display: drop edid override support MIME-Version: 1.0 Message-Id: <20240331-drm-imx-cleanup-v2-4-d81c1d1c1026@linaro.org> References: <20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@linaro.org> In-Reply-To: <20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@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=Q3tsX2NxDW1TnkNSTRHZJWIJp8sJ+Hj1Kz/G4qOQ9+Q=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmCcePmSKVxsfb2BiMoKNsmfnhrGb3P7osuWj7O 9DlQcsEYQuJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZgnHjwAKCRCLPIo+Aiko 1Qq2CACzcRHGJvXSJ7Ml0+GAsmRZ4aF7aq9y0LhhBKlCwrSYCrgMog440nF/nbZUYZiK8u/syu7 X7M9jd37lBHflsClDpkrCAJAFgL8Hy1OrsgnkPfJcJGNqR/ReWQeiIw+nvjFjw82vTwVdbH0g2L v+7eIkFQJRCLM73SR0E0NEkn/asUVzqJH4GCtRJGk795BuD5Yh/al4Noqb7JNS6+/5o79bnEYqF YcexNCg3EklMvns+D8cGpuavkOoPp87gn18lL6wGJCeewjR8Z6Y4Cv97kxpChprIzs3uAK+XbJL Ueb7+4iT2BBwCcNThuXHvZBvxBNr3Z+G/ZsWs8lNmtlT6Czi 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 55dedd73f528..4d17fb96e77c 100644 --- a/drivers/gpu/drm/imx/ipuv3/parallel-display.c +++ b/drivers/gpu/drm/imx/ipuv3/parallel-display.c @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -34,7 +33,6 @@ struct imx_parallel_display_encoder { struct imx_parallel_display { struct device *dev; - void *edid; u32 bus_format; u32 bus_flags; struct drm_display_mode mode; @@ -62,11 +60,6 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector) if (num_modes > 0) return num_modes; - if (imxpd->edid) { - drm_connector_update_edid_property(connector, imxpd->edid); - num_modes = drm_add_edid_modes(connector, imxpd->edid); - } - if (np) { struct drm_display_mode *mode = drm_mode_create(connector->dev); int ret; @@ -312,9 +305,7 @@ static int imx_pd_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; - const u8 *edidp; struct imx_parallel_display *imxpd; - int edid_len; int ret; u32 bus_format = 0; const char *fmt; @@ -329,10 +320,6 @@ static int imx_pd_probe(struct platform_device *pdev) if (ret && ret != -ENODEV) return ret; - edidp = of_get_property(np, "edid", &edid_len); - if (edidp) - imxpd->edid = devm_kmemdup(dev, edidp, edid_len, GFP_KERNEL); - ret = of_property_read_string(np, "interface-pix-fmt", &fmt); if (!ret) { if (!strcmp(fmt, "rgb24")) From patchwork Sun Mar 31 20:29:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13612275 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 4C400CD128A for ; Sun, 31 Mar 2024 20:29:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8BF9410E9F2; Sun, 31 Mar 2024 20:29:48 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="t9yiUp8H"; 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 034CF10E9EF for ; Sun, 31 Mar 2024 20:29:11 +0000 (UTC) Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2d109e82bd0so43704991fa.3 for ; Sun, 31 Mar 2024 13:29:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711916950; x=1712521750; 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=t9yiUp8H+E4RHXjNbUkwSTkzDNpvXryA+a6tv7s/04m4kfsE/K0dbvvJRTEvYrWEk9 VM4+OOgB3uS6AFIDQ4BqLnmWLkVzR2R3Iy0kWKLxzPvrsvCkGsXk8ZaCJdduicyhs/n7 vP6fqJT3aEiX0YlUGMA6IpDQFb03tLAbI5f8s/MAgokEzxGc4fqEfHVuX8fF4uG9Gk10 X9DBfN3dmRY6lkPQ01emTZzZvU+y1SFm/OhwgYUM/d5jLZwhQMfb+LlUM8NDfpmdiSKi f5D1Ty3gC8qWKSMYIPLO7UQCece1eYS+X6VGmKLpXEgix+dvag81sq8pWA+h8UxwmkEs g2mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711916950; x=1712521750; 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=MOlx7kRl1T+/F3hE76r7BU5TmwMX6qHue1m3wVu6+ZFpIIktiotOALTrJqZwoEzPyX 0oA9t6wg3ejdKxRiWsjSOAErhoqCQk/bvIYQosBQp0Dk35Z60b3SMo2D6qhkc3dNrlBW BD2QfD6I3p2twHkrDPCyRL4WK9ssOkDQncZE6aD61ENiXZoZMBSdt+NR+aaA7s9ltDqP zaIlveS6dQ0ihGsKIE8C3lNzYY0Exi3g6G0wRTvJvh/ZibKqGox1euNtO1aRkgOtpt+b I08bFQX3dFaQFkLS7y7ZaEe8SSoOOcbn9He2IkKkKOSUfXf7cCRv/JTLCZjRib5+aLaJ 3iYQ== X-Forwarded-Encrypted: i=1; AJvYcCX3f6EwGN8mnQm3jNwx31rYRKofhUJ5zI8PfuhvgPL90FaUYhxSI6mNxVnwwUnO0OzfXZCdDGbl/AdoDijWwJKQ8hvWF0ygTqiUOAwSK9gl X-Gm-Message-State: AOJu0Yy/dzHQI7kUvi7cCzDk1NdCiDfnTmNFKFSEFYAyBs4oNuJqgbOD KyOY6E5P/xDtedGIwINHWVyMDfswLeuMiXUtJKkuQput8/pnMdwREYOBCt+2kAU= X-Google-Smtp-Source: AGHT+IEHzVhYaRRfQunRUBg2nCTXUyrkKpKE02mf9SlmjzQqNUi1YakpduPB5hr25gvxrP4GEqAn5A== X-Received: by 2002:a05:6512:3102:b0:515:a360:1d92 with SMTP id n2-20020a056512310200b00515a3601d92mr6829117lfb.67.1711916950154; Sun, 31 Mar 2024 13:29:10 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id y25-20020a197519000000b00513cfc2a7aesm1237276lfe.71.2024.03.31.13.29.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Mar 2024 13:29:09 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 31 Mar 2024 23:29:02 +0300 Subject: [PATCH v2 05/12] drm/imx: ldb: drop custom EDID support MIME-Version: 1.0 Message-Id: <20240331-drm-imx-cleanup-v2-5-d81c1d1c1026@linaro.org> References: <20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@linaro.org> In-Reply-To: <20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@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/pANAwAKAYs8ij4CKSjVAcsmYgBmCcePbH5Zjxnk0aodoAfmic8b1WXU85H/o8MAs QI1cw0GV9KJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZgnHjwAKCRCLPIo+Aiko 1eExB/9cHiJt7nCx5nPTg7TnqIDd4FGePmdaBsugHRvPqtnlcVLqQdlMqObc2812P0w01JTq4wx FGg2hfiOrpEzl7cNzqiXOeUbLkjCUG9nR78g74zKhuQM/OdwCSbiZ13rXNdWsDTheAeKPgWI0VY k4SMxFvLfT5xNiILgF5szhgNToFdF7Qsji5jH52IHwvWRnnkXvQS2jZnY0fv4NTgkryrDK7QcN4 ETbkPipoMRHe8pVtl2vYcqyTCh75mwlkUrQBRLiyoC71/K15SIcl8KMvH2038c2KeetqGZEGDFD 3V878u/Mos78tzrehAXNkCNSNFiS/wlAbD/ZvShtWwTiB/GX 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 Sun Mar 31 20:29:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13612268 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 28FCDCD1284 for ; Sun, 31 Mar 2024 20:29:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E094A10E9F4; Sun, 31 Mar 2024 20:29:13 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="e4GCYDzc"; dkim-atps=neutral Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8832710E9EF for ; Sun, 31 Mar 2024 20:29:12 +0000 (UTC) Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-515a97846b5so3618474e87.2 for ; Sun, 31 Mar 2024 13:29:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711916951; x=1712521751; 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=e4GCYDzcnmXT2Cycb+eZbzlbZXAVVYS2lQxeqcF2TkafBj8EGLxMxTkRg/2sVHnOBV +SChoYj55uL+RdX6Zmyb65h3eGzf+SRX3ZJJDpJpeG99nDimOhvUxLRJkiS66R3Edfia rF7ryUrYnBirHMiWIsdKSS8RTVo1MQtoBp0WgPVrS6T86cAYsElK8GXSRiJTkUgSw6q4 4uDcU+KsALwBzeTDfOa441vOuPrcxWNcd0g4B56jei6L/OgviLnnM89vioV435PPvJl/ tdzPi0+JHeeVcceeV5xO/UIXriiSgZtPyT9uR4a2ZHCXVehDRg1/6T38pzaEI76uerTs GX9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711916951; x=1712521751; 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=q+py9yJZYI2nnvkP/jE5K4oA1J+Z3bO4dQdKukwYTEF4v9xF20ZG+c5OQ4rwpvYy/i /o0TDcWaCNSofEatNZ2tRLZKDsIX5LPLseWioJurR/WQpGDrJ3kgBJdeHCu7HJUfg++N ndxWQNqFDs+qfLs0AtQbnamT8J7zEnrvzs5w3so04baCYU/Prf3oZvkVMXB83y4OPkRN 9ZCPolboNTLNER8/qfUTgtnfWVqpfAULijZuVipq3B5e2F/lGePjQexk8M43Nie/n3IZ dpuA+HoTHiE6cZTBki+64FIdwcX0NMLV/btsi2KQVsB6fn5cES8Ze0R7fFQ0uMhS//5b Giwg== X-Forwarded-Encrypted: i=1; AJvYcCUvdzzjEhJCVyL4H8hdgBSjGLiKiVwTRE9vrpr+nPqOnCbb403xKikwhHzlt62BgxZVB+fuGkJi0JRA9aGgvOHuYcmsLvxS/sdoFu7bA7OQ X-Gm-Message-State: AOJu0YylkxLNQ7vlCdj9msUF55US+S64RYGgzGyL+efdqIpYUtchmexz B+8EnWIdchNh8S61re7P1Wz2McD9OXL6dtaaxIVoNHCngCVWxqr6a+aIE3DWJ4E= X-Google-Smtp-Source: AGHT+IGqWCIntvZiDosEJKnaReDexnGbEOGV3zzmMDNnyKgFK5V75oXRqdmj5ESqD0OGA1YI49V6rg== X-Received: by 2002:ac2:4145:0:b0:516:9f4d:1fc4 with SMTP id c5-20020ac24145000000b005169f4d1fc4mr2503140lfi.49.1711916950855; Sun, 31 Mar 2024 13:29:10 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id y25-20020a197519000000b00513cfc2a7aesm1237276lfe.71.2024.03.31.13.29.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Mar 2024 13:29:10 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 31 Mar 2024 23:29:03 +0300 Subject: [PATCH v2 06/12] drm/imx: ldb: drop custom DDC bus support MIME-Version: 1.0 Message-Id: <20240331-drm-imx-cleanup-v2-6-d81c1d1c1026@linaro.org> References: <20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@linaro.org> In-Reply-To: <20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@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=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmCceP6jh5TC7QL9R2rkAKAR3NbgOh5kblFwSSO NB3cIuFeTOJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZgnHjwAKCRCLPIo+Aiko 1Sn/B/4rtFlV/3QWDuIppX9zgfbSNwSC+NhwTRudvbiadZy5sknecwH7XCIyNEg3mhrf1G12oXq aIiyOr0cJBSMYa7TfCGSTN5CESr+cKDJ1WqKhLVAh5KalY6304ITWgCQnCnvnS/5j+cm8cZuoFz 2rdF0h073DMilAaoCko5laOPnvkuot3ZG1KYLPy3BZQWn+mTL0NT9/O1xZOnBKXb2rJyv9XR3gP ZU8zMokbcM4DF22m1TahdWnyO9AnKVtk+96WHD9XGwORBorkXnTRb1svaVfzizSVaHcPBEdmHVP EHyhHEt16GVtCxcctL3wZ2DCfiHjttm/DLtmibsaCllST2ce 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 Sun Mar 31 20:29:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13612271 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 7D3AACD128A for ; Sun, 31 Mar 2024 20:29:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 663B210EA2E; Sun, 31 Mar 2024 20:29:14 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="J4kyZ+az"; dkim-atps=neutral Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5A6AF10E9F2 for ; Sun, 31 Mar 2024 20:29:13 +0000 (UTC) Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-513e25afabaso3711949e87.2 for ; Sun, 31 Mar 2024 13:29:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711916951; x=1712521751; 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=J4kyZ+az5VxBp1tGvcmQbW59u5ZEpp+x7w0UdqoTpl611KLo8gFDx8O4EHYyRwoD4Z mVYSK6dpKv/IiLQz6yo/FvLpkOVFTm9mXbetIGM3KzOn2FXywvh1tzYWE9+cZLRNsbMF H6D6LLeemlPuDINHHbgg11+EZ/3WxAJJ195FemlbvJqOQ4ZPQMW4Wo/ZuW6hnKNg2viD d5Y/cmLM8NIKQMZ5b1wyMU+J5QSzpVtcMzkXqqXi96GJDFnzuHkL/JwUrO8R2W8xVRUO SsvMSffcq69quKZlRDgooGAqhb5q/Bxa+JX8Cb45oQXg/eoEaR6ztbowe7f4N6dWJUIh QwPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711916951; x=1712521751; 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=H3N7cyLfY+QBM4vG0KqPig2GwT6Uyp47ivEydDqXuhlrLfXaSlgnrhTZ4CLjaoKpqp 1jjVfcChAFsrIITDBXFGbQal7WtlBNndfu0X25zwXwIo4I2GGVuj2rdAKa0WM11uzurr iNuML/ISNXZF5bKPxjilIHTRwvVdlpI9dD1frahAXjNEClTtiocDsJbXB99FvGiva+Va VswhDLhmQ7ju+2+G+gh5oFq2UfbKFeWauFzbrwdfk0cjDe0TQNGJwLCa8y6QLuwAwCZ7 jBBbkfF3IElWnyehhoSinIwxGQaGBCX4Fxc6Qki84dmRuaHnmkYvtfcFaaXfQuNff4lF QT3w== X-Forwarded-Encrypted: i=1; AJvYcCWQYRMwhWyJ0Id+zVYK43mmxzs6DZHY1gpoux7JmqcciDI1qjkwLz7dE6x5mIwXQA61jTW38/IiaxfbJADNjKHDNIU+6ncOZr8o6NGhZMlA X-Gm-Message-State: AOJu0Ywa4DWfoISeYVQmHSw3sNc3pKTBQlxoTV0VcUxBZwTZVNMzYiWr JoOjOhVGTgaHsL29Q99ZnPxabRchSua7pGUaI6rW69+qwTPH/60PqNJTCk6e9jM= X-Google-Smtp-Source: AGHT+IHZNFdB+w9oA8iYXNkzEeRTXt8zG0fBDfgfV65ywZXBtAV3nCgeam9/v6yOR4pyFiyWnAJI5w== X-Received: by 2002:ac2:5d71:0:b0:513:c9ca:1333 with SMTP id h17-20020ac25d71000000b00513c9ca1333mr4717198lft.22.1711916951660; Sun, 31 Mar 2024 13:29:11 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id y25-20020a197519000000b00513cfc2a7aesm1237276lfe.71.2024.03.31.13.29.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Mar 2024 13:29:11 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 31 Mar 2024 23:29:04 +0300 Subject: [PATCH v2 07/12] drm/imx: ldb: switch to drm_panel_bridge MIME-Version: 1.0 Message-Id: <20240331-drm-imx-cleanup-v2-7-d81c1d1c1026@linaro.org> References: <20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@linaro.org> In-Reply-To: <20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@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=owGbwMvMwMXYbdNlx6SpcZXxtFoSQxrn8f7H+6tj33apnt/0L1MhgCHDR3ON7c4f6uf0krauW m/qYJTcyWjMwsDIxSArpsjiU9AyNWZTctiHHVPrYQaxMoFMYeDiFICJBN9h/2cqLFQ1J7K8OK58 dnlS8fKZPrrHFofLJBdzBu+wVDghqLdnd622otx3F+73Wxp6ZkisZFdYuv2Xmc7hePNZ82ZG7NJ awV7jdEhuwfmL33bczzLWdGoVfZipfE44a2Zswa4g3VU29k8mTNH6kc49MaRrm8CBGVpPCp2DNl 1eVM7iWawzpVyEYSXjGsPAycaZgr/FKrT8Hz1U54n/KBxareI027z9CN+0+cdibwiK/Yz4e2DaD hZ18avVy2f0W6umHE26I81lmaTbFGi/bp7khSj3MPb+D84hXRFXMi3n7luhVdZ1cp9mzvbfQm7M mXY5ua/PfZtaz7Er7d35imPujadDZr+Yxnx0/5Psw/m/AQ== 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 Sun Mar 31 20:29:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13612273 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 B0FB5CD128A for ; Sun, 31 Mar 2024 20:29:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 75E6C10E9F7; Sun, 31 Mar 2024 20:29:36 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="pB/MuFZP"; dkim-atps=neutral Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 41EC210EA06 for ; Sun, 31 Mar 2024 20:29:14 +0000 (UTC) Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-516a97b3139so278380e87.2 for ; Sun, 31 Mar 2024 13:29:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711916952; x=1712521752; 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=2NWUO8Sy6JPSgwKkrutWi5HBoELv9lWKNmrIdWaVqOA=; b=pB/MuFZPOfVO7VhqA2G4qhQwzTrOLRqYC1FPvHrccEUTiwuPmL65P3S81MsjuoYmSx TDCsMNGb/82tHwg7EcWx1gIYEsZpVxIbzfIoR/YV5irgph7siyDwIdi/vWZJAfQO+6ha NmW6TJg52XqWq7augcN1G8YYO/74XBz4UZ0NzhvAhikHaZhMnA0B5LyK8WcEytMG9TOF owAitiAxSQyASZmM2aHDRVPDrk+0tKKgYmvl5y9FKc+nGa/YxlqQ2K8CqWwvdocaG/Ps EPK4EoEP1iJ+EtiC6DAyrSpa0ATteCFKa5TEP+NtoTwamzho6Sasj//oSmKOkaR1xpzl nVkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711916952; x=1712521752; 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=2NWUO8Sy6JPSgwKkrutWi5HBoELv9lWKNmrIdWaVqOA=; b=jTT30TuBp34ELO2BYaTsYzSvAubsKFcix41uGrFCTRc8RlVOtiGE3C4ylsJQ0N8i45 gfQgLITsjCXoomYPQois2FQ6hcDr6gzPGY3ioWX2lkxrG141kiy2kIYEXADosxyL83Nj vyHbz94N4WVQL08b0cYpJTmT/5EvuC1PHE6zlG8D23dtXW2gHlHdpWwIAJGFJSFkdasw 50y7cuOxeZzSC78GU5G0Rb9m+jkp/cLjo+MmxjuaXRJm3kZxAkdxl/NoeFVxso4vI6kq s6t/X2FZoapcG7+zNuj45yLiOnEy+iHem9NAhGm/JYl9/V3TmoJqZFDFtYPjbg2fO/6X zQ0A== X-Forwarded-Encrypted: i=1; AJvYcCVZU1oyTs14I0kv5ATwfHBUZzII/574TzSeg1jGPzgZx7vyHf7VHh4xKVCmKhy0R2/f9JQYwUKEMXJ8ezRnS9MNEy/FNlRJnvFMGmxLl5jF X-Gm-Message-State: AOJu0Yy3b8PMeLc5lTL2253nLTEYkyWYzD69ocvZ/ytT5jET656FkMKC mIgWFe/wNMvIsbl89j90dS8H7eB32X22tMdhAgT3ve2W5sRAEG8shBS0mo8P3gw= X-Google-Smtp-Source: AGHT+IF/gwVAQwbfxLT+LCIBhCaRg+FxT10/Jh8nnHOQd/9xJ4bySdg9cI4XUR3gXC85ea19gCneCg== X-Received: by 2002:ac2:5eca:0:b0:513:da24:fc0b with SMTP id d10-20020ac25eca000000b00513da24fc0bmr5142760lfq.33.1711916952439; Sun, 31 Mar 2024 13:29:12 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id y25-20020a197519000000b00513cfc2a7aesm1237276lfe.71.2024.03.31.13.29.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Mar 2024 13:29:12 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 31 Mar 2024 23:29:05 +0300 Subject: [PATCH v2 08/12] drm/imx: parallel-display: switch to drm_panel_bridge MIME-Version: 1.0 Message-Id: <20240331-drm-imx-cleanup-v2-8-d81c1d1c1026@linaro.org> References: <20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@linaro.org> In-Reply-To: <20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@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=Pi9W5qgy4T7+J9hP9AVFepGfzI8GpfyO2Ku1B6h2Uks=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmCceP58j4g6V4EltAY/XhET22h9ioI6gibKjLi hKvmJUXjKqJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZgnHjwAKCRCLPIo+Aiko 1fEiB/9T1bnL+hT0p34ArbfJieqfBkbDb+2ZxrhzWsW6faJ9TPDPbi2BzBS5OVUPiLcj9/oAVew /tn/sGqoEGOrF92bR61BAKbHftzP4+5SrFsr6Az/ZTxsw8hYvyNlf/YjqwX85Nl4wOhEnropG5o C9/wgT79YfIvzN+jlMN7yADPKHiBB9DiOXD40bvqfBbo1Upf9KyzvmFWAt2/wCTOSxdnYWiU0xv Wg0CMH8K4178p8BkPwC613/e3u/SjQ5p9KokbOBMozXM2iFmrq84hPXGrVFZm+Xx1aALV34Sd6k 3TrVuFLbRtilldWxJFk6JBv6d0pyObAZDTv33enq71W6La0x 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 4d17fb96e77c..b7743b30475a 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 Sun Mar 31 20:29:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13612272 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 663E1CD1284 for ; Sun, 31 Mar 2024 20:29:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 78AD910EA06; Sun, 31 Mar 2024 20:29:36 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="QlbJUgfW"; dkim-atps=neutral Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0D60F10E9F7 for ; Sun, 31 Mar 2024 20:29:15 +0000 (UTC) Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-513e89d0816so3967808e87.0 for ; Sun, 31 Mar 2024 13:29:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711916953; x=1712521753; 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=R1A7wX6hNUy8P/zQgxOCI5nxQ7K8DEqd4NjplmpDLtE=; b=QlbJUgfWUDUkbJ7OlYioO5/pO8O1XqkDrSSVcpu/D09w7ERlLjO8s3E86mYAj3+LAk u05al3AAIt1MSKTRX11Juw67H+z6C0oCyts7JqFlbvRgl27Zo87CoDTpKcRCKUmRKzFj f1rngjehT23JQ29hfHTO0khAp1LDNmdIRhGoBIqzXdtYbPmaQigd7YduEUSnXvB1uP3p m/Fbfb0nILq2N75JG0UwMBAnNEzs1IWXymEG+ganSe/90MyWuTPVAdGub1JhX/lTNV6a r7OYrhT2ngVtV3f/jPi5f7qaQmFG1EaEozvSjySTnEvN/6PhW0l+3MdVIyoP0+3YiF0c s94A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711916953; x=1712521753; 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=R1A7wX6hNUy8P/zQgxOCI5nxQ7K8DEqd4NjplmpDLtE=; b=amhSEbWQkLXPRJMXQcMiKipRE6BeLbiCsU3bSbRgPBiFTljO0YPBqzTtykx9eqqC/V FRl8USM43qCknHIhutMz1RwjmPyc9maSDKxNHhyF3HBt4i0Atlb+CgD1LEpAzkRnVvpU SAmE8ZDTZnRF1txi1SmcrNtoEnJ0oulRUj4DWY7P0xqJbgaHd+Jj8qPF4nOPNY5RYlQ/ TwMMC4HEo4MIOd3tYqAjBXDoaEj0Ua6Ei89r8Rvn0oRxNorK+i8O9i6MDopMVON9PTJd lPAodtgsYCxNKiARpif7N5t3G0EShdpELlz9XBXZ8SR3u5Y3HUK75Sc38Q8pgrjiF9I3 Xn9g== X-Forwarded-Encrypted: i=1; AJvYcCWEDUu3aeacpr2R0TZLRfbXIWVawFFCIwKyZ0QeJtbfWh/fYhXLL2B9BEdRAUu/UYB3Nuij/w7gsnFtlNXPr5g+wwu3htlu39sjggUVt+iC X-Gm-Message-State: AOJu0YzWALNOV2TjWzN8nj+4PsjoOUJvWobu7pdOcmu34fPetqrmJcqQ Z5KmwsxmDMqS23B3xfYF5cb3jhSIReV18Pq14e1/lKhDLFECKYvSLmLp/UAlTOE= X-Google-Smtp-Source: AGHT+IFeEoM8GV8Dslk18QS96m4eggtkhs8tlJAqZBtQtN8yS93vJNhUK8FsHkm5EtHKM8q5pMJXzA== X-Received: by 2002:a05:6512:526:b0:515:d5c6:16ec with SMTP id o6-20020a056512052600b00515d5c616ecmr3266515lfc.10.1711916953132; Sun, 31 Mar 2024 13:29:13 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id y25-20020a197519000000b00513cfc2a7aesm1237276lfe.71.2024.03.31.13.29.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Mar 2024 13:29:12 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 31 Mar 2024 23:29:06 +0300 Subject: [PATCH v2 09/12] drm/imx: add internal bridge handling display-timings DT node MIME-Version: 1.0 Message-Id: <20240331-drm-imx-cleanup-v2-9-d81c1d1c1026@linaro.org> References: <20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@linaro.org> In-Reply-To: <20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4905; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=hxbKkqcQVL6lamyV1sJxDUeKsmUL5K/DPfRJzqUHXP0=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmCceP1c/UajzRsbpS3x8XnHVlfzmTQvPuCd3+5 jTxebl4Y0iJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZgnHjwAKCRCLPIo+Aiko 1ZLgCACeDb8Bblu2K94cHFSwyB441Rf7xL7iwtjmzImMhrnu5em43wI2ZsuNUoFKqlPSidDaw1b lL5kPJ553MBXYYTUEgb+fFpDyeyC8eSJ7qow+lfpz0LyOz5pUWiDgD6cTMilL8GHjAf/3MfBR1n lQ+wavMGNVI/w174nh9+DLZmD2Ff+D5348JS8pFCDKUY+P64euq1jT2rLpcSd4d47so1cFRLIa7 b3WJKksgA9RE6X/bdihxEzh4LRSu4a5AKHdQYajyGSZytA4d4ghiOmDnNkb7bjRmNYCK3S34bvb +fTqx1fpv0rbNJVSm9Xi7z8M+kC5w3NWp8W9qfyyfOo76GSc 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/bridge/imx/Kconfig | 10 +++ drivers/gpu/drm/bridge/imx/Makefile | 1 + drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c | 85 ++++++++++++++++++++++++++ include/drm/bridge/imx.h | 13 ++++ 4 files changed, 109 insertions(+) diff --git a/drivers/gpu/drm/bridge/imx/Kconfig b/drivers/gpu/drm/bridge/imx/Kconfig index 5965e8027529..708faf0b75ae 100644 --- a/drivers/gpu/drm/bridge/imx/Kconfig +++ b/drivers/gpu/drm/bridge/imx/Kconfig @@ -3,6 +3,16 @@ if ARCH_MXC || COMPILE_TEST config DRM_IMX_LDB_HELPER tristate +config DRM_IMX_LEGACY_BRIDGE + tristate + depends on DRM_IMX + help + This is a DRM bridge implementation for the DRM i.MX IPUv3 driver, + that uses of_get_drm_display_mode to acquire display mode. + + Newer designs should not use this bridge and should use proper panel + driver instead. + config DRM_IMX8MP_DW_HDMI_BRIDGE tristate "Freescale i.MX8MP HDMI-TX bridge support" depends on OF diff --git a/drivers/gpu/drm/bridge/imx/Makefile b/drivers/gpu/drm/bridge/imx/Makefile index edb0a7b71b30..dd5d48584806 100644 --- a/drivers/gpu/drm/bridge/imx/Makefile +++ b/drivers/gpu/drm/bridge/imx/Makefile @@ -1,4 +1,5 @@ obj-$(CONFIG_DRM_IMX_LDB_HELPER) += imx-ldb-helper.o +obj-$(CONFIG_DRM_IMX_LEGACY_BRIDGE) += imx-legacy-bridge.o obj-$(CONFIG_DRM_IMX8MP_DW_HDMI_BRIDGE) += imx8mp-hdmi-tx.o obj-$(CONFIG_DRM_IMX8MP_HDMI_PVI) += imx8mp-hdmi-pvi.o obj-$(CONFIG_DRM_IMX8QM_LDB) += imx8qm-ldb.o diff --git a/drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c b/drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c new file mode 100644 index 000000000000..fb3a030928f0 --- /dev/null +++ b/drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Freescale i.MX drm driver + * + * bridge driver for legacy DT bindings, utilizing display-timings node + */ + +#include +#include +#include +#include + +#include