From: Chris Wilson <chris@chris-wilson.co.uk>
To: Jani Nikula <jani.nikula@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: cache the EDID for eDP panels
Date: Fri, 15 Jun 2012 11:55:15 +0100 [thread overview]
Message-ID: <1339757729_25104@CP5-2952> (raw)
In-Reply-To: <87bokk7sq3.fsf@intel.com>
On Fri, 15 Jun 2012 13:52:04 +0300, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Fri, 15 Jun 2012, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > They aren't going anywhere, and probing on DDC can cause the panel to
> > blank briefly, so read them up front and cache them for later queries.
> >
> > Jesse's patch revamped. Gotta love those display_info.raw_edid = NULL!
> > ---
> > drivers/gpu/drm/i915/intel_dp.c | 48 +++++++++++++++++++++++++++---------
> > drivers/gpu/drm/i915/intel_drv.h | 1 +
> > drivers/gpu/drm/i915/intel_modes.c | 24 ++++++++++++------
> > 3 files changed, 54 insertions(+), 19 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index eb57ec7..207e25f 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -67,6 +67,7 @@ struct intel_dp {
> > struct drm_display_mode *panel_fixed_mode; /* for eDP */
> > struct delayed_work panel_vdd_work;
> > bool want_panel_vdd;
> > + struct edid *edid; /* cached for eDP */
> > };
> >
> > /**
> > @@ -2095,26 +2096,50 @@ g4x_dp_detect(struct intel_dp *intel_dp)
> > }
> >
> > static struct edid *
> > -intel_dp_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter)
> > +_drm_edid_duplicate(struct edid *edid)
> > +{
> > + struct edid *copy;
> > + int size;
> > +
> > + if (edid == NULL)
> > + return NULL;
> > +
> > + size = EDID_LENGTH * (1 + edid->extensions);
> > + *copy = kmalloc(size, GFP_KERNEL);
>
> You may want to remove that '*' there...
And free the cached edid upon destroy. :)
Mainly seeing if I could convince Jesse that we could do a nice patch
for -fixes.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
next prev parent reply other threads:[~2012-06-15 10:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-14 19:28 [PATCH] drm/i915: cache the EDID for eDP panels Jesse Barnes
2012-06-14 19:42 ` Chris Wilson
2012-06-14 19:44 ` Jesse Barnes
2012-06-15 7:34 ` Jani Nikula
2012-06-15 17:31 ` Jesse Barnes
2012-06-15 17:41 ` Daniel Vetter
2012-06-15 8:21 ` Chris Wilson
2012-06-15 10:52 ` Jani Nikula
2012-06-15 10:55 ` Chris Wilson [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-06-14 19:02 Jesse Barnes
2012-06-14 18:30 Jesse Barnes
2012-06-14 18:37 ` Chris Wilson
2012-06-14 18:55 ` Jesse Barnes
2012-06-14 17:19 Jesse Barnes
2012-06-05 20:54 Jesse Barnes
2012-06-05 21:02 ` Chris Wilson
2012-06-05 21:26 ` Jesse Barnes
2012-06-05 21:38 ` Chris Wilson
2012-06-05 21:41 ` Jesse Barnes
2012-06-06 7:23 ` Daniel Vetter
2012-06-06 7:23 ` Jani Nikula
2012-06-06 7:36 ` Takashi Iwai
2012-06-14 17:20 ` Jesse Barnes
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=1339757729_25104@CP5-2952 \
--to=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox