[Intel-gfx] [PATCH 1/4] drm/i915: don't allow tiling changes on pinned buffers

Owain Ainsworth zerooa at googlemail.com
Fri Apr 23 19:34:08 CEST 2010


On Thu, Apr 22, 2010 at 10:12:49PM +0200, Daniel Vetter wrote:
> Makes no sense and complicates matters for pipelined tiling changes.
> So don't allow it and return -EBUSY.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
>  drivers/gpu/drm/i915/i915_gem_tiling.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c
> index 449157f..00f264d 100644
> --- a/drivers/gpu/drm/i915/i915_gem_tiling.c
> +++ b/drivers/gpu/drm/i915/i915_gem_tiling.c
> @@ -287,6 +287,9 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
>  		return -EINVAL;
>  	}
>  
> +	if (obj_priv->pin_count)
> +		return -EBUSY;
> +

you leak a reference here.

-0-
-- 
When all other means of communication fail, try words.



More information about the Intel-gfx mailing list