From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/4] drm/i915: Restore the display config after a GPU reset on gen4
Date: Tue, 20 May 2014 11:46:42 +0300 [thread overview]
Message-ID: <20140520084642.GE27580@intel.com> (raw)
In-Reply-To: <20140520080344.GD8790@phenom.ffwll.local>
On Tue, May 20, 2014 at 10:03:44AM +0200, Daniel Vetter wrote:
> On Mon, May 19, 2014 at 10:25:19PM +0300, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > On pre-ctg GPU reset also resets the display hardware. Force a mode
> > restore after the GPU reset, and also re-init clock gating.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_drv.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index b948c71..2ec3796 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -794,6 +794,14 @@ int i915_reset(struct drm_device *dev)
> > if (INTEL_INFO(dev)->gen > 5)
> > intel_reset_gt_powersave(dev);
> >
> > + if (IS_GEN4(dev) && !IS_G4X(dev)) {
> > + intel_init_clock_gating(dev);
> > +
> > + drm_modeset_lock_all(dev);
> > + intel_modeset_setup_hw_state(dev, true);
> > + drm_modeset_unlock_all(dev);
>
> Locking inversion here. I think we need to push this down to the very end.
We already dropped struct_mutex a bit earlier. Or was there some other
lock you were worried about?
> Also this leaves the interesting question of what happens with vblank
> waits and friends ...
Hmm. I guess we might have some kind of refcount problem on our hands w/
vblanks and whatnot. Might be I'd need to for_each_crtc() .crtc_disable()
before the reset. That would match the g33 spec's recommendation to
disable all planes, but it also does quite a bit more, maybe too much?
But I could try it at least.
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2014-05-20 8:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-19 19:25 [PATCH 0/4] drm/i915: gen3/4 GPU reset stuff ville.syrjala
2014-05-19 19:25 ` [PATCH 1/4] drm/i915: Fix gen4 GPU reset ville.syrjala
2014-05-19 19:25 ` [PATCH 2/4] drm/i915: Restore the display config after a GPU reset on gen4 ville.syrjala
2014-05-20 8:03 ` Daniel Vetter
2014-05-20 8:46 ` Ville Syrjälä [this message]
2014-05-20 8:53 ` Daniel Vetter
2014-05-19 19:25 ` [PATCH 3/4] drm/i915: Implement GPU reset for 915/945 ville.syrjala
2014-05-19 19:25 ` [PATCH 4/4] drm/i915: Implement GPU reset for g33 ville.syrjala
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=20140520084642.GE27580@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=daniel@ffwll.ch \
--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