From: Jani Nikula <jani.nikula@linux.intel.com>
To: Hsin-Yi Wang <hsinyi@chromium.org>,
Doug Anderson <dianders@chromium.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Jessica Zhang <quic_jesszhan@quicinc.com>,
Sam Ravnborg <sam@ravnborg.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] drm_edid: Add a function to get EDID base block
Date: Mon, 04 Mar 2024 22:44:04 +0200 [thread overview]
Message-ID: <877cih4tij.fsf@intel.com> (raw)
In-Reply-To: <CAJMQK-gKF+ZeAe4Hp8di83Zx8gp-BJ0vuj6uzi0hsaxeju8GyQ@mail.gmail.com>
On Mon, 04 Mar 2024, Hsin-Yi Wang <hsinyi@chromium.org> wrote:
> On Mon, Mar 4, 2024 at 8:17 AM Doug Anderson <dianders@chromium.org> wrote:
>>
>> Hi,
>>
>> On Sun, Mar 3, 2024 at 1:30 PM Dmitry Baryshkov
>> <dmitry.baryshkov@linaro.org> wrote:
>> >
>> > > The problem is that Dmitry didn't like the idea of using a hash and in
>> > > v2 Hsin-Yi has moved to using the name of the display. ...except of
>> > > course that eDP panels don't always properly specify
>> > > "EDID_DETAIL_MONITOR_NAME". See the discussion [1]. If you want to see
>> > > some of the EDIDs involved, you can see Hsin-Yi's post [2]. The panels
>> > > included stuff like this:
>> > >
>> > > Alphanumeric Data String: 'AUO'
>> > > Alphanumeric Data String: 'B116XAN04.0 '
>> > >
>> > > The fact that there is more than one string in there makes it hard to
>> > > just "return" the display name in a generic way. The way Hsin-Yi's
>> > > code was doing it was that it would consider it a match if the panel
>> > > name was in any of the strings...
>> > >
>> > > How about this as a solution: we change drm_edid_get_panel_id() to
>> > > return an opaque type (struct drm_edid_panel_id_blob) that's really
>> > > just the first block of the EDID but we can all pretend that it isn't.
>> > > Then we can add a function in drm_edid.c that takes this opaque blob,
>> > > a 32-bit integer (as per drm_edid_encode_panel_id()), and a string
>> > > name and it can tell us if the blob matches?
>> >
>> > Would it be easier to push drm_edid_match to drm_edid.c? It looks way
>> > more simpler than the opaque blob.
>>
>> Yeah, that sounds reasonable / cleaner to me. Good idea! Maybe Hsin-Yi
>> will be able to try this out and see if there's a reason it wouldn't
>> work.
>
> Thanks for all the suggestions. I sent out v3, which still has a blob
> type since we need
> 1. get panel id
> 2. do the string matching.
>
> And I felt that packing these 2 steps into one function may make that
> function do multiple tasks?
>
> But let me know if it's preferred in this way.
>
> v3: https://lore.kernel.org/lkml/20240304195214.14563-1-hsinyi@chromium.org/
I still don't like it, but incorporating all the ideas here, and in the
previous patches, I think I have a suggestion that covers all cases in a
reasonable manner [1].
Sorry about being so inflexible about this. I've just put 140+ commits
worth of effort in drm_edid.c in the past couple of years, and I'm keen
on keeping it nice and tidy. :)
BR,
Jani.
[1] https://lore.kernel.org/r/87a5nd4tsg.fsf@intel.com
>
>>
>> -Doug
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-03-04 20:44 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 22:29 [PATCH 0/2] Match panel hash for overridden mode Hsin-Yi Wang
2024-02-23 22:29 ` [PATCH 1/2] drm_edid: Add a function to get EDID base block Hsin-Yi Wang
2024-02-26 22:29 ` Doug Anderson
2024-02-27 9:09 ` Jani Nikula
2024-02-27 16:50 ` Doug Anderson
2024-02-28 1:27 ` Hsin-Yi Wang
2024-02-29 0:20 ` Doug Anderson
2024-02-29 16:43 ` Jani Nikula
2024-02-29 17:11 ` Doug Anderson
2024-03-03 21:30 ` Dmitry Baryshkov
2024-03-04 16:17 ` Doug Anderson
2024-03-04 19:55 ` Hsin-Yi Wang
2024-03-04 20:44 ` Jani Nikula [this message]
2024-02-23 22:29 ` [PATCH 2/2] drm/panel: panel-edp: Match with panel hash for overridden modes Hsin-Yi Wang
2024-02-26 22:29 ` Doug Anderson
2024-02-26 22:38 ` Hsin-Yi Wang
2024-02-27 0:24 ` Doug Anderson
2024-02-27 2:28 ` Dmitry Baryshkov
2024-02-27 0:37 ` [PATCH 0/2] Match panel hash for overridden mode Dmitry Baryshkov
2024-02-27 1:00 ` Doug Anderson
2024-02-27 2:18 ` Dmitry Baryshkov
2024-02-27 1:09 ` Hsin-Yi Wang
2024-02-27 2:26 ` Dmitry Baryshkov
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=877cih4tij.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hsinyi@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_jesszhan@quicinc.com \
--cc=sam@ravnborg.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.