From: Daniel Vetter <daniel@ffwll.ch>
To: "Souza, Jose" <jose.souza@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/edid: Add and export function to parse manufacturer id
Date: Thu, 8 Nov 2018 22:14:16 +0100 [thread overview]
Message-ID: <20181108211416.GD4266@phenom.ffwll.local> (raw)
In-Reply-To: <f596a34b31023dc50ddc83b9a4f3842bb16f77cb.camel@intel.com>
On Thu, Nov 08, 2018 at 08:42:52PM +0000, Souza, Jose wrote:
> On Thu, 2018-11-08 at 09:31 +0100, Daniel Vetter wrote:
> > On Wed, Nov 07, 2018 at 04:23:52PM -0800, José Roberto de Souza
> > wrote:
> > > This function will be helpful to drivers that wants to add its own
> > > quirks to sinks.
> >
> > Why would you want to do that? The point of a shared edid parsing
> > code is
> > that we can share all these quirks ...
> >
> > For these kind of patches, always include the driver code that makes
> > use
> > of your new code too. That makes it much easier to answer these
> > questions.
>
> This will be used to disable or enable with quirks PSR in some panels
> that do not behave like eDP spec states.
> As this would be specifc to i915, I guess is better keep the list only
> in i915.
>
> What is your opinion about that?
For anything dp, shouldn't we use the OUI instead? Or is that more garbage
than the EDID serial?
And yes, psr quirking for i915 seems like a reasonable thing to do, using
either approach. But definitely include the full picture, including i915
patches, in your next round.
-Daniel
>
> >
> > Thanks, Daniel
> >
> >
> > > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> > > ---
> > > drivers/gpu/drm/drm_edid.c | 20 ++++++++++++++++----
> > > include/drm/drm_edid.h | 1 +
> > > 2 files changed, 17 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/drm_edid.c
> > > b/drivers/gpu/drm/drm_edid.c
> > > index b506e3622b08..1a0ddf3d326b 100644
> > > --- a/drivers/gpu/drm/drm_edid.c
> > > +++ b/drivers/gpu/drm/drm_edid.c
> > > @@ -1755,6 +1755,21 @@ EXPORT_SYMBOL(drm_edid_duplicate);
> > >
> > > /*** EDID parsing ***/
> > >
> > > +/**
> > > + * drm_edid_manufacturer_parse - parse the EDID manufacturer id to
> > > readable
> > > + * characters and set into manufacturer parameter.
> > > + * @edid: EDID to get the manufacturer
> > > + * @manufacturer: the char buffer to store the id
> > > + */
> > > +void drm_edid_manufacturer_parse(const struct edid *edid, char
> > > manufacturer[3])
> > > +{
> > > + manufacturer[0] = ((edid->mfg_id[0] & 0x7c) >> 2) + '@';
> > > + manufacturer[1] = (((edid->mfg_id[0] & 0x3) << 3) |
> > > + ((edid->mfg_id[1] & 0xe0) >> 5)) + '@';
> > > + manufacturer[2] = (edid->mfg_id[1] & 0x1f) + '@';
> > > +}
> > > +EXPORT_SYMBOL(drm_edid_manufacturer_parse);
> > > +
> > > /**
> > > * edid_vendor - match a string against EDID's obfuscated vendor
> > > field
> > > * @edid: EDID to match
> > > @@ -1766,10 +1781,7 @@ static bool edid_vendor(const struct edid
> > > *edid, const char *vendor)
> > > {
> > > char edid_vendor[3];
> > >
> > > - edid_vendor[0] = ((edid->mfg_id[0] & 0x7c) >> 2) + '@';
> > > - edid_vendor[1] = (((edid->mfg_id[0] & 0x3) << 3) |
> > > - ((edid->mfg_id[1] & 0xe0) >> 5)) + '@';
> > > - edid_vendor[2] = (edid->mfg_id[1] & 0x1f) + '@';
> > > + drm_edid_manufacturer_parse(edid, edid_vendor);
> > >
> > > return !strncmp(edid_vendor, vendor, 3);
> > > }
> > > diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
> > > index e3c404833115..e4f3f7f34d6a 100644
> > > --- a/include/drm/drm_edid.h
> > > +++ b/include/drm/drm_edid.h
> > > @@ -466,6 +466,7 @@ struct edid *drm_get_edid_switcheroo(struct
> > > drm_connector *connector,
> > > struct i2c_adapter *adapter);
> > > struct edid *drm_edid_duplicate(const struct edid *edid);
> > > int drm_add_edid_modes(struct drm_connector *connector, struct
> > > edid *edid);
> > > +void drm_edid_manufacturer_parse(const struct edid *edid, char
> > > manufacturer[3]);
> > >
> > > u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
> > > enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8
> > > video_code);
> > > --
> > > 2.19.1
> > >
> > > _______________________________________________
> > > Intel-gfx mailing list
> > > Intel-gfx@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-11-08 21:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-08 0:23 [PATCH 1/2] drm/edid: Add and export function to parse manufacturer id José Roberto de Souza
2018-11-08 0:23 ` [PATCH 2/2] drm/edid: Parse manufacturer id only once per sink José Roberto de Souza
2018-11-08 1:53 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/edid: Add and export function to parse manufacturer id Patchwork
2018-11-08 8:31 ` [PATCH 1/2] " Daniel Vetter
2018-11-08 20:42 ` Souza, Jose
2018-11-08 21:14 ` Daniel Vetter [this message]
2018-11-13 20:07 ` [Intel-gfx] " Jani Nikula
2018-11-20 0:00 ` Souza, Jose
2018-11-08 15:43 ` ✓ Fi.CI.IGT: success for series starting with [1/2] " Patchwork
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=20181108211416.GD4266@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jose.souza@intel.com \
/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.