From c75795ef5cfb9df9ec843fba4556f71972819669 Mon Sep 17 00:00:00 2001 From: Dongjin Kim Date: Wed, 21 Aug 2024 16:48:02 +0900 Subject: [PATCH] ODROID-COMMON: drm/bridge: prevent panic when HDMI is not initialized in U-Boot Rockchip added to set BIT 21 in register VIDEO_INTERFACE_CONFIG0 when HDMI is initialized, but reading a value from the register misleads functions since the register contains more information and HDMI is not initialized in U-Boot. [1] https://github.com/hardkernel/u-boot/commit/c3c147361d56a08ff8399b716028eb803e8e8271 Signed-off-by: Dongjin Kim Change-Id: I29912c23c8857f04ac5398edec2c7295938e4348 --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c index 906f0f628c2a..03aeb27d2629 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c @@ -3757,7 +3757,7 @@ __dw_hdmi_probe(struct platform_device *pdev, hdmi_writel(hdmi, 428571429, TIMER_BASE_CONFIG0); hdmi->logo_plug_out = false; if (hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data) == connector_status_connected && - hdmi_readl(hdmi, I2CM_INTERFACE_CONTROL0)) { + (hdmi_readl(hdmi, I2CM_INTERFACE_CONTROL0) & BIT(21))) { hdmi->initialized = true; hdmi->disabled = false; }