[Intel-gfx] [PATCH] [drm/i915] In execbuffer, split handle lookup and relocation

Eric Anholt eric at anholt.net
Wed Nov 26 01:51:49 CET 2008


On Fri, 2008-11-21 at 01:00 -0800, Keith Packard wrote:
> Splitting these will make re-trying the relocation cleaner

I like it, but I'll fold it into the next patch.

> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
>  drivers/gpu/drm/i915/i915_gem.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 3e074ab..7fd1b26 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -1944,7 +1944,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
>  		return -EBUSY;
>  	}
>  
> -	/* Look up object handles and perform the relocations */
> +	/* Look up object handles */
>  	for (i = 0; i < args->buffer_count; i++) {
>  		object_list[i] = drm_gem_object_lookup(dev, file_priv,
>  						       exec_list[i].handle);
> @@ -1954,7 +1954,10 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
>  			ret = -EBADF;
>  			goto err;
>  		}
> +	}
>  
> +	/* Pin and relocate */
> +	for (i = 0; i < args->buffer_count; i++) {
>  		object_list[i]->pending_read_domains = 0;
>  		object_list[i]->pending_write_domain = 0;
>  		ret = i915_gem_object_pin_and_relocate(object_list[i],
-- 
Eric Anholt
eric at anholt.net                         eric.anholt at intel.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20081125/9f77135b/attachment.sig>


More information about the Intel-gfx mailing list