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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 29 Oct 2012 15:14:51 +0000
Damien Lespiau <damien.lespiau at gmail.com> wrote:

> From: Damien Lespiau <damien.lespiau at intel.com>
> 
> v2: Use a switch for consistency (Chris Wilson)
> 
> Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_sprite.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index 87c8f1b..03307be 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -466,6 +466,15 @@ 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 */
> +	switch (obj->tiling_mode) {
> +		case I915_TILING_NONE:
> +		case I915_TILING_X:
> +			break;
> +		default:
> +			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.

Reviewed-by: Jesse Barnes <jbarnes at virtuousgeek.org>

-- 
Jesse Barnes, Intel Open Source Technology Center


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux