mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: feijuan.li@samsung.com,
	"jingoohan1@gmail.com" <jingoohan1@gmail.com>,
	"maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	"mripard@kernel.org" <mripard@kernel.org>,
	"tzimmermann@suse.de" <tzimmermann@suse.de>,
	"airlied@gmail.com" <airlied@gmail.com>,
	"simona@ffwll.ch" <simona@ffwll.ch>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Hongfei Tang <hongfei.tang@samsung.com>,
	Minggui Yan <minggui.yan@samsung.com>,
	Qilin Wang <qilin.wang@samsung.com>
Subject: Re: [PATCH v2] drm/edid: fixed the bug that hdr metadata was not cleared
Date: Tue, 13 May 2025 11:31:16 +0300	[thread overview]
Message-ID: <87sel8j4iz.fsf@intel.com> (raw)
In-Reply-To: <20250513011145epcms5p84bf94d5c03933fd61f4abf1fadab5016@epcms5p8>

On Tue, 13 May 2025, Feijuan Li <feijuan.li@samsung.com> wrote:
> Dear maintainer:
>
> I have changed the patch as your suggestion.
> v1->v2:make a new function for hdr info reset.
>
>
> From: "feijuan.li" <feijuan.li@samsung.com>
> Date: Fri, 18 Apr 2025 14:56:49 +0000
> Subject: [PATCH v2] drm/edid: fixed the bug that hdr metadata was not reset
>
> 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.li@samsung.com>
> ---
>  drivers/gpu/drm/drm_edid.c 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 13bc4c290b17..cd0e4148f6b0 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -6576,6 +6576,11 @@ static void drm_update_mso(struct drm_connector *connector,
>          displayid_iter_end(&iter);
>  }
>  
> +static void drm_reset_hdr_sink_metadata(struct drm_connector *connector)
> +{
> +        memset(&connector->hdr_sink_metadata, 0, sizeof(connector->hdr_sink_metadata));

Please just put this memset inside drm_reset_display_info() right after:

	memset(&info->hdmi, 0, sizeof(info->hdmi));

I have local patches to move hdr_sink_metadata as part of display info
anyway. Adding an extra function here is a bit much.

There's also something wrong with the formatting here. Please use git
send-email.

BR,
Jani.

> +}
> +
>  /* A connector has no EDID information, so we've got no EDID to compute quirks from. Reset
>   * all of the values which would have been set from EDID
>   */
> @@ -6651,6 +6656,7 @@ static void update_display_info(struct drm_connector *connector,
>          struct drm_display_info *info = &connector->display_info;
>          const struct edid *edid;
>  
> +        drm_reset_hdr_sink_metadata(connector);
>          drm_reset_display_info(connector);
>          clear_eld(connector);
>  
> -- 
> 2.25.1
>
>

-- 
Jani Nikula, Intel

      reply	other threads:[~2025-05-13  8:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20250416093607epcms5p344bcffd7430fe5e30ef9b73db73f7388@epcms5p8>
2025-05-13  1:11 ` Feijuan Li
2025-05-13  8:31   ` Jani Nikula [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sel8j4iz.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=feijuan.li@samsung.com \
    --cc=hongfei.tang@samsung.com \
    --cc=jingoohan1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=minggui.yan@samsung.com \
    --cc=mripard@kernel.org \
    --cc=qilin.wang@samsung.com \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®