[Intel-gfx] [PATCH] drm/i915: Error out when trying to set a y-tiled as a sprite

Jesse Barnes jbarnes at virtuousgeek.org
Fri Oct 26 19:42:54 CEST 2012


On Fri, 26 Oct 2012 18:30:50 +0100
Damien Lespiau <damien.lespiau at gmail.com> wrote:

> From: Damien Lespiau <damien.lespiau at intel.com>
> 
> Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_sprite.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index 3434b6e..aa8d09b 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -465,6 +465,11 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
>  	if (intel_plane->pipe != intel_crtc->pipe)
>  		return -EINVAL;
>  
> +	/* Sprite planes can be linear or x-tiled surfaces */
> +	if (!(obj->tiling_mode == I915_TILING_NONE ||
> +	      obj->tiling_mode == I915_TILING_X))
> +		return -EINVAL;
> +
>  	/*
>  	 * Clamp the width & height into the visible area.  Note we don't
>  	 * try to scale the source if part of the visible region is offscreen.

Do we not catch this when we make the fb?  If not we may want to do
this there...

-- 
Jesse Barnes, Intel Open Source Technology Center



More information about the Intel-gfx mailing list