[Intel-gfx] [PATCH 02/28] drm/i915: add sprite assertion function for VLV

Ville Syrjälä ville.syrjala at linux.intel.com
Mon Mar 4 19:29:49 CET 2013


On Fri, Mar 01, 2013 at 01:14:05PM -0800, Jesse Barnes wrote:
> Need to make sure sprites are disabled before shutting off a pipe.

But we don't actually turn them off anywhere, do we?

> 
> Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
> ---
>  drivers/gpu/drm/i915/intel_display.c |   20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 5baf850..794c23e5 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -1275,6 +1275,25 @@ static void assert_planes_disabled(struct drm_i915_private *dev_priv,
>  	}
>  }
>  
> +static void assert_sprites_disabled(struct drm_i915_private *dev_priv,
> +				    enum pipe pipe)
> +{
> +	int reg, i;
> +	u32 val;
> +
> +	if (!IS_VALLEYVIEW(dev_priv->dev))
> +		return;
> +
> +	/* Need to check both planes against the pipe */
> +	for (i = 0; i < dev_priv->num_plane; i++) {
> +		reg = SPCNTR(pipe, i);
> +		val = I915_READ(reg);
> +		WARN((val & SP_ENABLE),
> +		     "sprite %d assertion failure, should be off on pipe %c but is still active\n",
> +		     pipe * 2 + i, pipe_name(pipe));
> +	}
> +}
> +
>  static void assert_pch_refclk_enabled(struct drm_i915_private *dev_priv)
>  {
>  	u32 val;
> @@ -1859,6 +1878,7 @@ static void intel_disable_pipe(struct drm_i915_private *dev_priv,
>  	 * or we might hang the display.
>  	 */
>  	assert_planes_disabled(dev_priv, pipe);
> +	assert_sprites_disabled(dev_priv, pipe);
>  
>  	/* Don't disable pipe A or pipe A PLLs if needed */
>  	if (pipe == PIPE_A && (dev_priv->quirks & QUIRK_PIPEA_FORCE))
> -- 
> 1.7.9.5
> 
> _______________________________________________
> 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