All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Gordon <david.s.gordon@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/5] drm/i915: unify first-stage engine struct setup
Date: Thu, 14 Jul 2016 12:33:53 +0100	[thread overview]
Message-ID: <578778A1.5040503@intel.com> (raw)
In-Reply-To: <57863F41.9000308@linux.intel.com>

On 13/07/16 14:16, Tvrtko Ursulin wrote:
>
> On 13/07/16 13:23, Daniel Vetter wrote:
>> On Fri, Jul 01, 2016 at 05:47:11PM +0100, Tvrtko Ursulin wrote:
>>> From: Dave Gordon <david.s.gordon@intel.com>
>>>
[snip]
>>>   {
>>> -    const struct logical_ring_info *info = &logical_rings[id];
>>> +    const struct engine_info *info = &intel_engines[id];
>>>       struct intel_engine_cs *engine = &dev_priv->engine[id];
>>> -    enum forcewake_domains fw_domains;
>>>
>>>       engine->id = id;
>>> +    engine->i915 = dev_priv;
>>>       engine->name = info->name;
>>>       engine->exec_id = info->exec_id;
>>> -    engine->guc_id = info->guc_id;
>>> +    engine->hw_id = engine->guc_id = info->guc_id;
>>
>> Optional bikeshed: s/info->guc_id/info->hw_id/ makes sense imo in the new
>> context. Or nuking engine->guc_id.
>
> Someone said we cannot be sure they will be the same in the future. So
> maybe just rename to hw_id for now.
>
> Regards,
> Tvrtko

The GuC firmware *could* use a completely different enumeration of the 
engines, but why would it? Since it's closely tied to the hardware, it 
*ought* to use the same naming scheme as the h/w. So I have no objection 
to getting rid of guc_id entirely, and changing existing uses to use 
hw_id instead.

OTOH it seems little benefit and would certainly involve more work to 
reverse. The firmware team might, after all, decide that they too want 
to decouple the logical-engine-numbers used for the KMD interface from 
whatever the hardware team decide is the best way to number engines -- 
which might after all change between generations or even different SKUs 
of the same device!

SO, I think the "best" version of that line is probably:

+	engine->hw_id = info->hw_id;
+
+	/* Current GuC f/w uses hw_id not driver id */
+	engine->guc_id = info->hw_id;

and we'll add "info->guc_id" back again if it ever becomes necessary.

.Dave.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-07-14 11:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-01 16:47 [PATCH 1/5] drm/i915: unify first-stage engine struct setup Tvrtko Ursulin
2016-07-01 16:47 ` [PATCH 2/5] drm/i915: Prepare for engine init unification Tvrtko Ursulin
2016-07-01 16:47 ` [PATCH 3/5] drm/i915: Unify engine init loop Tvrtko Ursulin
2016-07-01 16:47 ` [PATCH 4/5] drm/i915: Make more use of the shared engine irq setup Tvrtko Ursulin
2016-07-13 12:30   ` Daniel Vetter
2016-07-13 13:19     ` Tvrtko Ursulin
2016-07-01 16:47 ` [PATCH 5/5] drm/i915: Simplify intel_init_ring_buffer prototype Tvrtko Ursulin
2016-07-13 12:30   ` Daniel Vetter
2016-07-01 17:08 ` ✗ Ro.CI.BAT: warning for series starting with [1/5] drm/i915: unify first-stage engine struct setup Patchwork
2016-07-13 12:23 ` [PATCH 1/5] " Daniel Vetter
2016-07-13 13:16   ` Tvrtko Ursulin
2016-07-13 13:24     ` Tvrtko Ursulin
2016-07-14 14:29       ` Daniel Vetter
2016-07-14 11:33     ` Dave Gordon [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-07-06 10:52 Tvrtko Ursulin

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=578778A1.5040503@intel.com \
    --to=david.s.gordon@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.