On Wed, Mar 21, 2012 at 12:48:46PM -0700, Jesse Barnes wrote:
> intel_clear_scanline_wait tries to clear ring wait conditions when we
> turn off pipes, to prevent hanging WAIT_EVENT and similar commands.  But
> we call it early before rings have been setup during initialization and
> shouldn't touch the ring regs yet.
> 
> Signed-off-by: Jesse Barnes <[email protected]>

Just a curious question: Does vlv not like this and blow up or is this
just something that poped up in register trace/code reviewing?
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_display.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c 
> b/drivers/gpu/drm/i915/intel_display.c
> index dc0ef17..1a8cb30 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3098,6 +3098,10 @@ static void intel_clear_scanline_wait(struct 
> drm_device *dev)
>  
>       ring = LP_RING(dev_priv);
>  
> +     /* This may be called before rings are initialized */
> +     if (!ring->mmio_base)
> +             return;
> +
>       tmp = I915_READ_CTL(ring);
>       if (tmp & RING_WAIT)
>               I915_WRITE_CTL(ring, tmp);
> -- 
> 1.7.5.4
> 
> _______________________________________________
> Intel-gfx mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Mail: [email protected]
Mobile: +41 (0)79 365 57 48
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to