Re: [PATCH] drm/connector: Allow clearing hdr infoframe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2024-11-29 17:40, Dmitry Baryshkov wrote:
On Fri, Nov 29, 2024 at 03:38:01PM -0600, Derek Foreman wrote:
When a display isn't presenting HDR content, the infoframe shouldn't be
present at all. Currently if we set the HDR_OUTPUT_METADATA blob, we'll
set a Dynamic Range and Mastering (DRM) infoframe. If we remove that
blob later, the DRM infoframe will linger in its previous state, when
we expect it to clear.

Disable the infoframe when no output metadata is present to prevent
this from happening.

Fixes: f378b77227bc4 ("drm/connector: hdmi: Add Infoframes generation")
Signed-off-by: Derek Foreman <derek.foreman@xxxxxxxxxxxxx>
---
  drivers/gpu/drm/display/drm_hdmi_state_helper.c | 2 ++
  1 file changed, 2 insertions(+)
The fix is fine, however please consider extending it to other infoframe
types. Clear infoframe->set in the beginning of the corresponding
function.

I thought that might be the case, but the other infoframes looked like they would only be cleared if there was an error, where the DRM infoframe was the only one that must be intentionally cleared.

I wasn't certain if it was better to leave a stale infoframe in the highly unlikely case that creating the new one caused an error, or to have the infoframe disappear entirely.

I'll make a new patch to replace this one, and include AVI, SPD, and VSIF infoframes this time.

Thanks,
Derek

diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
index feb7a3a75981..1cc4b49b1013 100644
--- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c
+++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
@@ -398,6 +398,8 @@ static int hdmi_generate_hdr_infoframe(const struct drm_connector *connector,
  		&infoframe->data.drm;
  	int ret;
+ infoframe->set = false;
+
  	if (connector->max_bpc < 10)
  		return 0;
--
2.45.2




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux