public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Move the context descriptor to an inline helper
Date: Mon, 18 Sep 2017 17:40:04 +0300	[thread overview]
Message-ID: <1505745604.14048.85.camel@linux.intel.com> (raw)
In-Reply-To: <20170912214905.21987-1-chris@chris-wilson.co.uk>

On Tue, 2017-09-12 at 22:49 +0100, Chris Wilson wrote:
> The context descriptor is stored inside the per-engine context state, as
> we only need to compute it once and access it frequently. However,
> currently only intel_lrc.c has easy access, but i915_guc_submission.c
> would like to frequently read it as well, and more so only ever needs
> the lower 32bits. Make it an inline as the compiler should be able to
> retrieve the value in less instructions than it takes to do the function
> call:
> 
> add/remove: 0/1 grow/shrink: 1/0 up/down: 8/-45 (-37)
> function                                     old     new   delta
> i915_guc_submit                              621     629      +8
> intel_lr_context_descriptor                   45       -     -45
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

<SNIP>

> @@ -78,8 +79,14 @@ struct drm_i915_private;
>  struct i915_gem_context;
>  
>  void intel_lr_context_resume(struct drm_i915_private *dev_priv);
> -uint64_t intel_lr_context_descriptor(struct i915_gem_context *ctx,
> -				     struct intel_engine_cs *engine);
> +
> +static inline uint64_t

There was a perfect opportunity for s/uint64_t/u64/ here.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      parent reply	other threads:[~2017-09-18 14:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-12 21:49 [PATCH] drm/i915: Move the context descriptor to an inline helper Chris Wilson
2017-09-12 22:14 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-09-12 22:50 ` [PATCH] " Oscar Mateo
2017-09-13  9:39   ` Chris Wilson
2017-09-13  6:22 ` ✓ Fi.CI.IGT: success for " Patchwork
2017-09-18 14:40 ` Joonas Lahtinen [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=1505745604.14048.85.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox