[Intel-gfx] [PATCH 25/25] drm/i915: don't write ring regs until they're set up

Daniel Vetter daniel at ffwll.ch
Wed Mar 21 22:46:41 CET 2012


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 <jbarnes at virtuousgeek.org>

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
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48



More information about the Intel-gfx mailing list