From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/6] drm/i915/dp: push eDP caching out into a work queue
Date: Thu, 6 Mar 2014 08:19:03 -0800 [thread overview]
Message-ID: <20140306081903.6a427129@jbarnes-desktop> (raw)
In-Reply-To: <20140306092813.GB3852@intel.com>
On Thu, 6 Mar 2014 11:28:13 +0200
Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Wed, Mar 05, 2014 at 02:48:30PM -0800, Jesse Barnes wrote:
> > It takes awhile to fetch the DPCD and EDID for caching, so take it out
> > of the critical path to improve init time.
> >
> > Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> > ---
> > drivers/gpu/drm/i915/intel_dp.c | 113 +++++++++++++++++++++++++++++-----------
> > 1 file changed, 82 insertions(+), 31 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index 738c4e6..763f235 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -3001,6 +3001,20 @@ intel_dp_handle_test_request(struct intel_dp *intel_dp)
> > intel_dp_aux_native_write_1(intel_dp, DP_TEST_RESPONSE, DP_TEST_NAK);
> > }
> >
> > +static void intel_flush_edp_cache_work(struct intel_dp *intel_dp)
> > +{
> > + struct drm_device *dev = intel_dp->attached_connector->base.dev;
> > +
> > + WARN_ON(!mutex_is_locked(&dev->mode_config.mutex));
> > +
> > + if (!is_edp(intel_dp))
> > + return;
> > +
> > + mutex_unlock(&dev->mode_config.mutex);
> > + flush_work(&intel_dp->edp_cache_work);
> > + mutex_lock(&dev->mode_config.mutex);
>
> This feels like deadlock land to me. If we drop mode_config.mutex
> someone else might grab it and then get blocked on the crtc mutex
> we're already holding, and then we try to re-grab mode_config.mutex...
Yeah I could use unlock_all here instead, or be more careful about
dropping the specific crtc mutex we need. I did that on the crtc side
of things but obviously missed it here for cases where we'll hold the
crtc lock in this path.
--
Jesse Barnes, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2014-03-06 16:18 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-05 22:48 Make init and mode set more asynchronous Jesse Barnes
2014-03-05 22:48 ` [PATCH 1/6] drm/i915: make CRTC enable/disable asynchronous Jesse Barnes
2014-03-05 23:29 ` Imre Deak
2014-03-05 23:39 ` Jesse Barnes
2014-03-05 23:43 ` Imre Deak
2014-03-06 9:35 ` Chris Wilson
2014-03-06 16:14 ` Jesse Barnes
2014-03-05 22:48 ` [PATCH 2/6] drm/i915: make fbdev initialization asynchronous Jesse Barnes
2014-03-06 9:12 ` Chris Wilson
2014-03-06 16:17 ` Jesse Barnes
2014-03-06 20:15 ` Chris Wilson
2014-03-05 22:48 ` [PATCH 3/6] drm/i915/dp: put power sequence info into intel_dp Jesse Barnes
2014-03-05 22:48 ` [PATCH 4/6] drm: take modeset locks around initial fb helper probing Jesse Barnes
2014-03-06 9:14 ` Chris Wilson
2014-03-05 22:48 ` [PATCH 5/6] drm/i915/dp: push eDP caching out into a work queue Jesse Barnes
2014-03-06 9:28 ` Ville Syrjälä
2014-03-06 16:19 ` Jesse Barnes [this message]
2014-03-05 22:48 ` [PATCH 6/6] drm/i915/dp: make sure VDD is on around link status checking 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=20140306081903.6a427129@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@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