[Intel-gfx] [PATCH 01/10] drm/i915: Tidy i915_gem_do_execbuffer

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Wed Feb 1 07:14:45 UTC 2017


On ti, 2017-01-31 at 13:15 +0000, Tvrtko Ursulin wrote:
> > From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> 
> Instead of sprinkling around usage and initialization of
> i915_execbuffer_params we can consolidate it just before
> execbuf_submit for maintability and readability.
> 
> That way we can also drop the memset since it becomes
> easy to spot we initialize all the fields.
> 
>      text    data     bss     dec     hex filename
>   1085466   26398    2628 1114492  11017c i915.ko.0
>   1085402   26398    2628 1114428  11013c i915.ko.1
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

<SNIP>

> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -50,14 +50,14 @@
>  #define BATCH_OFFSET_BIAS (256*1024)
>  
>  struct i915_execbuffer_params {
> -	struct drm_device               *dev;
> -	struct drm_file                 *file;
> -	struct i915_vma			*batch;
> -	u32				dispatch_flags;
> -	u32				args_batch_start_offset;
> -	struct intel_engine_cs          *engine;
> -	struct i915_gem_context         *ctx;
> -	struct drm_i915_gem_request     *request;
> +	struct drm_device	    *dev;
> +	struct drm_file		    *file;
> +	struct i915_vma		    *batch;
> +	u32			    dispatch_flags;
> +	u32		    	    batch_start;
> +	struct intel_engine_cs	    *engine;
> +	struct i915_gem_context	    *ctx;
> +	struct drm_i915_gem_request *request;
>  };

You could just drop the pretty spaces totally. Otherwise, when
something gets changed, the whole struct has to be re-indented.

Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

Regards, Joonas

-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list