All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Gordon <david.s.gordon@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/6] drm/i915: mark the global default (intel_)context as such
Date: Tue, 22 Dec 2015 11:26:53 +0000	[thread overview]
Message-ID: <5679337D.2020301@intel.com> (raw)
In-Reply-To: <20151222090845.GC2641@nuc-i3427.alporthouse.com>

On 22/12/15 09:08, Chris Wilson wrote:
> On Mon, Dec 21, 2015 at 04:04:40PM +0000, Dave Gordon wrote:
>> Some of the LRC-specific context-destruction code has to special-case
>> the global default context, bacause the HWSP is part of that context. At
>> present it deduces it indirectly by checking for the backpointer from
>> the engine to the context, but that's an unsafe assumption if the setup
>> and teardown code is reorganised. (It could also test ctx->file_priv ==
>> NULL, but again that's a detail that might be subject to change).
>>
>> So here we explicitly flag the default context at the point of creation,
>> and then reorganise the code in intel_lr_context_free() not to rely on
>> the ring->default_pointer (still) being set up; to iterate over engines
>> in reverse, as this is teardown code; and to reduce the nesting
>> level so it's easier to read.
>
> I still strongly disagree with the confusion inherent here.
> -Chris

I'm not sure that anything could be *less* confusing than indicating the 
global default context with a flag called "is_global_default".

There may indeed be all sorts of confusion in the LRC code, but I'm not 
trying to fix all of that in one go. This is just an enabler so that one 
small piece of that confusion can be replaced by something clear and 
explicit. Once that's done, we'll move on and see what else can also be 
clarified.

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

  reply	other threads:[~2015-12-22 11:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-21 16:04 improve handling of the driver's internal default context Dave Gordon
2015-12-21 16:04 ` [PATCH 1/6] drm/i915: mark the global default (intel_)context as such Dave Gordon
2015-12-22  9:08   ` Chris Wilson
2015-12-22 11:26     ` Dave Gordon [this message]
2015-12-21 16:04 ` [PATCH 2/6] drm/i915: simplify testing for the global default context Dave Gordon
2015-12-22  9:05   ` Chris Wilson
2015-12-22 11:35     ` Dave Gordon
2015-12-21 16:04 ` [PATCH 3/6] drm/i915: simplify allocation of driver-internal requests Dave Gordon
2015-12-22  9:08   ` Chris Wilson
2015-12-22 11:36     ` Dave Gordon
2015-12-21 16:04 ` [PATCH 4/6] drm/i915: abolish separate per-engine default_context pointers Dave Gordon
2015-12-21 16:04 ` [PATCH 5/6] drm/i915: tidy up initialisation failure paths (legacy) Dave Gordon
2015-12-21 16:04 ` [PATCH 6/6] drm/i915: tidy up initialisation failure paths (GEM & LRC) Dave Gordon
2015-12-22  7:20 ` ✗ failure: Fi.CI.BAT Patchwork

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=5679337D.2020301@intel.com \
    --to=david.s.gordon@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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.