]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/connector: Allow clearing HDMI infoframes
authorDerek Foreman <derek.foreman@collabora.com>
Mon, 2 Dec 2024 18:19:39 +0000 (12:19 -0600)
committerMaxime Ripard <mripard@kernel.org>
Tue, 17 Dec 2024 15:20:54 +0000 (16:20 +0100)
commitd34357743b360c99903b5a59daab08f55b2f41a1
treeccebfa55e085d11123a697b3dfbb42c9f95d3690
parent9ce43bba65698ed1cfc3cfbd4dcc16f6472b28ee
drm/connector: Allow clearing HDMI infoframes

Our infoframe setting code currently lacks the ability to clear
infoframes. For some of the infoframes, we only need to replace them,
so if an error occurred when generating a new infoframe we would leave
a stale frame instead of clearing the frame.

However, the Dynamic Range and Mastering (DRM) infoframe should only
be present when displaying HDR content (ie: the HDR_OUTPUT_METADATA blob
is set). If we can't clear infoframes, the stale DRM infoframe will
remain and we can never set the display back to SDR mode.

With this change, we clear infoframes when they can not, or should not,
be generated. This fixes switching to an SDR mode from an HDR one.

Fixes: f378b77227bc ("drm/connector: hdmi: Add Infoframes generation")
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20241202181939.724011-1-derek.foreman@collabora.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
drivers/gpu/drm/display/drm_hdmi_state_helper.c