public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	intel-gfx@lists.freedesktop.org,
	Mika Kuoppala <mika.kuoppala@intel.com>
Subject: Re: [PATCH v3 1/2] drm/i915: Move engine->submit_request selection to a vfunc
Date: Wed, 15 Mar 2017 10:05:18 +0000	[thread overview]
Message-ID: <059741a5-e547-442c-2d18-836223d79401@linux.intel.com> (raw)
In-Reply-To: <20170315094129.GR2118@nuc-i3427.alporthouse.com>


On 15/03/2017 09:41, Chris Wilson wrote:
> On Wed, Mar 15, 2017 at 08:14:04AM +0000, Tvrtko Ursulin wrote:
>>
>> On 14/03/2017 21:33, Chris Wilson wrote:
>>> On Tue, Mar 14, 2017 at 04:31:58PM +0000, Tvrtko Ursulin wrote:
>>>>
>>>> On 14/03/2017 09:34, Chris Wilson wrote:
>>>>> }
>>>>>
>>>>> void i915_guc_submission_fini(struct drm_i915_private *dev_priv)
>>>>> diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
>>>>> index 73fe718516a5..5663ebab851f 100644
>>>>> --- a/drivers/gpu/drm/i915/intel_engine_cs.c
>>>>> +++ b/drivers/gpu/drm/i915/intel_engine_cs.c
>>>>> @@ -191,6 +191,7 @@ int intel_engines_init(struct drm_i915_private *dev_priv)
>>>>> 			goto cleanup;
>>>>> 		}
>>>>>
>>>>> +		engine->enable_submission(engine);
>>>>
>>>> Could be moved to intel_engines_setup_common if the
>>>> logical_ring_setup was re-arranged a bit so that the default_vfuncs
>>>> are assigned before it. Legacy looks like it would be alright with
>>>> that approach already.
>>>>
>>>> My thinking here is not to expose this vfunc so prominently in the
>>>> code since it is a bit of a low level internal implementation thing.
>>>
>>> The concern is reasonable, but equally moving it to
>>> intel_engine_setup_common() is hairy. Otoh, I think it is suitable for
>>> intel_engine_init_common(). Happy?
>>
>> Why do you think it is hairy for intel_engine_setup_common? It keeps
>> the setup/init split for lrc, where all vfuncs are initialized in
>> the setup phase which was the intention.
>
> At the moment, setup_common() has no dependencies. Having the callback
> for engine->set_default_submission inside init_common() doesn't break
> the pattern of all vfuncs being in setup_common() - if you no longer
> regard the two vfuncs set by the callback as being part of that set.
>
> In init_common() we already utilize the state set on the engine, the
> callback seems consistent there.

Okay, you convinced me. :)

Regards,

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

      reply	other threads:[~2017-03-15 10:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14  9:34 [PATCH v3 1/2] drm/i915: Move engine->submit_request selection to a vfunc Chris Wilson
2017-03-14  9:34 ` [PATCH v3 2/2] drm/i915: Restore engine->submit_request before unwedging Chris Wilson
2017-03-15  9:23   ` Tvrtko Ursulin
2017-03-15  9:34     ` Chris Wilson
2017-03-15 10:04       ` Tvrtko Ursulin
2017-03-14 16:17 ` ✓ Fi.CI.BAT: success for series starting with [v3,1/2] drm/i915: Move engine->submit_request selection to a vfunc Patchwork
2017-03-14 16:31 ` [PATCH v3 1/2] " Tvrtko Ursulin
2017-03-14 21:33   ` Chris Wilson
2017-03-15  8:14     ` Tvrtko Ursulin
2017-03-15  9:41       ` Chris Wilson
2017-03-15 10:05         ` Tvrtko Ursulin [this message]

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=059741a5-e547-442c-2d18-836223d79401@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox