All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Doug Anderson <dianders@chromium.org>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>
Cc: dri-devel@lists.freedesktop.org,
	Kuogee Hsieh <quic_khsieh@quicinc.com>,
	linux-kernel@vger.kernel.org,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Stephen Boyd <swboyd@chromium.org>
Subject: Re: [PATCH] drm/edid: Dump the EDID when drm_edid_get_panel_id() has an error
Date: Mon, 14 Nov 2022 12:02:28 +0200	[thread overview]
Message-ID: <87iljh4zwr.fsf@intel.com> (raw)
In-Reply-To: <CAD=FV=UUpR9Euq5r+MujO6BdTk2cnWe_0JTdcP_e5RP47apUcw@mail.gmail.com>

On Fri, 11 Nov 2022, Doug Anderson <dianders@chromium.org> wrote:
> Hi,
>
> On Tue, Oct 25, 2022 at 1:39 PM Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>>
>> Hi Doug
>>
>> On 10/24/2022 1:28 PM, Doug Anderson wrote:
>> > Hi,
>> >
>> > On Fri, Oct 21, 2022 at 2:18 PM Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>> >>
>> >> 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.
>> >
>> > I can... ...but it feels a bit awkward and maybe not quite how the
>> > functions were intended to work together?
>> >
>> > One thing I notice is that if I call drm_edid_block_valid() I'm doing
>> > a bunch of duplicate work that already happened in edid_block_read(),
>> > which already calls edid_block_check() and handles fixing headers. I
>> > guess also if I call drm_edid_block_valid() then I should ignore the
>> > "status" return value of edid_block_read() because we don't need to
>> > pass it anywhere (because the work is re-done in
>> > drm_edid_block_valid()).
>> >
>> > So I guess I'm happy to do a v2 like that if everyone likes it better,
>> > but to me it feels a little weird.
>> >
>> > -Doug
>>
>> Alright, agreed. There is some duplication of code happening if we use
>> drm_edid_block_valid(). I had suggested that because it has inherent
>> support for dumping the bad EDID.
>>
>> In that case, this change LGTM, because in principle you are doing the
>> same thing as _drm_do_get_edid() (with the only difference being here we
>> read only the base block as opposed to the full EDID there).
>>
>> Hence,
>>
>> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
>
> I've given this patch a bunch of time because it wasn't urgent, but
> seems like it could be about time to land. I'll plan to land it next
> Monday or Tuesday unless anyone has any other comments.

Ack, it's benign enough.

BR,
Jani.

>
> Thanks!
>
> -Doug

-- 
Jani Nikula, Intel Open Source Graphics Center

WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Doug Anderson <dianders@chromium.org>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Stephen Boyd <swboyd@chromium.org>,
	Kuogee Hsieh <quic_khsieh@quicinc.com>
Subject: Re: [PATCH] drm/edid: Dump the EDID when drm_edid_get_panel_id() has an error
Date: Mon, 14 Nov 2022 12:02:28 +0200	[thread overview]
Message-ID: <87iljh4zwr.fsf@intel.com> (raw)
In-Reply-To: <CAD=FV=UUpR9Euq5r+MujO6BdTk2cnWe_0JTdcP_e5RP47apUcw@mail.gmail.com>

On Fri, 11 Nov 2022, Doug Anderson <dianders@chromium.org> wrote:
> Hi,
>
> On Tue, Oct 25, 2022 at 1:39 PM Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>>
>> Hi Doug
>>
>> On 10/24/2022 1:28 PM, Doug Anderson wrote:
>> > Hi,
>> >
>> > On Fri, Oct 21, 2022 at 2:18 PM Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>> >>
>> >> 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.
>> >
>> > I can... ...but it feels a bit awkward and maybe not quite how the
>> > functions were intended to work together?
>> >
>> > One thing I notice is that if I call drm_edid_block_valid() I'm doing
>> > a bunch of duplicate work that already happened in edid_block_read(),
>> > which already calls edid_block_check() and handles fixing headers. I
>> > guess also if I call drm_edid_block_valid() then I should ignore the
>> > "status" return value of edid_block_read() because we don't need to
>> > pass it anywhere (because the work is re-done in
>> > drm_edid_block_valid()).
>> >
>> > So I guess I'm happy to do a v2 like that if everyone likes it better,
>> > but to me it feels a little weird.
>> >
>> > -Doug
>>
>> Alright, agreed. There is some duplication of code happening if we use
>> drm_edid_block_valid(). I had suggested that because it has inherent
>> support for dumping the bad EDID.
>>
>> In that case, this change LGTM, because in principle you are doing the
>> same thing as _drm_do_get_edid() (with the only difference being here we
>> read only the base block as opposed to the full EDID there).
>>
>> Hence,
>>
>> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
>
> I've given this patch a bunch of time because it wasn't urgent, but
> seems like it could be about time to land. I'll plan to land it next
> Monday or Tuesday unless anyone has any other comments.

Ack, it's benign enough.

BR,
Jani.

>
> Thanks!
>
> -Doug

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2022-11-14 10:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21 20:07 [PATCH] drm/edid: Dump the EDID when drm_edid_get_panel_id() has an error Douglas Anderson
2022-10-21 20:07 ` Douglas Anderson
2022-10-21 21:18 ` Abhinav Kumar
2022-10-21 21:18   ` Abhinav Kumar
2022-10-24 20:28   ` Doug Anderson
2022-10-24 20:28     ` Doug Anderson
2022-10-25 20:39     ` Abhinav Kumar
2022-10-25 20:39       ` Abhinav Kumar
2022-11-11 20:45       ` Doug Anderson
2022-11-11 20:45         ` Doug Anderson
2022-11-14 10:02         ` Jani Nikula [this message]
2022-11-14 10:02           ` Jani Nikula
2022-11-14 22:08           ` Doug Anderson
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=87iljh4zwr.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_abhinavk@quicinc.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.