All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org,
	Paulo Zanoni <paulo.r.zanoni@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 3/5] drm/i915: Generate the engine name based on the instance number
Date: Thu, 6 Apr 2017 19:10:58 +0100	[thread overview]
Message-ID: <20170406181058.GM10496@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <7d5c8e0e-ea14-5706-d04a-5ff2a2018bed@linux.intel.com>

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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-04-06 18:11 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-05  9:30 [PATCH 0/5] Classify the engines in class + instance Oscar Mateo
2017-04-05  9:30 ` [PATCH 1/5] drm/i915: " Oscar Mateo
2017-04-06 17:45   ` Tvrtko Ursulin
2017-04-05  9:30 ` [PATCH 2/5] drm/i915: Use the same vfunc for BSD2 ring init Oscar Mateo
2017-04-06 17:48   ` Tvrtko Ursulin
2017-04-06 11:14     ` Oscar Mateo
2017-04-05  9:30 ` [PATCH 3/5] drm/i915: Generate the engine name based on the instance number Oscar Mateo
2017-04-06 18:02   ` Tvrtko Ursulin
2017-04-06 11:22     ` Oscar Mateo
2017-04-06 18:37       ` Tvrtko Ursulin
2017-04-06 18:44         ` Chris Wilson
2017-04-06 18:10     ` Chris Wilson [this message]
2017-04-05  9:30 ` [PATCH 4/5] drm/i915: Split the engine info table in two levels, using class + instance Oscar Mateo
2017-04-06 18:09   ` Tvrtko Ursulin
2017-04-05  9:30 ` [PATCH 5/5] drm/i915: Use the engine class to get the context size Oscar Mateo
2017-04-06 18:19   ` Tvrtko Ursulin
2017-04-05 16:58 ` ✓ Fi.CI.BAT: success for Classify the engines in class + instance Patchwork
2017-04-06 12:55 [PATCH 0/5] Classify the engines in class + instance (v2) Oscar Mateo
2017-04-06 12:55 ` [PATCH 3/5] drm/i915: Generate the engine name based on the instance number Oscar Mateo
2017-04-06 20:10   ` Chris Wilson
2017-04-06 13:15     ` Oscar Mateo
2017-04-06 15:00 [PATCH 0/5] Classify the engines in class + instance (v3) Oscar Mateo
2017-04-06 15:00 ` [PATCH 3/5] drm/i915: Generate the engine name based on the instance number Oscar Mateo
2017-04-07  8:12   ` Tvrtko Ursulin
2017-04-07 10:31   ` Michal Wajdeczko
2017-04-07  9:15 [PATCH 0/5] Classify the engines in class + instance (v4) Oscar Mateo
2017-04-07  9:15 ` [PATCH 3/5] drm/i915: Generate the engine name based on the instance number Oscar Mateo
2017-04-07 16:23   ` Michal Wajdeczko
2017-04-07 17:11     ` Chris Wilson
2017-04-07 12:08       ` Oscar Mateo
2017-04-10 14:34 [PATCH 0/5] Classify the engines in class + instance (v5) Oscar Mateo
2017-04-10 14:34 ` [PATCH 3/5] drm/i915: Generate the engine name based on the instance number Oscar Mateo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170406181058.GM10496@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=tvrtko.ursulin@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.