[Intel-gfx] [PATCH 05/15] drm/i915: capture the correct cursor registers on IVB

Ben Widawsky ben at bwidawsk.net
Fri Mar 15 19:45:47 CET 2013


On Thu, Mar 07, 2013 at 11:34:08AM +0200, Ville Syrjälä wrote:
> On Wed, Mar 06, 2013 at 08:03:12PM -0300, Paulo Zanoni wrote:
> > From: Paulo Zanoni <paulo.r.zanoni at intel.com>
> > 
> > This solves some "unclaimed register" messages when there's a GPU hang
> > on Haswell.
> > 
> > Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_display.c |   12 +++++++++---
> >  1 file changed, 9 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 9a9f6d7..789a95a 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -9336,9 +9336,15 @@ intel_display_capture_error_state(struct drm_device *dev)
> >  	for_each_pipe(i) {
> >  		cpu_transcoder = intel_pipe_to_cpu_transcoder(dev_priv, i);
> >  
> > -		error->cursor[i].control = I915_READ(CURCNTR(i));
> > -		error->cursor[i].position = I915_READ(CURPOS(i));
> > -		error->cursor[i].base = I915_READ(CURBASE(i));
> > +		if (INTEL_INFO(dev)->gen <= 6) {
> > +			error->cursor[i].control = I915_READ(CURCNTR(i));
> > +			error->cursor[i].position = I915_READ(CURPOS(i));
> > +			error->cursor[i].base = I915_READ(CURBASE(i));
> > +		} else {
> > +			error->cursor[i].control = I915_READ(CURCNTR_IVB(i));
> > +			error->cursor[i].position = I915_READ(CURPOS_IVB(i));
> > +			error->cursor[i].base = I915_READ(CURBASE_IVB(i));
> > +		}
> 
> Needs a VLV check.

Has anyone ever used this to actually debug an issue?

Ville's right, I suppose (I'm too lazy to find VLV docs). The non-VLV
part of the patch is:
Reviewed-by: Ben Widawsky <ben at bwidawsk.net>

> 
> >  
> >  		error->plane[i].control = I915_READ(DSPCNTR(i));
> >  		error->plane[i].stride = I915_READ(DSPSTRIDE(i));
> > -- 
> > 1.7.10.4
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Ville Syrjälä
> Intel OTC
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ben Widawsky, Intel Open Source Technology Center



More information about the Intel-gfx mailing list