Re: [PATCH 01/10] drm/i915: Make GEM object alloc/free and stolen created take dev_priv

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

 



On ke, 2016-11-30 at 11:35 +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> 
> Where it is more appropriate and also to be consistent with
> the direction of the driver.
> 
> Also inline object alloc/free since they are just wrappers
> around kmem_cache_alloc/free.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>

<SNIP>

> @@ -2976,8 +2976,17 @@ void i915_gem_load_init_fences(struct drm_i915_private *dev_priv);
>  int i915_gem_freeze(struct drm_i915_private *dev_priv);
>  int i915_gem_freeze_late(struct drm_i915_private *dev_priv);
>  
> -void *i915_gem_object_alloc(struct drm_device *dev);
> -void i915_gem_object_free(struct drm_i915_gem_object *obj);
> +static inline void *i915_gem_object_alloc(struct drm_i915_private *dev_priv)
> +{
> +	return kmem_cache_zalloc(dev_priv->objects, GFP_KERNEL);
> +}
> +
> +static inline void i915_gem_object_free(struct drm_i915_gem_object *obj)
> +{
> +	struct drm_i915_private *dev_priv = to_i915(obj->base.dev);
> +	kmem_cache_free(dev_priv->objects, obj);
> +}

Split this change into a separate patch, and untangle enough to
relocate to i915_gem_object.h.

Rest of the functions should be moved too.

Just the dev_priv changes are;

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




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