From patchwork Sun Jun 2 12:04:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682809 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 DEC48C25B74 for ; Sun, 2 Jun 2024 12:05:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:MIME-Version:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=7yn7vmoCndIfDdOm6JmrA2doQPnrnOglLk1sZyJVySg=; b=RWNcXXeyI0FtPk WKQRPItAmjYk6yjRRLxEtA/a6uOSCP5p7eQUhSBlc6bNXWJ+QjTv189qLrlxXxRlp75iAJzI/yde3 6CkJmm9mGY7Cjg+UjC0oy5dT1ZEyce4mrsxV8fGw97K+D8+FWfsm9ZROJ/EoEy7JVBNScxTGn+pAD rgbkh5xJUYw2fuH7ezPbEy5c7fCVsIqdkajAYFpD2MKxdYItCKCtJlPBlPY9BBmuJQOMRdf82M9P+ afgFIPIdfOCNYxfQNWOpAMotmMjYQkKZFvCRQISvS6Nyp6m4u7u0+caV/fgghctUWfMoGHoggYufn IdBLBxOffDYIRB2yCyRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDjxG-0000000EBO2-1Goa; Sun, 02 Jun 2024 12:04:54 +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 1sDjxC-0000000EBLg-0w4w for linux-arm-kernel@lists.infradead.org; Sun, 02 Jun 2024 12:04:51 +0000 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-52962423ed8so3901329e87.2 for ; Sun, 02 Jun 2024 05:04:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329887; x=1717934687; darn=lists.infradead.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=bVpQ9KTWQnvGE7mVXDOxEasU9Z/mylcYXt83Rqw6UYA=; b=yr/G+eF3/dImw/lBF0zVUTmmERkISfQ61WdHnkqFBw95QI5e0SxDuKlFM2Nh4K+NR8 jZbZQCDD0oElTkK9SWJllHJivQ2JkxzyW1U5bMKjlZFAUa4CdumjySRLv57c/WLqtyJR kAi6/6a8u7iXJ6gQzQWfdQcWTEeFQTfsLWCpZXVidkb/g+7eK6UJVbMrL618H0urKZsr Y0l2Wj3oKm1c8WeH3bM1SivaB07tOYkeFt0W+IzVH6WW4iF2QiPyLqU0x8eI4ga4sc5c kFCOotSNrtf6cAwWHSFEVEShag8TVdcDLD6npR3KG2jLAjlcciXz0o13VxkeaFEeMThR Yomw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329887; x=1717934687; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bVpQ9KTWQnvGE7mVXDOxEasU9Z/mylcYXt83Rqw6UYA=; b=mvT6h+0OhcAkxcdAk6+k14SUoYgGcsn4bQB2BoJYZH0SvYemS5SzhC2FXSxS9aEZoc 9aoRIbCuv1EhvjN5qyEqgDptKAdYs5ncyO+TzYAiKNDY+3zLEG/zBHa4QSe7GZPbVFJX yVkqBq9WT+P9xTQXtYlC7UdD20TotX6vjmbgRFvSH2lNbJR5yBwjCWd6oPUrXPMe4duT oaN/EveR9GeXS1Vpt/vLogvb6dgxyh5xIm73uvIV7Ma4c34+joyk5lXrJsXlPgGTyNOp CM4zLOS9+zzAl/Jiyq4kpqMYZC0Va+vg9RGUkq6yBjNYUulSKFBqypH7CA5Sh2Y6or5x /QnA== X-Forwarded-Encrypted: i=1; AJvYcCXMyzpLkpsmDO3BX6+H20oIw3tv19/gVIdKEsP5LylR7TpfZaqTNFdcIDUPukDoRHRMWhLrkO91kcEuaG+Bkd43RsvgMs+wqnWbeTUI1WppIryNTas= X-Gm-Message-State: AOJu0Yx0i8Hb80RYlY15j1otjK+R7P8ONyPOP0vX7nxwpuoPSvW1pr+Y nWNmYpPd+3p6ZdIBOt32kqJjTTcQDse6W6x+VBxPW4O+cmzRz3I5GhQ+JgXPZI4= X-Google-Smtp-Source: AGHT+IH0OCAVf7Viy0SnkcBSU+0nSO7mIL7DWaDsWecoCFeQANoteXOODsNnvtjUBpoFJrvccIysMw== X-Received: by 2002:a05:6512:546:b0:52b:6eef:41b5 with SMTP id 2adb3069b0e04-52b8949d408mr3880501e87.0.1717329887192; Sun, 02 Jun 2024 05:04:47 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:46 -0700 (PDT) From: Dmitry Baryshkov Subject: [PATCH v3 00/12] drm/imx/ipuv3: switch LDB and parallel-display driver to use drm_bridge_connector Date: Sun, 02 Jun 2024 15:04:40 +0300 Message-Id: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIANhfXGYC/23NzQrCMAzA8VcZPVtJui/15HuIh9p2W2BrR6tlM vbudgNB0UMO/0B+mVkwnkxgp2xm3kQK5GyKfJcx1UnbGk46NRMgCsgRuPYDp2HiqjfSPkaOUBe VPN5qbEqWrkZvGpo28XJN3VG4O//cHkRct28Lf6yIHLhBKBoolZQlnnuy0ru98y1bsSg+gPwPI BKgD6hQpwFRfQHLsrwAfMNl+vAAAAA= 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=3478; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=tDhdl6ndKx1rU2B3KL4Ll+b3IGwWYDy7W+rlO1NBJB4=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmXF/cCUe+k6YWW2BRfgCEKRxPkjQwq57MgL+cW nx3towqy1mJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZlxf3AAKCRCLPIo+Aiko 1ehKB/9c5Rx2Sj/Cri3wep/fmmNJPdXkNBtkyF9Ax9+w0EJ4kQMFEhl1QfJ0fUO8wryr5IoJLdG QEXgs0sNFdlTaIP3sVoUg+3ZGqm7msxoXTLmGnDsgfkCdHVdKHV3y+UPI+DgxXFyCPBL2+OmFw7 rm0WX+0ct3n+/bmWOu8MP4D/EASb8xhCTqyKd1uibFnjecsRVAKe2gEHQpk1ac7CS/tjuP/R6R5 ESDvFwpgQ3sSleY4XDaeuGB+xHKWe3l3pN14CypGdAow7C32U/2NOUP2U3TfFwZPatNU5KpLO9B 9yZLh6MFdoDqIflwdVE0xlsGMTW13HsxDCNG/SrnxQw9ksZs X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240602_050450_356996_63BB87DB X-CRM114-Status: GOOD ( 12.71 ) 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 IPUv3 DRM i.MX driver contains several codepaths for different usescases: both LDB and paralllel-display drivers handle next-bridge, panel and the legacy display-timings DT node on their own. Drop unused ddc-i2c-bus and edid handling (none of the DT files merged upstream ever used these features), switch to panel-bridge driver, removing the need to handle drm_panel codepaths separately and finally switch to drm_bridge_connector, removing requirement for the downstream bridges to create drm_connector on their own. This has been tested on the iMX53 with the DPI panel attached to LDB via LVDS decoder, using all possible usecases (lvds-codec + panel, panel linked directly to LDB node and the display-timings node). To be able to test on the iMX53 QSRB with the HDMI cape apply [1], [2] [1] https://lore.kernel.org/all/20240514030718.533169-1-victor.liu@nxp.com/ [2] https://lore.kernel.org/all/20240602-imx-sii902x-defconfig-v1-1-71a6c382b422@linaro.org/ Signed-off-by: Dmitry Baryshkov Tested-by: Chris Healy Tested-by: Philipp Zabel # on imx6q-nitrogen6x --- Changes in v3: - Notice (soft) dependencies in the cover letter (Chris) - Select DRM_BRIDGE instead of depending on it (Philipp) - Dropped unused selection of DRM_PANEL (Philipp) - Added missing include of to parallel-display.c (Philipp) - Link to v2: https://lore.kernel.org/r/20240331-drm-imx-cleanup-v2-0-d81c1d1c1026@linaro.org Changes in v2: - Fixed drm_bridge_attach flags in imx/parallel-display driver. - Moved the legacy bridge to drivers/gpu/drm/bridge - Added missing EXPORT_SYMBOL_GPL to the iMX legacy bridge - Link to v1: https://lore.kernel.org/r/20240311-drm-imx-cleanup-v1-0-e104f05caa51@linaro.org --- Dmitry Baryshkov (12): dt-bindings: display: fsl-imx-drm: drop edid property support dt-bindings: display: imx/ldb: drop ddc-i2c-bus property drm/imx: cleanup the imx-drm header drm/imx: parallel-display: drop edid override support drm/imx: ldb: drop custom EDID support drm/imx: ldb: drop custom DDC bus support drm/imx: ldb: switch to drm_panel_bridge drm/imx: parallel-display: switch to drm_panel_bridge drm/imx: add internal bridge handling display-timings DT node drm/imx: ldb: switch to imx_legacy_bridge / drm_bridge_connector drm/imx: parallel-display: switch to imx_legacy_bridge / drm_bridge_connector drm/imx: move imx_drm_connector_destroy to imx-tve .../bindings/display/imx/fsl-imx-drm.txt | 2 - .../devicetree/bindings/display/imx/ldb.txt | 1 - drivers/gpu/drm/bridge/imx/Kconfig | 10 + drivers/gpu/drm/bridge/imx/Makefile | 1 + drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c | 85 +++++++++ drivers/gpu/drm/imx/ipuv3/Kconfig | 10 +- drivers/gpu/drm/imx/ipuv3/imx-drm-core.c | 7 - drivers/gpu/drm/imx/ipuv3/imx-drm.h | 14 -- drivers/gpu/drm/imx/ipuv3/imx-ldb.c | 203 +++++---------------- drivers/gpu/drm/imx/ipuv3/imx-tve.c | 8 +- drivers/gpu/drm/imx/ipuv3/parallel-display.c | 139 +++----------- include/drm/bridge/imx.h | 13 ++ 12 files changed, 187 insertions(+), 306 deletions(-) --- base-commit: 850ca533e572247b6f71dafcbf7feb0359350963 change-id: 20240310-drm-imx-cleanup-10746a9b71f5 Best regards,