This series fixes a few corner cases in the scrambling helpers
introduced by commit d653818324ed ("drm/display: hdmi: Add HDMI 2.0
scrambling management helpers").Patch 1 fixes a potential NULL pointer dereference in drm_connector_hdmi_sync_scdc() reported by Smatch. Patch 2 makes the SCDC resync logic rely on the committed state (scrambler_needed) rather than the source-side scrambler_enabled flag. The flag can be stale after a boot-time disable, which may cause a spurious CRTC reset and flicker on non-scrambled modes. Patch 3 ensures the sink's scrambling status is reset on non-scrambled modesets. Without this, a sink left scrambling by the firmware may never be cleared if the first modeset uses a mode below 340 MHz. The reset logic is factored into a common helper, which only writes to SCDC when bits are actually set. Signed-off-by: Cristian Ciocaltea <[email protected]> --- Cristian Ciocaltea (3): drm/display: hdmi: Prevent NULL pointer dereference in sync_scdc() drm/display: hdmi: Use committed state to decide on SCDC resync drm/display: hdmi: Reset sink scrambling on non-scrambled modesets drivers/gpu/drm/display/drm_hdmi_helper.c | 65 ++++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 15 deletions(-) --- base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4 change-id: 20261104-hdmi-scdc-scramb-fixes-750545a23603
