mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Douglas Anderson <dianders@chromium.org>,
	<dri-devel@lists.freedesktop.org>
Cc: Kuogee Hsieh <quic_khsieh@quicinc.com>,
	Stephen Boyd <swboyd@chromium.org>,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/edid: Dump the EDID when drm_edid_get_panel_id() has an error
Date: Fri, 21 Oct 2022 14:18:16 -0700	[thread overview]
Message-ID: <e6bc800b-2d3b-aac9-c1cb-7c08d618fc8e@quicinc.com> (raw)
In-Reply-To: <20221021130637.1.I8c2de0954a4e54e0c59a72938268e2ead91daa98@changeid>

Hi Doug

On 10/21/2022 1:07 PM, Douglas Anderson wrote:
> If we fail to get a valid panel ID in drm_edid_get_panel_id() we'd
> like to see the EDID that was read so we have a chance of
> understanding what's wrong. There's already a function for that, so
> let's call it in the error case.
> 
> NOTE: edid_block_read() has a retry loop in it, so actually we'll only
> print the block read back from the final attempt. This still seems
> better than nothing.
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>

Instead of checkinf for edid_block_status_valid() on the base_block, do 
you want to use drm_edid_block_valid() instead?

That way you get the edid_block_dump() for free if it was invalid.

> ---
> 
>   drivers/gpu/drm/drm_edid.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 47465b9765f1..d63e26ec88b1 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -2721,6 +2721,8 @@ u32 drm_edid_get_panel_id(struct i2c_adapter *adapter)
>   
>   	if (edid_block_status_valid(status, edid_block_tag(base_block)))
>   		panel_id = edid_extract_panel_id(base_block);
> +	else
> +		edid_block_dump(KERN_NOTICE, base_block, 0);
>   
>   	kfree(base_block);
>   

  reply	other threads:[~2022-10-21 21:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21 20:07 Douglas Anderson
2022-10-21 21:18 ` Abhinav Kumar [this message]
2022-10-24 20:28   ` Doug Anderson
2022-10-25 20:39     ` Abhinav Kumar
2022-11-11 20:45       ` Doug Anderson
2022-11-14 10:02         ` Jani Nikula
2022-11-14 22:08           ` Doug Anderson

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=e6bc800b-2d3b-aac9-c1cb-7c08d618fc8e@quicinc.com \
    --to=quic_abhinavk@quicinc.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=quic_khsieh@quicinc.com \
    --cc=swboyd@chromium.org \
    --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®