All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Check intel_contexts to avoid one extra pointer chase
Date: Fri, 01 Jun 2018 11:09:20 +0100	[thread overview]
Message-ID: <152784776094.15728.1043958441259762213@mail.alporthouse.com> (raw)
In-Reply-To: <87d0xa7rfl.fsf@gaia.fi.intel.com>

Quoting Mika Kuoppala (2018-06-01 11:05:18)
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
> > As we store the intel_context on the request (rq->hw_context), we can
> > simply compare that against the local intel_context for the
> > i915->kernel_context rather than using the rq->gem_context.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_gem_context.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
> > index 81f086397d10..94e4db1870aa 100644
> > --- a/drivers/gpu/drm/i915/i915_gem_context.c
> > +++ b/drivers/gpu/drm/i915/i915_gem_context.c
> > @@ -610,7 +610,7 @@ static bool engine_has_kernel_context_barrier(struct intel_engine_cs *engine)
> >  
> >               any_active = true;
> >  
> > -             if (rq->gem_context == i915->kernel_context)
> > +             if (rq->hw_context == ce)
> 
> We lose a little bit of readability due to that 'ce'.
> But the function is compact enough so that it shows it's
> nature in one eyeful. Tho you could introduce 'kec' :)

kce; almost but ce is being used everywhere else so I hope the
familiarity will make it easier.

Not that ce is a great shorthand for intel_context; so if you have a
good idea for that, as I plan to make them more prevalent that would be
useful.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-06-01 10:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-01  9:40 [PATCH] drm/i915: Check intel_contexts to avoid one extra pointer chase Chris Wilson
2018-06-01 10:05 ` Mika Kuoppala
2018-06-01 10:09   ` Chris Wilson [this message]
2018-06-01 10:47 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-06-01 11:54 ` ✓ Fi.CI.BAT: success " Patchwork
2018-06-01 12:54 ` [PATCH] " Chris Wilson
2018-06-01 13:19 ` ✗ Fi.CI.IGT: failure for " 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=152784776094.15728.1043958441259762213@mail.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@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.