From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: cache the EDID for eDP panels
Date: Thu, 14 Jun 2012 11:55:44 -0700 [thread overview]
Message-ID: <20120614115544.4ec9429d@jbarnes-desktop> (raw)
In-Reply-To: <1339699065_22080@CP5-2952>
On Thu, 14 Jun 2012 19:37:32 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Thu, 14 Jun 2012 14:30:52 -0400, Jesse Barnes <jbarnes@virtuousgeek.org> 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.
> >
> > v2: fix potential NULL derefs in intel_dp_get_edid_modes and
> > intel_dp_get_edid (Jani)
> > copy full EDID length, including extension blocks (Takashi)
> > free EDID on teardown (Takashi)
> > v3: malloc a new EDID buffer that's big enough for the memcpy (Chris)
> >
> > References: https://bugs.freedesktop.org/show_bug.cgi?id=46856
> > Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> > ---
> > @@ -2121,10 +2124,19 @@ intel_dp_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter)
> > {
> > struct intel_dp *intel_dp = intel_attached_dp(connector);
> > struct edid *edid;
> > + int size;
> > +
> > + if (is_edp(intel_dp) && intel_dp->edid) {
> > + size = (intel_dp->edid->extensions + 1) * EDID_LENGTH;
> > + edid = kmalloc(size, GFP_KERNEL);
> > + if (!edid)
> > + return NULL;
> > +
> > + memcpy(edid, intel_dp->edid, size);
> > + return edid;
> > + }
> >
> > - ironlake_edp_panel_vdd_on(intel_dp);
> > edid = drm_get_edid(connector, adapter);
> > - ironlake_edp_panel_vdd_off(intel_dp, false);
> > return edid;
>
> This makes me a little uneasy, as the wording here makes it sound like
> it is possible for us to initiate a DP aux xfer without raising VDD on
> the eDP panel. Having made the decision to retreive the EDID for a panel
> only once, we should use that result for all future queries i.e. if it
> was NULL during init, assume it will be NULL now as well. (I hope nobody
> brings out an eDP-to-HDMI dongle!)
Oh good call. Now that I'm checking for whether we have a cached edid
I should leave the aux toggling in...
Thanks,
Jesse
--
Jesse Barnes, Intel Open Source Technology Center
next prev parent reply other threads:[~2012-06-14 18:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-14 18:30 [PATCH] drm/i915: cache the EDID for eDP panels Jesse Barnes
2012-06-14 18:37 ` Chris Wilson
2012-06-14 18:55 ` Jesse Barnes [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-06-14 19:28 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
2012-06-14 19:02 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=20120614115544.4ec9429d@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/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