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: 13612292 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 54180CD128A for ; Sun, 31 Mar 2024 20:29:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=62fmyXlhhB4g/OMyzCa/BYq6qTft7Z+r1drR0eOrH1I=; b=hiFubknQe3vO3O O053hywBMlIUkvXRH0ooW9/RbHawGGoBb3nWFup2ORSW7oG51uNKK/JVp4AnaZU8CWmSL2h89RLId cUKGQsK/FBV1KE4/E3Ejj1LUwnAodVt8TapHrKJvqaDMZoqjgXg4rHwXSn+DNpDvzqJ4lyyBOV+M2 PTHF3JY7ZJR89y/xYveSg3m8Gi7gEW6mqYym1GiUBVayrl7jXUKSfdO9ilnbSq+L1MuLwBq+HWsmm cBdLNcT8oY2Uyxf89jph4X3kDtIH3isMCcnOnllkD3tDk2gBvDpsd8+BmTCSSaYuiSBLjdXLrLBPl hBv1LxPt7Werc+DpCZmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rr1no-00000006FtG-2YqY; Sun, 31 Mar 2024 20:29:16 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rr1nk-00000006FoA-1rgH for linux-arm-kernel@lists.infradead.org; Sun, 31 Mar 2024 20:29:14 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-515d55aaf5aso1029166e87.3 for ; Sun, 31 Mar 2024 13:29:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711916946; x=1712521746; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=pQWdjTwgnIdZS6takOhMDQQy8XjSBnwUC2ksC3WzZco=; b=z1yF1cCscfmeHjVOdwADSuElruhlEvnpSrZ0KoF8JzOr8QiuHbIk+Wtv//SQwn+SUN p09ZPp+LuIv+Y9lom6GSkLgsyB4vWxZR80LNybWm7LOraFV0S4kaqGGUpq3sqKQlwiRQ rO+riF/AyrT4kpRJ2Fx6YdGSW3Fgio//6u9am+qejoyGA9jQrrpmx5TTuFB1hIvFBKXn k4qgiuyZHGNCrsZ6VFGLCClOmCru5s4rH3mIuw5GEwzjttwGkMp90w3/bZ2nWaIv6JFO bOoAtwXIwDy1BwSE9NaFUtbU0Fmixq+o86qj5oZy4CQ+1+PdCVyxbIecxXp+kTrJ10nB 4/DQ== 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=BJrkOm5t1imRvgT5O9pzTt2rmnvTMf6Iw4QFE0PlxUPEuJKvrsQe0nP1E1bt8Hw1lF Ge5DxLjx7Noawcy1mbCVoSt9pjtj0/Nq2VMDu5MfJwgCOuVF00nt9/CZO903rfUX9Af4 W1oju45SA8yJaLHvZtwjTryiJt+uTRVp3FoR9XX1a2RHfGVh7UTG/gCh7xbSwV29Dimq q6FEXywmCxVfRfFgnJR1bLbbsZU1kvGK68QR6roacs0zxI5ksdkuml+gKNgnRgMioemm bDyV4Uv86HSPMLoEAj4XzegtBSk70gsCdehWIIKeNvcUPQpS/uMeePRk5XFf6ob3k8xn PoRQ== X-Forwarded-Encrypted: i=1; AJvYcCWxR1M9Z17UQab9h4gfdlFSfH0n4l+c848SArUXnuu1sMomXiOCeylKBei3v2Tntcg3ZP4lktOC4eY0gHzprToEsdCfzjhBGzsXcWMNjb+ecyEOLyg= X-Gm-Message-State: AOJu0Yzw99UZDTzfj/Z78c3Rz2pm1vBZA+0Fw3Jw96xjdCzBPcraCJlw 8Jps2FkWKpt/h+WaREEHu/zCX4Y6jXpuyQ0JhjVnfCE5u4oXRTG0rNiGdYZQ8Rs= 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240331_132912_522162_AA55613E X-CRM114-Status: GOOD ( 11.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org None of the in-kernel DT files ever used edid override with the fsl-imx-drm driver. In case the EDID needs to be specified manually, DRM core allows one to either override it via the debugfs or to load it via request_firmware by using DRM_LOAD_EDID_FIRMWARE. In all other cases EDID and/or modes are to be provided as a part of the panel driver. Drop the edid property from the fsl-imx-drm bindings. Acked-by: Rob Herring Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt b/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt index 3c35338a2867..269b1ae2fca9 100644 --- a/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt @@ -119,7 +119,6 @@ Optional properties: - interface-pix-fmt: How this display is connected to the display interface. Currently supported types: "rgb24", "rgb565", "bgr666" and "lvds666". -- edid: verbatim EDID data block describing attached display. - ddc: phandle describing the i2c bus handling the display data channel - port@[0-1]: Port nodes with endpoint definitions as defined in @@ -131,7 +130,6 @@ example: disp0 { compatible = "fsl,imx-parallel-display"; - edid = [edid-data]; interface-pix-fmt = "rgb24"; port@0 { From patchwork Sun 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: 13612297 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B19F7CD1291 for ; Sun, 31 Mar 2024 20:30:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rF1CiT/XF1L7ck45Kgfa/2a8fA6Zj4elibB3WUJCJYo=; b=GtYG+nnlBEg8Le pubveWNaqPV3cJs2SO52/k01TnH8rThkV1zg2Ud3f8S19tMYkfSlv6wWHmcumrOExAUfW2gtEFRU1 JOLt8VSYzNKGPn+XVzMIrS2qfIsQQI76MFe5XD/mZ8OX3U/pjIL6ORSeM+7Y9FHVPnwOlv9PrJOOH pv6kjhr3YCh8YYWcplt1j/yYQAzlXKvaY5ojOv6n9t3iVSYE7M4QGybfRu3hGwlOQFvGkv07fWbz3 C9ey2yUkH2IhmtWb/qrhZk/tnCEZssnt+nsOkFdd2I62g4E6KoVUvh0r+Zvmn6YGrUrS7ZEnGloqg ncpS4vSDynPliN5afp/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rr1oZ-00000006GJ6-2nVD; Sun, 31 Mar 2024 20:30:03 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rr1nl-00000006FoN-28lf for linux-arm-kernel@lists.infradead.org; Sun, 31 Mar 2024 20:29:15 +0000 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-513cf9bacf1so4286405e87.0 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.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=BGWVh/Zr3LGFqNC/PDJ+t+m+rq2p7BOWG0ebyvpQons=; b=hTS/YJGedMh5oKzI1BIpT0wNqf3RnuoPrgQ4iOma2fWeRwQHbN8a55wPGbK6LYIPni 3erJ4sHVucfA1rILZ+duFhDm2hTlGI9vT6vVugwbxtaT4zxXhPP5TE369a1QR/0CcadZ iBVvrET61sNzH8RJ3CcEZVsszX1WR6DA5h/e3jbQg5UHmR6j3Fs11ocXLVlJlLfXG1xb 3JinqLun0PL/1mzU994dJm/nXUk44uOwe1o+b8g+XcFqpdB9Sdb/5GxwBzBskadnFrUG h4Y0OBu4kLXiDQ2qmWJU14TyCi+9b7V7drtVw4tA6UYWdYFzd4dCbD+9kffLrda0fIIj K89w== 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=lM/8zoQa6T23qNVoU7J/55960EOG7Xez2loqtBV1L5LTCT0b+NK9OfprQkF5uxLcAH UQ48LyKCM5PjLNmwXgm8P81P0eKY4Qhyuy/SyEnfRNaViouiIEZRfLvXkbFFMaKkvAMn +QYo4W74Ua8dtZAAEFvHKViUL1TxHwbFSKpRyGAzamh17+jil2+uchV8XZ7PfaIjYl8D 0UX4bN3IBqBX9OdK6AYOXHUBaX8t2MJUYVn/cgLiMBMLl5EGnQF+az0wm+5Tz7IxeqbU qFw27s4hPSvPF2JYee+B2uH4TZVUkFPIwmqCZSifWt0BOHb+jQy5N7fUDZp42GDtF2zh brHQ== X-Forwarded-Encrypted: i=1; AJvYcCW1xBh6I5Q8DEjf6c1MdO5OTBjTn9ZyRHXn9uPbuJ4NxTZcQGhmrFJPBIAPmkbwdVCmhUm3kujVxVoo6StS9z46EDkREvcB58qx2MSmJw8yw9O+hus= X-Gm-Message-State: AOJu0YxYZKrKPRWj030L5nTS6gSrd66lWgskarULXgyMqY/PN79R4oB5 3p5zn4vc2EjhvlE3jUYq4NYW8ajyH8ARtseSR7Rnmd/UCPfAEHjTC9WO1Umvg44= 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240331_132913_918944_544E0CE9 X-CRM114-Status: GOOD ( 11.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The in-kernel DT files do not use ddc-i2c-bus property with the iMX LVDS Display Bridge. If in future a need arises to support such usecase, the panel-simple should be used, which is able to handle the DDC bus. Acked-by: Rob Herring Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/display/imx/ldb.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/imx/ldb.txt b/Documentation/devicetree/bindings/display/imx/ldb.txt index 8e6e7d797943..03653a291b54 100644 --- a/Documentation/devicetree/bindings/display/imx/ldb.txt +++ b/Documentation/devicetree/bindings/display/imx/ldb.txt @@ -62,7 +62,6 @@ Required properties: display-timings are used instead. Optional properties (required if display-timings are used): - - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing - display-timings : A node that describes the display timings as defined in Documentation/devicetree/bindings/display/panel/display-timing.txt. - fsl,data-mapping : should be "spwg" or "jeida" From patchwork Sun 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: 13612316 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 05CA4CD128A for ; Sun, 31 Mar 2024 21:30:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hhdeGI5RuLXJkLwbka76LSwwK6CURMJHyeqYXnVTsZY=; b=NZomCvIiOxXKRM y56PiSikmO638TKxiFFn4IlH7iokVyV7dbvUm/gXmwpG8o1FAIBKI0Hv6u69EnOjAJivyBfqUJC7S uxzP5LJxCeo508rVHFlCxXD9OSVoA8OBK9CwCIvaV0xb5dHCPDJBmXFGjwI0u8tfOb0LxJ61Dlv6f 9XafrG47HBEDdXhzu9hdFVhX1uJFp9v8dYMlkkAhuIwB40QabW2xEHw4gAPW1Y1a2YmHmt+zMZIk2 t97llTyykl1eAR0S7ReEXFALiKIMke8UIF7RW0FEoYpJFHk/esFhC1MRG0kuePSOYOrTRjvmGfGtd 9/r2FNsxkJHTuOe5LPUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rr2kw-00000006LQs-49mT; Sun, 31 Mar 2024 21:30:22 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rr1ni-00000006Foi-0car for linux-arm-kernel@lists.infradead.org; Sun, 31 Mar 2024 20:29:12 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-516ab4b3251so131900e87.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.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Zef0nzZ2xvfKTTGhbb7RG1PfMMOjv1sjApX9pDJjmRc=; b=hsys8jifck5A+p4yaZzyRjyad2xQfv1xMTNoi0Eza9oY0QOr1rHsePR46YBvyrxXm3 Nf93Jl08mwzYfFUND369ZN7g0Q8dvBMLvgzf2Fm7ItnHrxJw7pFMJknuoPqo3yjYkn92 Wx5GpEvJHMjzfNbfEHcu+JEWQqdPgiGv+YZoesfiMG+twc4cNwZBGKcbQ8E9biwlkWXc GozWMsQVCjPaFAXBGqjJNvulXec1yQUT/njWMpUvYXBSIWbxxSXyPCtGzv/uoEn3vgdK /6x1MAowz5dQiCam9Ji/WKxF/gGF33NsLb67TbCrHPOBQz/6wn1BzX/VMNXa34ty7otQ /QDg== 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=qMTiqdWCu9MwukpblHYqGHYW4+cCsY9fj9ZT01MN0Hz6x2QOYckT/SZJ+AfOItb+N0 gcDMxUc+EwgvkSRyQEalBK3DpFoHkJT7smp9zUsCJaZwUxkqDdqIKYKFeeYZ78VxDICX 8Gx1/G4zZNuu3ye9tmdR53mhgNtNOcN/p3i63KU99eYfNNV4cGXnr9Wpv2j7BwSI7WJI Si9FJvc/RSlCcHYDNt/WW4j2oCkLfepLS1juYwlz3tA9x2G5zxnSJbeXorYLq+jvPzbb oQ65jJ2ogH5VJ3p2fmN0HWfuFrqqZ0N2pzi/YljmNT9LFkWv08U6BB8scOXfNcjZ1oUu v9Zg== X-Forwarded-Encrypted: i=1; AJvYcCVjmtKrJC8UxrS13zaDwGLRLJcpa089oFzSd+yOi+kl6T0RvKwYjnY68E/VCnBvkoxuCnZTCB+vMqsRZvgDN+qAuXGtSRfRJdPO96mWKk1o4f7PW20= X-Gm-Message-State: AOJu0YwcyxO2i4typrWLpDIRu+33BjSF6IZwQPTtET2VKdrAyrbRpGiL fCN5WQpsMnmPgdHEiQQR2BlyqNX1y4b8uYEHRV1q2Yy7ObJ8UKirQMU2HGRMwao= 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240331_132910_697854_F177A211 X-CRM114-Status: UNSURE ( 8.88 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Drop unused defines and obsolete prototypes from the imx-drm.h header. Signed-off-by: Dmitry Baryshkov Reviewed-by: Philipp Zabel --- 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: 13612293 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1A81DCD1284 for ; Sun, 31 Mar 2024 20:30:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CEb/q+PjYqQ9XYSO5V41Zd5qcrSHgmVWCtC6G0VR1Bc=; b=v0I/FYzZDRdyLD QXH2LBwXLxVuyJ4MfU34bStrM/mlV2zCbpamAZvS0HN0cf+tuv/hRL93eo0RirTV75i/v0atYikXn 6wt5d1XrQI00FlhPXpNIac9yAUz0xUe0PZWpPJmc/lodhQnptdi4JEeAgXIVbDmXW80bSVUJeixjy xuv+7BQNkH7EfnEGTEvdM+CtDib94CkSwZSlxxyDeqAM/8vfUtpfbPITNQny76uP3Ll1D3KvNRmqq jZ15aDA1MV8nK+WBgaLuBQQ96uGcWrxzE8+XkoyClK9Fr+vnVgLmZ8veha9Wxkq/G6jECz921AeJ7 WEIddTdahlYZRSh4pyWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rr1oS-00000006GEf-021w; Sun, 31 Mar 2024 20:29:57 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rr1nl-00000006Fp9-3nNa for linux-arm-kernel@lists.infradead.org; Sun, 31 Mar 2024 20:29:17 +0000 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-515c50dc2afso3808410e87.1 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=1711916949; x=1712521749; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=2KzzvmMhfp7akZBSkslfuhmya0L5lQxB1AJ+Wft0o54=; b=CBxnMaJrewhQVKuWFqDBKbnWhfkhaSvlaK8iRPMt0I5gHUPgvgpLgQUFNOIooNLEO4 uakI5t+hbjHJ/wsvuDMZi0LTqp6cDUJcSz7Y7ezGUo29w3u9UB+fnYOlFTWJywzxe9Vk 4be3CvdJDDnT0DrNTciV6iC4WlqtdTPl8rT4S/SOmx4fmMI2lZmmwzh7gu+ucBCYFiQv 42Up0oDWOGB0KqUZj/niirrYt3A1WSfb82UC7eyP17zQQDMoU5s11o4Ph/hL8vcRMRp2 OzjKYtlrQD6jCs7ohoRPis3WHzF0E77GvzhrbezACGbsVM314d4b//6HcIVlWmokZ+Ce D2Yg== 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=JC/B9xxecCtdBjdPm9t0zfpU+ETjmFOjJKj1KVodMmragb3yDLUP0hF/jZ8j1P0AsG aPvIH7fwzYZaFjVEMh500MiPgBK7aTlkjcap1Zy8rUn0HF7Y5vHwXJnA44+tHK34fFht GSX3+wytUJj/ytxoj14U/jmTRW7+LbbhloH8+sec9aEOusgoboK4sv/JFjNWXjuPnHqV YA5/XpF4uq2AAFj4cR/h+gfY7H+zU/Zt67u/sbmP+ATchGJ2SpDNDx+Cuhs9rh6UmzYH N41fGFSNjuueqKfyfsMJfn9fBpSKyVIGU4BBdrnm/An9/0/u8nzaBBkHtCEFMuep7rWD Qd9g== X-Forwarded-Encrypted: i=1; AJvYcCX8o5GY28LWCdqg6QNZvM5zzCDeA6q4z9x8DlU5Gvp8ynT0jqtRAq+RumF5QqofUimB/6rOh1kdAQCTdvZEZJZpYLwKv9Bs3M0b69Hdnha50V3QZzo= X-Gm-Message-State: AOJu0YzmSv4hujinXOnyE9S2onWlEuhNEF0VgydpT8aRAvxMgwyItbgk 6JEvFwJCUyFpqQmHgj+Sgw++AkbLsD8ynjNKnRn01Dg4g40mq3evInri57j5i7g= 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240331_132914_314194_368EA3A5 X-CRM114-Status: GOOD ( 15.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org None of the in-kernel DT files ever used edid override with the fsl-imx-drm driver. In case the EDID needs to be specified manually, DRM core allows one to either override it via the debugfs or to load it via request_firmware by using DRM_LOAD_EDID_FIRMWARE. In all other cases EDID and/or modes are to be provided as a part of the panel driver. Drop support for the edid property. Signed-off-by: Dmitry Baryshkov Reviewed-by: Philipp Zabel --- 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: 13612295 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 282E9CD1291 for ; Sun, 31 Mar 2024 20:30:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MY4CCTfk191YaxGhk6h/P2gycRkGkSX1X+AjE8Z92kE=; b=Ffc30l9dKTXduA avyMLnMKWut3z9juwM93p1oOheVHp26fFOsxnuPn0UrRaqTbbYxtcXtI280ZgSPsV5H7rN32pdViB 3+gzEft+uyRc477yeYWkZYLAnd9Qap6BnzqkY/DNXT8LCVRCIgNKcIib3EzlTwzrVjbqQyOWz0T+s F6NdB71jGmzdA5bMpTEmNlHw4FJGzuLBGeaXW33c1vOG3kjGROTvHpT6d307YD769pIvkChX0VJT/ Q85O1+fFBewPQnJZlYU0jOEU3etiQ8gp9rhc/TMkVQ7o2t4MEigOOSsT+rSKvdCpnY+qubr62JmZF dQaTyyQQPFTlmkm8TSJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rr1oU-00000006GFQ-1cCT; Sun, 31 Mar 2024 20:29:58 +0000 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rr1nl-00000006FpZ-3mCc for linux-arm-kernel@lists.infradead.org; Sun, 31 Mar 2024 20:29:17 +0000 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2d6a1ad08b8so35091401fa.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=1711916950; x=1712521750; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Wz3UhJ4xYSdgm48WihXb5Ur775HB6HGFpy/cnlygSBk=; b=q1UCEbCoLmoFXwPeD0Q7Ant97HWU+2qLWTPGeeQ0tHhKVwNW399sA2JAcQ781QWBeq iYZTSi+Sqdp8/kmmUzG7ZBGbhH6MuFIMnaQIpDJn+L/LnRL/jNupjIg7161Q32Z3UNE1 9TjZ5hQMVq4LoT5xKO6WAqzXM0KpBwpKG2tp6dvxTyKb/nrIPhuK7LA2QJLUNtO2sFS8 ZdpXTkgHKO55+lq4pNw9zm7K7Jx3MYYR1BvRcIxLhbITW1V9sOuyrOAjxNczTGSDRUhn r+vhjlUXZhHUbWuOFfCR57P+M32eUyp9sM9sCOQLmsu3tTnlrKWQqe3OcLWXXbiVmTLK C7aQ== 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=aD+hNkaPRKuT/LoWjsIlSkrvE/RBNE0vPAckaZcyn+1zgwn1ZRH7tt/0HEOgMiMH2/ v0CNDmAv4HNL3wReR/G9GRyMhaPbwnflMOq4nDr2pNE+GJBfzq68lTHFRw/031wQevsi TsiuVYlgwdYC8Ozuz+Rhuw25xIIfR0n0QzJIQItrX9T38ChtU9Jv/OitxVNN+rJ22svy 6mbzV0ob/jk+jGMncyLKo9yoTaCjdCslCymLpb4chAEmwnELuykhPs54n2NEBtfQnQ1o R9ehGrnFhoHNBls6PNu2quc1EX/EMkXCELXHobvCYWshcDwGnkvCL6FZPugzB53xhw/x 6wYg== X-Forwarded-Encrypted: i=1; AJvYcCUYyRJrxRKu0Jfe9t4w1X0Hrr7pcYTcuTL9L/oh0zEJ3aMJpMyJSvrnjSzQOQPK6RJQ4ec0IBKtHXCyKJJaggxA5ll6+urKfmtTj65yb5INY3tRTfo= X-Gm-Message-State: AOJu0Yz6AxmUJFHDSdJG/0lI1N+Scu0F7L4Ndquq3kudSJyT+xiqIr2+ yWcszuLAwHcxGvou0IIK5EBgMUi3Rnee8ktGux/5B9wnzbOWvAirenoAvaSvKnU= 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240331_132914_334174_CB91849C X-CRM114-Status: GOOD ( 16.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Bindings for the imx-ldb never allowed specifying the EDID in DT. None of the existing DT files use it. Drop it now in favour of using debugfs overrides or the drm.edid_firmware support. Signed-off-by: Dmitry Baryshkov Reviewed-by: Philipp Zabel --- 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: 13612296 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6A60FCD128D for ; Sun, 31 Mar 2024 20:30:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=f1v8Edoqpxd5D+dKU5hTYS8055bGcmmXIigSZB/NW0o=; b=rzeAjhw33RPuYq xejy6yjrJlQsV7cQWNNGFa27JFwDzRn1OhRY8BkvXxfBYdYRJ3AiFy0s8zTtBcsi94B2rmSSDiy8n OgVWElXm9P46FiiWzxwKbZguW6IfoG10La98GZYSOYUBY9JJTamNQz3u5yGvxeXm4ZuXd/Y1CdJ+q I0NGo7bEv45uDNNl+8TzZetis/VzyfqXsLQQ8SgnDiGk3So4uO0x5HPb1F/V5dO1+3rk51gk102kP HGpd4uzQ9OOfulEPpgjP5+KODcYlvm9BYTnxOcQLdegl9klH8axLpsI99UTxYWHBhr7Ss1aIU+j33 /IgPQCjJu52TtvTVBNxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rr1oV-00000006GFv-0oG1; Sun, 31 Mar 2024 20:29:59 +0000 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rr1nl-00000006Fpk-3peo for linux-arm-kernel@lists.infradead.org; Sun, 31 Mar 2024 20:29:17 +0000 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2d52e65d4a8so48553411fa.0 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.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=hSjZJV2J4iFvn9E2c3TLDDuj0HnPcaUsZUNdMjQiU+w=; b=EBrkIbeNIAZDqGk8Ijj1xx4pC44S+KpNq45dxLtV+5x3JmKYQlKOMZVSaODY8H8wA+ nXarf2yaZoKqY9WevSD8/IJu15s5npBhi2Frziw7nJn4Z/EUD01GoH/UGecXNkQP373Y pCg1ic08+HpkMc0bTatlDO8ryVj9CMhf7WA3C7D5gh8fQg+Tvm3TnLSpqz0v2dzzCVe0 r98ViAK08WXtJyOL2M1h7LaYfT8tkfqM5ahD6uww/39L/LKeShb39qnBPX9dYgxgU86v etLwi/wkFwvPkQt/eoi/c8BDkhDM6YzfEBAJTyQN3Qvc8rkvuv7z4mvvRpb5S2pcgCGk LXEA== 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=B4F09il59Z9VQD/e0VffOxdTNXTdF4qDquQpoiUpiOXjBG1gPaI4X/5X4Hc523m68L 6dlI0EtFMw/tdm31syAZ8EY0uefaviR5jFXQ+xtPZRo0p/IBr+s0+aa82Yjhjky5IFpu 95gXS6GGvFSfuobM/ramCoTvcZOoCNpcOxab0MVLQMdVZj7iKRrnGzm9uRUswXeGJ1Fw +fmPxGsCX7kujwzTRygLRCBXkz5PbK2jxHf/IWEy70eH79seACiwAqRCth8YYWvTLa6Y dY/HHUHtmt4qlS6401rqTGipII3VCaaznqZDvCJBicz8750ZF3Hosiz+dKX3zvdEgtlu uoCA== X-Forwarded-Encrypted: i=1; AJvYcCW1rO791psKJJbfE4D1tNtK6DK2O16DIyfdCu5UdVTdPeol3FLO78SIXmmbs/iwQs37pldpoAMI9Tjb26CTKg8dRbAINSFAqUD9wB+apGgHO7O37dA= X-Gm-Message-State: AOJu0Yx/sD4V5sPc2Qmvrh818q1tDGnJE8iM7yurYa9i+HBwtpEEOjJK zNYnYNjyk7r758kQtE1eZvHrr1F1YmMd8z442r+o/r6/r5wnSNL7fBf8yFvXRCLjl/G12iqCxEr o 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240331_132914_360098_4700FA1C X-CRM114-Status: GOOD ( 19.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org None of the boards ever supported by the upstream kernel used the custom DDC bus support with the LDB connector. If a need arises to do so, one should use panel-simple and its DDC bus code. Drop ddc-i2c-bus support from the imx-ldb driver. Signed-off-by: Dmitry Baryshkov Reviewed-by: Philipp Zabel --- 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: 13612299 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 42A87CD128A for ; Sun, 31 Mar 2024 20:30:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0NwMWq1EQwKlNZOOdWKcOLmwCabDj9+d/YS+GY12k4k=; b=SD1KIghZcze41+ mrePlDLdJhYNzfj5o5QadXlYoHBOMrO4tCreJ+AMCJhb+CNBXSMwrXJTg0FA8XeaQxDt6fcJcTPoX n3t5YSVxmhbffGUuYF4ZGEDft/xSuPbpkVT/gbxdNnBzU7LiBbZf0SWDsMAJHwJg1Yxq7ykbo1ZKz aPtcYCxj59nRS2QFdZWV248ygVOlHY8fCuwG6VNF669M5BAfOTA8FgRfrkVzA8ga+3uwrkeBmqIRg LsTBgdxB7X4j/t0LsFCizKmEVEQzSsofearZOG7eebFnSF4ygMSm12dcCBJebzM74Bm21p8EUezbA odyyZZdXGkQfjxD949gw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rr1ob-00000006GKL-0cqe; Sun, 31 Mar 2024 20:30:05 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rr1nl-00000006Fpt-28vX for linux-arm-kernel@lists.infradead.org; Sun, 31 Mar 2024 20:29:16 +0000 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-513e25afabaso3711948e87.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.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=gQrqHaLGIND2BZg43nPVGmV36Lb8S+V9//5yRGyhuc4=; b=dxs8453EAHs9hZDlnzI5ZqMf3IAujWupnz/pS7iOpYhap2879Ub2S9K6nLic0jOU9x dXXSmER+qrosBA+jmfL1kcTgoB6Bdbg6/3wBGlYtoKSzjhl9b7j2PkFynII2roVltUCr Ttn2u/xwbYlSPUFe1HyY8gKeu4VwmSQB0BAtcfMTxwsx5NAGN2EfXNLc8+SK0k6aMuno XwehucoSk8rzSMZQFiJSHy3l23uOBkbbNbKgYvIRnZjbBqhjjJhnxrAvDhr32Dq9nswo 6I2J1I9HlvgHwCVqYN8h/dKBMscuDvtJAXIKhLuZkCAkTbi1c6JnhqQMGLGnBYZPR8mJ YxJg== 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=paBVix96zrTxV+dZCO2kLRB/NXFcRuli4mIhQ5Z9ni5JkdcnxGelUvIOHbbEBOpUGq 1DrrZpvrE/he00qmTnsw5b1HtHlIfXcd1rdN5f3PaCt3r20RcR7kGZbHfheAPxmX9H1J mwOm9XVV4DLQGuueYeAWYNO5xTDCPkkXrBi0+6xaUQq/c4405FgfqeAsu3YTpBVgUgVK 9khT/8+gdg2csuNtC9fsEqEBThL2z3nd0Aw0xQcjOfWwN5e463bgR5RcojsAFSABsGul mD0jyxaokpxWVPjKXV7nUpkdXmwhRPREaU7xVe/3uBFHwQLLkZNYolefwNXmC6k+PvNi rQng== X-Forwarded-Encrypted: i=1; AJvYcCWowCC/RPom5gapM3LYDI9rWBhTBeD5bfEdwpq5TWdSxWiPUtzB1OtP0IUZ574+IOjshCwgWJ15hGHeqtp2SbpUTEymgqOslOStQ2s77fAh00I0tT0= X-Gm-Message-State: AOJu0YzoQLDa+LDEAsAgPWw1LAmD4samQGgt1MOAN8beeGM4ZEWhFwpe qCQ6QE6IVuxSFh1h1dKFZLQ4vPYaPEW32YVJ9zxowSHMVG0UIwGYEX6AxQImF7I= 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240331_132913_982549_9FFE39A6 X-CRM114-Status: GOOD ( 21.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Defer panel handling to drm_panel_bridge, unifying codepaths for the panel and bridge cases. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/imx/ipuv3/Kconfig | 2 ++ drivers/gpu/drm/imx/ipuv3/imx-ldb.c | 44 ++++++++++++------------------------- 2 files changed, 16 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/Kconfig b/drivers/gpu/drm/imx/ipuv3/Kconfig index bacf0655ebaf..4e41611c8532 100644 --- a/drivers/gpu/drm/imx/ipuv3/Kconfig +++ b/drivers/gpu/drm/imx/ipuv3/Kconfig @@ -28,7 +28,9 @@ config DRM_IMX_LDB tristate "Support for LVDS displays" depends on DRM_IMX && MFD_SYSCON depends on COMMON_CLK + depends on DRM_BRIDGE select DRM_PANEL + select DRM_PANEL_BRIDGE help Choose this to enable the internal LVDS Display Bridge (LDB) found on i.MX53 and i.MX6 processors. diff --git a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c index 380edc1c4507..74b41a507219 100644 --- a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c +++ b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -65,8 +64,6 @@ struct imx_ldb; struct imx_ldb_channel { struct imx_ldb *ldb; - /* Defines what is connected to the ldb, only one at a time */ - struct drm_panel *panel; struct drm_bridge *bridge; struct device_node *child; @@ -136,10 +133,6 @@ static int imx_ldb_connector_get_modes(struct drm_connector *connector) struct imx_ldb_channel *imx_ldb_ch = con_to_imx_ldb_ch(connector); int num_modes; - num_modes = drm_panel_get_modes(imx_ldb_ch->panel, connector); - if (num_modes > 0) - return num_modes; - if (imx_ldb_ch->mode_valid) { struct drm_display_mode *mode; @@ -194,8 +187,6 @@ static void imx_ldb_encoder_enable(struct drm_encoder *encoder) return; } - drm_panel_prepare(imx_ldb_ch->panel); - if (dual) { clk_set_parent(ldb->clk_sel[mux], ldb->clk[0]); clk_set_parent(ldb->clk_sel[mux], ldb->clk[1]); @@ -234,8 +225,6 @@ static void imx_ldb_encoder_enable(struct drm_encoder *encoder) } regmap_write(ldb->regmap, IOMUXC_GPR2, ldb->ldb_ctrl); - - drm_panel_enable(imx_ldb_ch->panel); } static void @@ -312,8 +301,6 @@ static void imx_ldb_encoder_disable(struct drm_encoder *encoder) int dual = ldb->ldb_ctrl & LDB_SPLIT_MODE_EN; int mux, ret; - drm_panel_disable(imx_ldb_ch->panel); - if (imx_ldb_ch == &ldb->channel[0] || dual) ldb->ldb_ctrl &= ~LDB_CH0_MODE_EN_MASK; if (imx_ldb_ch == &ldb->channel[1] || dual) @@ -347,8 +334,6 @@ static void imx_ldb_encoder_disable(struct drm_encoder *encoder) dev_err(ldb->dev, "unable to set di%d parent clock to original parent\n", mux); - - drm_panel_unprepare(imx_ldb_ch->panel); } static int imx_ldb_encoder_atomic_check(struct drm_encoder *encoder, @@ -641,13 +626,15 @@ static int imx_ldb_probe(struct platform_device *pdev) * The output port is port@4 with an external 4-port mux or * port@2 with the internal 2-port mux. */ - ret = drm_of_find_panel_or_bridge(child, - imx_ldb->lvds_mux ? 4 : 2, 0, - &channel->panel, &channel->bridge); - if (ret && ret != -ENODEV) - goto free_child; + channel->bridge = devm_drm_of_get_bridge(dev, child, + imx_ldb->lvds_mux ? 4 : 2, 0); + if (IS_ERR(channel->bridge)) { + ret = PTR_ERR(channel->bridge); + if (ret != -ENODEV) + goto free_child; + + channel->bridge = NULL; - if (!channel->bridge && !channel->panel) { ret = of_get_drm_display_mode(child, &channel->mode, &channel->bus_flags, @@ -659,15 +646,12 @@ static int imx_ldb_probe(struct platform_device *pdev) } bus_format = of_get_bus_format(dev, child); - if (bus_format == -EINVAL) { - /* - * If no bus format was specified in the device tree, - * we can still get it from the connected panel later. - */ - if (channel->panel && channel->panel->funcs && - channel->panel->funcs->get_modes) - bus_format = 0; - } + /* + * If no bus format was specified in the device tree, + * we can still get it from the connected panel later. + */ + if (bus_format == -EINVAL && channel->bridge) + bus_format = 0; if (bus_format < 0) { dev_err(dev, "could not determine data mapping: %d\n", bus_format); From patchwork 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: 13612294 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 03F14CD128A for ; Sun, 31 Mar 2024 20:30:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jVb2bb8ZlfwQOhJWIliic6UxJ6jHLKWJlAJvfud0rF0=; b=N9wOyJJGEInu4h kl8o5XSWncPYJqJm/JsqafpOLgxAwZO8N9ABAt3vt651H1XgnzhlajEBhmi8m4NhqwFlAMK921pmn +wqWsCR8l++YwkSszeTMwrpCkkMpX6tIw6FKFYn9UlffiVwrj+04r2eFw6YQuL/ZaD9U9TNVDyeLn Z79/F+M63OWQsUROhgVLkbI6u6F1IofRVDOHRX1W8Ecom7t8aS2aljCW6wIG30SvlVKt1F4PPYO8i 9CkJKdr6Z4ES1gUaCs8Z0Bo8MaKcwCHRGo7Gg1vYWloccBLPTNZ8xt9Ri+VNUSDgHnL0aEa22Vdxi 1occIhLKcuHUTvXVxE5g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rr1oW-00000006GGV-0fAP; Sun, 31 Mar 2024 20:30:00 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rr1nl-00000006FqZ-3qzr for linux-arm-kernel@lists.infradead.org; Sun, 31 Mar 2024 20:29:17 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-515d49a6b4cso1545723e87.0 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=1711916952; x=1712521752; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=2NWUO8Sy6JPSgwKkrutWi5HBoELv9lWKNmrIdWaVqOA=; b=L41HcnX1KJRdNiwu0C/7cG0djwZ1aNHecFwtuJ2TWiu9f9NRNz5hOwQItB/gcjo8Vd xXygi3OrKfrVaZej6CIZ19hoXnP8XrUfE0KeY//2BcgXRepK3kL65FHOraiTdAvOy14U cuxNX1ooSfy2LUkBx8ZzUQlzfaRHr8uBlu85ZM659xlz7iJecg0ePl8GVibs5AGqigwW CHawhCeyo7MDbU+Jlc5WFjtV/kW26FBCMBL49Tno1BHvnbmJhqQlLPRSKbM41sMH3sLS RsIBGvOWdQhd6MN/5wkKFeAZh+as93aRzG6ebNYV1xTAKAI8BrYxlQLQZilbH9jUciyI Eu9g== 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=d1MGcVIeksR4NoC35QGkRCjBrSsykgjjD2sosG3yS41yod3bN/p9ysM5aHRRMNl8aq IbtLTWjzZG3Pa6R1pj4/FhXMQ/x3qWASR+Ez9llLyihlXszsYa59nZPof7tknE3RFKJM APZ+Y0wDsszgcpaE2KYMeN6BIF4uU4pZxKnXAS8nKi5dVEGTU4hP6ciaJ5X7ts4DRfFj NgP1X3AmMBmLYttr4LJBr64cjWgUjcTajD6PtdDur4ubOlFwtF3czMfuLgmy4bMXasWN Pvbnn6BnyQlgY4zVtEpPFlQ8zPXn6VgVLNxdp9T3uoMjejreMhrLssANRV7kYdGMRUsT eysQ== X-Forwarded-Encrypted: i=1; AJvYcCX3kLoRbgtE9W030MruiU6C6YRKIkUO9h7JmnaPhY/H2xlUOVd3B31XYtyrvRZei7tjMkx0emzkUAegUjenP2B3bWTJA0TdL+KHNyyQBU4dNk9ABdM= X-Gm-Message-State: AOJu0YxicTT/gJNCvp0UC4P5wA8hZTVKSWDiTLWzaZLcGX7h5pmCM+CE fX7C1sAWEh9nt7BRS5LFXgNYFyHdWwpzTnEyKI2fr1wU+OSfhbXFnf+3KuKTznw= 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240331_132914_433838_B8E99E1E X-CRM114-Status: GOOD ( 15.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Defer panel handling to drm_panel_bridge, unifying codepaths for the panel and bridge cases. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/imx/ipuv3/Kconfig | 2 ++ drivers/gpu/drm/imx/ipuv3/parallel-display.c | 35 +++++++--------------------- 2 files changed, 10 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/Kconfig b/drivers/gpu/drm/imx/ipuv3/Kconfig index 4e41611c8532..8aaf2441bcef 100644 --- a/drivers/gpu/drm/imx/ipuv3/Kconfig +++ b/drivers/gpu/drm/imx/ipuv3/Kconfig @@ -13,6 +13,8 @@ config DRM_IMX_PARALLEL_DISPLAY tristate "Support for parallel displays" select DRM_PANEL depends on DRM_IMX + depends on DRM_BRIDGE + select DRM_PANEL_BRIDGE select VIDEOMODE_HELPERS config DRM_IMX_TVE diff --git a/drivers/gpu/drm/imx/ipuv3/parallel-display.c b/drivers/gpu/drm/imx/ipuv3/parallel-display.c index 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: 13612300 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 03512CD1284 for ; Sun, 31 Mar 2024 20:30:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3Svw5ixYJXpBmCyFvjsr/FPEp8RwXsPQr37WVnwjzGg=; b=L7cGQxmUcSXbyO /ng3qaLyH8jXA4rVZraJHjpor5JSztEhap0i6ghEZsxQDcAB+kGHMFBNAyYzHIqIDayWT6MxHJdy5 3oHARYn2/nB+wgkv+y3qZ/OKukcgP+ZtVL/TrrJg/4IgGsmIJMnc8BTiHlQn0fJ+s7dvNbBxoaUbz 0itYuoFHnkt/5GlulX3XV4EXIAhVwXWKURRDW9yu0LwXnUhPCUgcSPULuGo5S7HEBpS/1gJUW5Bv4 TR35yqMuRVUC6MRuNYhs81ScUl7sjVKcicr97CoqrvyXdjiNNgJiluTPx1ns7yYjdeKZKAJPJenBm E+IOssy3jzYZywMmEjMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rr1oe-00000006GMR-05ld; Sun, 31 Mar 2024 20:30:08 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rr1no-00000006Fqh-1rTb for linux-arm-kernel@lists.infradead.org; Sun, 31 Mar 2024 20:29:19 +0000 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2d4360ab3daso44027931fa.3 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.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=R1A7wX6hNUy8P/zQgxOCI5nxQ7K8DEqd4NjplmpDLtE=; b=pxr9+OJDg7RwMq1TJykNgn/eha2jJyjjmhGoNiRUy+Jwh9x4zj0wx00la5kMnr8VJx 9WLTlDw9JBHcRLvEApHTgoGd1RL+3SXEA80uKiDWOiNjt2o398TLUuijs/ih8X9kTQAB CCBIFLkoZxF82dVkJxFcz4shCFPf8wd0Cfah8NS83zTTPodJazrCa5kEw2Jmh4944hlR ZfX/w0wzfXWCzoX9TrVdahaDfSKwaFMTvat26EbrKNSWSEpZ5JBq8LeqRxlRBpVLfOGS a2fuJ+DIFj3riX2H6+IteSel5KlawpvtQWOO4B8y8fXImn4jjZhcXEuhN2l5yYB2MRX2 vn6A== 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=QGEcSdE66BgzPM+QAyKD+wie/uPU5sNrGgEVdgA3Iz+ga2PoHUVQ4TBgHbYZtwfpjw 5QZAnQHpzkARwYDdBUXrUjTxJg8etPyMRguSekN4I1Ox4dsvSqQT1boDq/ghLM7sWn6L FjrcQOIfJvGrxgC6lYWsK5jTxkBVOYNSjRBjwQLdjtRcbsnFmZAyhdaEru7RlUaloOAt k08WIaDU2sIq7WvjdZ7/xZicF2nk0EsLwF+3pBir8TsTnEBkRWHFk+evQPM/g8X0NxaL jXQFVRqybVhM/Hk4qImGg7+l29ZDfvY/6Rmvg8Rx+c44cxNO80RMM1NDKoB8kdf3z6jE XD+Q== X-Forwarded-Encrypted: i=1; AJvYcCVdDgpIPem4L92sgbh54Gma0YwrfQVn5TIiZUkKGO+vunn/D2QZqE/H7mWNAxJ5msIyj+ZVLQwUunmIZMO6eisEx4Ul+fGej2ebTyRCg5yjRZqmick= X-Gm-Message-State: AOJu0YyP8S151GBwhWBiufVNwdMTRc71UIWCAPgoi2gjI5ieSkw14+6j Mk6A9Ufg8WmaR+4FLuOWQKtIXZ7pIhB+g2r4v6eMIeGwPUgAwxrceRIYk+ifkC0= 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240331_132916_688531_61722744 X-CRM114-Status: GOOD ( 18.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org i.MX DRM DT bindings allow using either a proper panel / bridge graph to provide information about connected panels, or just a display-timings DT node, describing just the timings and the flags. Add helper bridge driver supporting the latter usecase. It will be used by both LDB and parallel-display drivers. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/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