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

Ville Syrjälä ville.syrjala at linux.intel.com
Thu Mar 7 10:34:08 CET 2013


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.

>  
>  		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



More information about the Intel-gfx mailing list