All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	intel-gfx@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	drm-intel-fixes@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Re-enable GGTT earlier during resume on pre-gen6 platforms
Date: Mon, 23 May 2016 20:10:48 +0300	[thread overview]
Message-ID: <20160523171048.GS4329@intel.com> (raw)
In-Reply-To: <20160520130617.GH10188@boom>

On Fri, May 20, 2016 at 04:06:17PM +0300, David Weinehall wrote:
> On Sat, May 07, 2016 at 09:18:24PM +0300, Ville Syrjälä wrote:
> > On Fri, May 06, 2016 at 09:22:49PM +0100, Chris Wilson wrote:
> > > On Fri, May 06, 2016 at 09:35:55PM +0300, ville.syrjala@linux.intel.com wrote:
> > > > @@ -730,9 +730,14 @@ int i915_suspend_switcheroo(struct drm_device *dev, pm_message_t state)
> > > >  static int i915_drm_resume(struct drm_device *dev)
> > > >  {
> > > >  	struct drm_i915_private *dev_priv = dev->dev_private;
> > > > +	int ret;
> > > >  
> > > >  	disable_rpm_wakeref_asserts(dev_priv);
> > > >  
> > > > +	ret = i915_ggtt_enable_hw(dev);
> > > > +	if (ret)
> > > > +		DRM_ERROR("failed to re-enable GGTT\n");
> > > 
> > > Would it not be fatal for resume as well? Failure means we can't use the
> > > GGTT, so all subsequent writes will be going into a random address.
> > 
> > Yeah, I assume things would blow up. The question is however, what can
> > we do in this case? We'd basically have to shut the entire driver down.
> > I don't think we have a way to do that?
> 
> panic() seems like the answer here.  If we risk scribbling into
> random memory we should make sure that we just drop everything.

Yeah, maybe. OTOH I really hate it when resume gives you hung machine, a
bit of memory corruption might be preferable. I wonder if we could
force a remount-ro for all disks to at least avoid scribbling over
anything permanently. But this might all be entirely theoretical, and
this will never happen. The fake agp code just ignored the return value
and peopled seemed happy.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-05-23 17:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06 18:35 [PATCH] drm/i915: Re-enable GGTT earlier during resume on pre-gen6 platforms ville.syrjala
2016-05-06 20:22 ` Chris Wilson
2016-05-07 18:18   ` Ville Syrjälä
2016-05-08 13:09     ` Chris Wilson
2016-05-20 13:06     ` David Weinehall
2016-05-23 17:10       ` Ville Syrjälä [this message]
2016-05-09 13:52 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-05-10  9:14 ` [PATCH] " Chris Wilson
2016-05-10  9:39   ` Ville Syrjälä

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=20160523171048.GS4329@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=drm-intel-fixes@lists.freedesktop.org \
    --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 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.