Re: [PATCH 3/5] drm/i915: Generate the engine name based on the instance number

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

 



On Thu, Apr 06, 2017 at 07:02:10PM +0100, Tvrtko Ursulin wrote:
> 
> On 05/04/2017 10:30, Oscar Mateo wrote:
> >@@ -100,6 +100,7 @@
> > {
> > 	const struct engine_info *info = &intel_engines[id];
> > 	struct intel_engine_cs *engine;
> >+	char instance[3] = "";
> >
> > 	GEM_BUG_ON(dev_priv->engine[id]);
> > 	engine = kzalloc(sizeof(*engine), GFP_KERNEL);
> >@@ -108,7 +109,10 @@
> >
> > 	engine->id = id;
> > 	engine->i915 = dev_priv;
> >-	engine->name = info->name;
> >+	/* For historical reasons the engines are called: name, name2... */
> >+	if (info->instance)
> >+		snprintf(instance, sizeof(instance), "%u", info->instance + 1);
> >+	snprintf(engine->name, sizeof(engine->name), "%s%s", info->name, instance);
> 
> Since Chris has recently renamed all the engines, I'd say who cares
> about the numbering scheme. Just drop it for simplicity.

Seconded. class0 is ok, or if you are being fancy only use the classN
format if there are multiples in the class. Though kiss says just use
classN and be done with it.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
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