On Wed, 16 Apr 2025, 李飞娟 <feijuan...@samsung.com> wrote:
> From a34a1e2dd7aacd45f18775564fce12b03ae4009c Mon Sep 17 00:00:00 2001
> From: "feijuan.li" <feijuan...@samsung.com>
> Date: Wed, 16 Apr 2025 11:07:39 +0000
> Subject: [PATCH] drm/edid: fixed the bug that hdr metadata was not cleared
>
> When DP connected to a device with HDR capability,
> the hdr structure was filled.Then connected to another
> sink device without hdr capability, but the hdr info
> still exist.
>
> Signed-off-by: feijuan.li <feijuan...@samsung.com>
> ---
>  drivers/gpu/drm/drm_edid.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 13bc4c290b17..5cf5d30321b6 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -5607,6 +5607,7 @@ static void clear_eld(struct drm_connector *connector)
>  {
>       mutex_lock(&connector->eld_mutex);
>       memset(connector->eld, 0, sizeof(connector->eld));
> +     memset(&connector->hdr_sink_metadata, 0, 
> sizeof(connector->hdr_sink_metadata));

hdr_sink_metadata is not related to ELD, and should not be cleared
within clear_eld().

I think this should be cleared in drm_reset_display_info(), and
long-term fields like this should be moved within display info.

BR,
Jani.

>       mutex_unlock(&connector->eld_mutex);
>  
>       connector->latency_present[0] = false;

-- 
Jani Nikula, Intel

Reply via email to