Skip to contentSkip to conversation

drm/vc4: hdmi: Don't try disabling SCDC on Pi0-3.

PATCH Applied Maxime Ripard 1 participant 2 messages Jan 27, 2022 – Feb 3, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/vc4: hdmi: Don't try disabling SCDC on Pi0-3.

From: Dave Stevenson <[email protected]>

The code that set the scdc_enabled flag to ensure it was disabled at boot time also ran on Pi0-3 where there is no
SCDC support. This lead to a warning in vc4_hdmi_encoder_post_crtc_disable due to vc4_hdmi_disable_scrambling being called and trying to read (and write) register HDMI_SCRAMBLER_CTL which doesn't exist on those platforms.

Only set the flag should the interface be configured to support more than HDMI 1.4.

Fixes 1998646129fa ("drm/vc4: hdmi: Introduce a scdc_enabled flag")
---
 drivers/gpu/drm/vc4/vc4_hdmi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/vc4/vc4_hdmi.c +2 -1
index 33ecfa1e3661..0ee446df50a0 100644
@@ -2534,7 +2534,8 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
 	 * vc4_hdmi_disable_scrambling() will thus run at boot, make
 	 * sure it's disabled, and avoid any inconsistency.
 	 */
-	vc4_hdmi->scdc_enabled = true;
+	if (variant->max_pixel_clock > HDMI_14_MAX_TMDS_CLK)
+		vc4_hdmi->scdc_enabled = true;
 
 	ret = variant->init_resources(vc4_hdmi);
 	if (ret)
Signature · 1 line
2.34.1
author Applied
#1 lore raw

Re: (subset) [PATCH] drm/vc4: hdmi: Don't try disabling SCDC on Pi0-3.

Quoted 10 lines · Maxime Ripard

From: Dave Stevenson <[email protected]>

The code that set the scdc_enabled flag to ensure it was disabled at boot time also ran on Pi0-3 where there is no
SCDC support. This lead to a warning in vc4_hdmi_encoder_post_crtc_disable due to vc4_hdmi_disable_scrambling being called and trying to read (and write) register HDMI_SCRAMBLER_CTL which doesn't exist on those platforms.

[...]

Applied to drm/drm-misc (drm-misc-fixes).

Thanks!
Maxime