diff options
| author | Cristian Ciocaltea <cristian.ciocaltea@collabora.com> | 2026-11-04 15:26:22 +0200 |
|---|---|---|
| committer | Cristian Ciocaltea <cristian.ciocaltea@collabora.com> | 2026-11-09 21:36:56 +0200 |
| commit | b4146c6155b1efefe8caa604ed9cc7a2673f8591 (patch) | |
| tree | 9631fce5bf36070fa092ed8ff7bb720994c0826e /tools/perf/scripts/python | |
| parent | 59d532e39ea794ba6d0f8e8acd1ea4fb20d27877 (diff) | |
drm/display: hdmi: Reset sink scrambling on non-scrambled modesets
drm_connector_hdmi_disable_scrambling() only clears the sink SCDC status
when the connector is known to be connected. That is never true when a
source driver disables scrambling at boot to clean up after the
firmware, as vc4 does from vc4_crtc_disable_at_boot(), where
connector->status is still unknown and no EDID has been read.
A sink left scrambling by the firmware thus keeps both Scrambling_Enable
and the 1/40 TMDS bit clock ratio set. If the first modeset picks a
mode below 340 MHz, no disable happens in between, since the CRTC was
never active in atomic state, and drm_connector_hdmi_enable_scrambling()
returns early, leaving the sink trying to descramble an unscrambled
stream.
Instead of blind SCDC writes at boot towards a possibly absent sink,
reset the sink status from drm_connector_hdmi_enable_scrambling() when
no scrambling is required. By then the sink has been probed, and HDMI
2.0 expects a scrambling capable sink to have Scrambling_Enable cleared
below 340 MHz anyway. The reset runs regardless of source scrambler
support, since the firmware may have left the sink scrambling.
Factor the reset out into a helper also used by the disable and error
paths, gated only on drm_scdc_sink_supports_scrambling(), which suffices
because drm_display_info is zeroed until the first EDID read and reset
on disconnect, making the connector->status check redundant. As the
helper now runs on every non-scrambled modeset, read SCDC_TMDS_CONFIG
first and only clear the bits actually set, so the common case costs a
single DDC read.
Fixes: d653818324ed ("drm/display: hdmi: Add HDMI 2.0 scrambling management helpers")
Reviewed-by: MaĆra Canal <mcanal@igalia.com>
Link: https://patch.msgid.link/20261104-hdmi-scdc-scramb-fixes-v1-3-16a9bb3d64a6@collabora.com
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
