intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Dave Gordon <david.s.gordon@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Daniel Vetter <daniel@ffwll.ch>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3 1/3] drm/i915: simplify allocation of driver-internal requests
Date: Wed, 13 Jan 2016 13:27:51 +0000	[thread overview]
Message-ID: <569650D7.4020809@intel.com> (raw)
In-Reply-To: <20160112142732.GE24672@nuc-i3427.alporthouse.com>

On 12/01/16 14:27, Chris Wilson wrote:
> On Tue, Jan 12, 2016 at 01:56:48PM +0000, Chris Wilson wrote:
>> But we were removing the engine->default_context as it complicated the
>> rest of the code. I strongly prefer keeping the contexts explicit as
>> context separation should be first and foremost in the driver.
>
> $ git grep kernel_context -- drivers/gpu/drm/i915/ | grep request_alloc
> drivers/gpu/drm/i915/i915_gem_evict.c:		req = i915_gem_request_alloc(ring, dev_priv->kernel_context);
> drivers/gpu/drm/i915/intel_overlay.c:	return i915_gem_request_alloc(ring, dev_priv->kernel_context);
>
> Changing those *two* callsites to pass NULL seems on the odd side, and
> at least for the eviction case discards important information.
> -Chris

Those specific lines won't be touched by my patch, as *they don't 
actually exist in today's drm-intel-nightly* branch. If you want to add 
*new* calls to i915_gem_request_alloc() such as the above then you're 
quite free to pass any context you want, whether it's a real user 
context, the default kernel context explicitly, if you think it's 
important that the reader know that that specific context will be used; 
or NULL if you don't care what context is used.

dev_priv->kernel_context carries exactly the same amount of information 
as NULL; they both mean "I don't have a specific context to use here, so 
(I'm going to) use the one the driver provides for such activities". 
Having the option of using NULL rather than"dev_priv->kernel_context" 
explicitly doesn't prevent you from doing so where the caller cares. But 
I think most callers *don't* care.

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

  reply	other threads:[~2016-01-13 13:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-07 10:20 [PATCH v3 0/3] improve handling of the driver's internal (default) context Dave Gordon
2016-01-07 10:20 ` [PATCH v3 1/3] drm/i915: simplify allocation of driver-internal requests Dave Gordon
2016-01-07 11:58   ` Chris Wilson
2016-01-07 12:34     ` Dave Gordon
2016-01-07 16:56       ` Chris Wilson
2016-01-11 12:45         ` Dave Gordon
2016-01-07 16:49     ` Jesse Barnes
2016-01-07 16:53       ` Chris Wilson
2016-01-12 13:02         ` Dave Gordon
2016-01-12 13:50   ` Daniel Vetter
2016-01-12 13:56     ` Chris Wilson
2016-01-12 14:27       ` Chris Wilson
2016-01-13 13:27         ` Dave Gordon [this message]
2016-01-13 13:41           ` Chris Wilson
2016-01-13 18:46             ` Dave Gordon
2016-01-13 20:23               ` Chris Wilson
2016-01-18 16:16   ` Nick Hoath
2016-01-07 10:20 ` [PATCH v3 2/3] drm/i915: abolish separate per-ring default_context pointers Dave Gordon
2016-01-12 13:51   ` Daniel Vetter
2016-01-18 16:16   ` Nick Hoath
2016-01-19  8:54     ` Daniel Vetter
2016-01-07 10:20 ` [PATCH v3 3/3] drm/i915: tidy up a few leftovers Dave Gordon
2016-01-12 13:53   ` Daniel Vetter
2016-01-13 12:41     ` Dave Gordon
2016-01-18 16:17   ` Nick Hoath

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=569650D7.4020809@intel.com \
    --to=david.s.gordon@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel@ffwll.ch \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).