[Intel-gfx] [PATCH] drm/i915: Reset forcewake before suspend

Chris Wilson chris at chris-wilson.co.uk
Thu Mar 13 12:57:19 CET 2014


On Thu, Mar 13, 2014 at 01:29:17PM +0200, Ville Syrjälä wrote:
> On Thu, Mar 13, 2014 at 11:05:02AM +0000, Chris Wilson wrote:
> > Now that we regularly defer the forcewake dance to a timer func, it is
> > likely to fire after we disable the device during suspend. This
> > generates an oops as we detect inconsistency in the hardware state. So
> > before suspend, we want to complete the outstanding dance and generally
> > sanitize the registers before handing back to the BIOS.
> > 
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> 
> I was just looking a this a bit myself and came to the same conclusion.
> 
> Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> There is however one slight issue which I missed when the reviewing the
> forcewake timer patch. intel_uncore_fini() will cancel the timer before
> calling intel_uncore_sanitize(), but if that one will ever do something
> that needs forcewake, we're going to run into the same problem again.
> Actually it looks like gen6_disable_rps() will result in a forcewake
> get on BDW due to GEN6_RC_CONTROL no being shadowed. So it looks like we
> should just move the del_timer_sync() to happen after
> intel_uncore_sanitize() and this issue would be fixed.

I'd like to move it all to forcewake_reset(), just requires a little bit
of fiddling to maintain the user forcewake across gen6_do_reset.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list