From patchwork Tue Dec 31 19:28:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13923950 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 18A81E7718B for ; Tue, 31 Dec 2024 19:30:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 980B310E189; Tue, 31 Dec 2024 19:30:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.b="c38AdIuT"; dkim-atps=neutral Received: from mx.denx.de (mx.denx.de [89.58.32.78]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5791510E189 for ; Tue, 31 Dec 2024 19:30:23 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 7CD3510486D9D; Tue, 31 Dec 2024 20:29:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=mx-20241105; t=1735673391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kTSJsYIKJaeGiKuNRfscuVxGJheBzxdje6XQbYHlkxw=; b=c38AdIuTLSdhpBlpGZ+3ez2eVK/z12Mo4ZVAbJrj/sqqrvSS6N09PV3tVEZ00G/jvyZtk2 0XMEW5t+vQWlmtGQO2JuafFxD37tRNCkPuJsK8Lg67llc2MrKdH7Oh9JS+aex11Ir59D/B m6XJkajkKff2iOhYZ4paud8tCngHEoZJ5N2TeWL2y4CZEu60IvFC4rk+XmCDTD6UjQfzYo 1SU4D1dhbsSGjlJHZgCPqGDpWXsuZVyj6hykrW2a763UhZD6x5csAvYxIBm4LkO1sE+UNN MEF+a59QJblXoP1Ki06BX447vFMI0sNXdYURucuwt+IEn/IN8ywf8j8JIEme0Q== From: Marek Vasut To: dri-devel@lists.freedesktop.org Cc: Marek Vasut , Andrzej Hajda , David Airlie , Fabio Estevam , Jernej Skrabec , Jonas Karlman , Laurent Pinchart , Liu Ying , Maarten Lankhorst , Maxime Ripard , Neil Armstrong , Pengutronix Kernel Team , Robert Foss , Sascha Hauer , Shawn Guo , Simona Vetter , Stefan Agner , Thomas Zimmermann , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 2/4] drm/bridge: imx8mp-hdmi-tx: switch to bridge DRM_BRIDGE_ATTACH_NO_CONNECTOR Date: Tue, 31 Dec 2024 20:28:49 +0100 Message-ID: <20241231192925.97614-2-marex@denx.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241231192925.97614-1-marex@denx.de> References: <20241231192925.97614-1-marex@denx.de> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 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 dw-hdmi output_port is set to 1 in order to look for a connector next bridge in order to get DRM_BRIDGE_ATTACH_NO_CONNECTOR working. The output_port set to 1 makes the DW HDMI driver core look up the next bridge in DT, where the next bridge is often the hdmi-connector . Similar to 0af5e0b41110 ("drm/meson: encoder_hdmi: switch to bridge DRM_BRIDGE_ATTACH_NO_CONNECTOR") Note that looking at the upstream arch/arm64/boot/dts/freescale/imx8mp*dts , the oldest commit which adds HDMI support is commit: 3e67a1ddd56d ("arm64: dts: imx8mp: Enable HDMI on TQMa8MPxL/MBa8MPxL") That already contains the HDMI connector node. Most follow up additions of HDMI support to another devices has been a variation of the same commit, including connector node, which is the proper way of eanbling HDMI on the i.MX8MP. The rest should be covered by output_port_optional which should make systems with DTs without HDMI connector node work, but such DTs should be updated and the HDMI connector node should be added. Signed-off-by: Marek Vasut --- Cc: Andrzej Hajda Cc: David Airlie Cc: Fabio Estevam Cc: Jernej Skrabec Cc: Jonas Karlman Cc: Laurent Pinchart Cc: Liu Ying Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Neil Armstrong Cc: Pengutronix Kernel Team Cc: Robert Foss Cc: Sascha Hauer Cc: Shawn Guo Cc: Simona Vetter Cc: Stefan Agner Cc: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org Cc: imx@lists.linux.dev Cc: linux-arm-kernel@lists.infradead.org --- V2: No change V3: - Update commit message - Move select DRM_DISPLAY_CONNECTOR to DRM_IMX8MP_DW_HDMI_BRIDGE - Enable output_port_optional --- drivers/gpu/drm/bridge/imx/Kconfig | 1 + drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/bridge/imx/Kconfig b/drivers/gpu/drm/bridge/imx/Kconfig index 9a480c6abb856..db5c8a76193ac 100644 --- a/drivers/gpu/drm/bridge/imx/Kconfig +++ b/drivers/gpu/drm/bridge/imx/Kconfig @@ -17,6 +17,7 @@ config DRM_IMX8MP_DW_HDMI_BRIDGE tristate "Freescale i.MX8MP HDMI-TX bridge support" depends on OF depends on COMMON_CLK + select DRM_DISPLAY_CONNECTOR select DRM_DW_HDMI imply DRM_IMX8MP_HDMI_PVI imply PHY_FSL_SAMSUNG_HDMI_PHY diff --git a/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c b/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c index 1e7a789ec2890..3d63200e468bf 100644 --- a/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c +++ b/drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c @@ -101,6 +101,8 @@ static int imx8mp_dw_hdmi_probe(struct platform_device *pdev) plat_data->phy_name = "SAMSUNG HDMI TX PHY"; plat_data->priv_data = hdmi; plat_data->phy_force_vendor = true; + plat_data->output_port = 1; + plat_data->output_port_optional = true; hdmi->dw_hdmi = dw_hdmi_probe(pdev, plat_data); if (IS_ERR(hdmi->dw_hdmi))