[Intel-gfx] [PATCH 2/4] drm/i915: Change parameters order in i915_gem_batch_pool_init

Michal Wajdeczko michal.wajdeczko at intel.com
Tue Mar 6 16:33:30 UTC 2018


On Tue, 06 Mar 2018 17:20:18 +0100, Chris Wilson  
<chris at chris-wilson.co.uk> wrote:

> Quoting Michal Wajdeczko (2018-03-06 16:15:25)
>> Function i915_gem_batch_pool_init() failed to follow obj-verb
>> naming schema. Fix that by swapping function parameters.
>> While here, change license text to SPDX format.
>>
>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
>> Cc: Chris Wilson <chris at chris-wilson.co.uk>
>
> Since this is peculiar to an engine, probably best to change it to
> intel_engine_init_batch_pool and whatnot.c.

we can add it just to follow other engine_init_xxx functions
but then it should still call batch function:

void intel_engine_init_batch_pool(engine)
{
	i915_gem_batch_pool_init(&engine->batch_pool, engine);
}
...
  	intel_engine_init_timeline(engine);
  	intel_engine_init_hangcheck(engine);
+	intel_engine_init_batch_pool(engine);

alternatively I can add extra empty line to separate it from other init
functions:

  	intel_engine_init_timeline(engine);
  	intel_engine_init_hangcheck(engine);
+
+	i915_gem_batch_pool_init(&engine->batch_pool, engine);


/Michal


More information about the Intel-gfx mailing list