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

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

 



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.

> 
> 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
> 

-- 
With best wishes
Dmitry



[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