[PATCH 3/6] drm/i915: Kill obj->gtt_offset

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

 



On Wed, Jul 03, 2013 at 02:45:23PM -0700, Ben Widawsky wrote:
> With the getters in place from the previous patch this members serves no
> purpose other than saving one spare pointer chase, which will be killed
> in the next patch anyway.
> 
> Moving to VMAs, this members adds unnecessary confusion since an object
> may exist at different offsets in different VMs.
> 
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>

Ok, I've merged this and the previous patch to dinq (I'm stalling on the
first one until David's comments are addressed).
-Daniel

> ---
>  drivers/gpu/drm/i915/i915_drv.h        | 7 -------
>  drivers/gpu/drm/i915/i915_gem.c        | 2 --
>  drivers/gpu/drm/i915/i915_gem_stolen.c | 1 -
>  3 files changed, 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 496ed3a..d06886b 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1328,13 +1328,6 @@ struct drm_i915_gem_object {
>  	unsigned long exec_handle;
>  	struct drm_i915_gem_exec_object2 *exec_entry;
>  
> -	/**
> -	 * Current offset of the object in GTT space.
> -	 *
> -	 * This is the same as gtt_space->start
> -	 */
> -	uint32_t ggtt_offset;
> -
>  	struct intel_ring_buffer *ring;
>  
>  	/** Breadcrumb of last rendering to the buffer. */
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index edd5b6d..e0568e3 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -2623,7 +2623,6 @@ i915_gem_object_unbind(struct drm_i915_gem_object *obj)
>  
>  	drm_mm_put_block(obj->ggtt_space);
>  	obj->ggtt_space = NULL;
> -	obj->ggtt_offset = 0;
>  
>  	return 0;
>  }
> @@ -3153,7 +3152,6 @@ search_free:
>  	list_add_tail(&obj->mm_list, &dev_priv->mm.inactive_list);
>  
>  	obj->ggtt_space = node;
> -	obj->ggtt_offset = node->start;
>  
>  	fenceable =
>  		node->size == fence_size &&
> diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c
> index cf0d0e0..2f009e6 100644
> --- a/drivers/gpu/drm/i915/i915_gem_stolen.c
> +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
> @@ -390,7 +390,6 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_device *dev,
>  	} else
>  		obj->ggtt_space = I915_GTT_RESERVED;
>  
> -	obj->ggtt_offset = gtt_offset;
>  	obj->has_global_gtt_mapping = 1;
>  
>  	list_add_tail(&obj->global_list, &dev_priv->mm.bound_list);
> -- 
> 1.8.3.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


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