[Intel-gfx] [PATCH 5/8] drm/i915: Convert active API to VMA

Chris Wilson chris at chris-wilson.co.uk
Sat Aug 31 02:08:36 CEST 2013


On Fri, Aug 30, 2013 at 04:43:58PM -0700, Ben Widawsky wrote:
> From: Ben Widawsky <ben at bwidawsk.net>
> 
> Even though we track object activity and not VMA, because we have the
> active_list be based on the VM, it makes the most sense to use VMAs in the
> APIs.
> 
> NOTE: Daniel intends to eventually rip out active/inactive LRUs, but for
> now, leave them be.
> 
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
> 
> Conflicts:
> 	drivers/gpu/drm/i915/i915_gem_execbuffer.c

There's a silly chunk here, but otherwise ok.

> ---
>  drivers/gpu/drm/i915/i915_drv.h            |  5 ++---
>  drivers/gpu/drm/i915/i915_gem.c            | 11 +++++++++--
>  drivers/gpu/drm/i915/i915_gem_context.c    |  8 ++++----
>  drivers/gpu/drm/i915/i915_gem_execbuffer.c |  3 +--
>  4 files changed, 16 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 6e8ade0..c9ed77a 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1866,9 +1866,8 @@ static inline void i915_gem_object_unpin_pages(struct drm_i915_gem_object *obj)
>  int __must_check i915_mutex_lock_interruptible(struct drm_device *dev);
>  int i915_gem_object_sync(struct drm_i915_gem_object *obj,
>  			 struct intel_ring_buffer *to);
> -void i915_gem_object_move_to_active(struct drm_i915_gem_object *obj,
> -				    struct intel_ring_buffer *ring);
> -
> +void i915_vma_move_to_active(struct i915_vma *vma,
> +			     struct intel_ring_buffer *ring);
>  int i915_gem_dumb_create(struct drm_file *file_priv,
>  			 struct drm_device *dev,
>  			 struct drm_mode_create_dumb *args);
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index a839bcb..8547b97 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -1881,11 +1881,11 @@ i915_gem_object_get_pages(struct drm_i915_gem_object *obj)
>  	return 0;
>  }
>  
> -void
> +static void
>  i915_gem_object_move_to_active(struct drm_i915_gem_object *obj,
>  			       struct intel_ring_buffer *ring)
>  {
> -	struct drm_device *dev = obj->base.dev;
> +	struct drm_device *dev = ring->dev;

? Are you trying to anger the static checkers?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list