From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915/lrc: move lrc_get_runtime() to intel_lrc.c
Date: Tue, 15 Feb 2022 15:54:46 +0000 [thread overview]
Message-ID: <de1a91cf-9366-2c93-9159-3e31313db53a@linux.intel.com> (raw)
In-Reply-To: <20220214173810.2108975-1-jani.nikula@intel.com>
On 14/02/2022 17:38, Jani Nikula wrote:
> Move the static inline next to the only caller.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
> ---
> drivers/gpu/drm/i915/gt/intel_context_sseu.c | 1 +
> drivers/gpu/drm/i915/gt/intel_lrc.c | 11 +++++++++++
> drivers/gpu/drm/i915/gt/intel_lrc.h | 11 -----------
> drivers/gpu/drm/i915/i915_perf.c | 1 +
> 4 files changed, 13 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_context_sseu.c b/drivers/gpu/drm/i915/gt/intel_context_sseu.c
> index e86d8255feec..ece16c2b5b8e 100644
> --- a/drivers/gpu/drm/i915/gt/intel_context_sseu.c
> +++ b/drivers/gpu/drm/i915/gt/intel_context_sseu.c
> @@ -9,6 +9,7 @@
> #include "intel_engine_pm.h"
> #include "intel_gpu_commands.h"
> #include "intel_lrc.h"
> +#include "intel_lrc_reg.h"
> #include "intel_ring.h"
> #include "intel_sseu.h"
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index 8189bc8a16ec..5b107b698b65 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -1720,6 +1720,17 @@ static void st_update_runtime_underflow(struct intel_context *ce, s32 dt)
> #endif
> }
>
> +static u32 lrc_get_runtime(const struct intel_context *ce)
> +{
> + /*
> + * We can use either ppHWSP[16] which is recorded before the context
> + * switch (and so excludes the cost of context switches) or use the
> + * value from the context image itself, which is saved/restored earlier
> + * and so includes the cost of the save.
> + */
> + return READ_ONCE(ce->lrc_reg_state[CTX_TIMESTAMP]);
> +}
> +
> void lrc_update_runtime(struct intel_context *ce)
> {
> u32 old;
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.h b/drivers/gpu/drm/i915/gt/intel_lrc.h
> index 7f697845c4cf..2af85a15a370 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.h
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.h
> @@ -9,7 +9,6 @@
> #include <linux/types.h>
>
> #include "intel_context.h"
> -#include "intel_lrc_reg.h"
>
> struct drm_i915_gem_object;
> struct intel_engine_cs;
> @@ -68,15 +67,5 @@ void lrc_check_regs(const struct intel_context *ce,
> const char *when);
>
> void lrc_update_runtime(struct intel_context *ce);
> -static inline u32 lrc_get_runtime(const struct intel_context *ce)
> -{
> - /*
> - * We can use either ppHWSP[16] which is recorded before the context
> - * switch (and so excludes the cost of context switches) or use the
> - * value from the context image itself, which is saved/restored earlier
> - * and so includes the cost of the save.
> - */
> - return READ_ONCE(ce->lrc_reg_state[CTX_TIMESTAMP]);
> -}
>
> #endif /* __INTEL_LRC_H__ */
> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
> index 36f1325baa7d..00fb40029f43 100644
> --- a/drivers/gpu/drm/i915/i915_perf.c
> +++ b/drivers/gpu/drm/i915/i915_perf.c
> @@ -206,6 +206,7 @@
> #include "gt/intel_gt_clock_utils.h"
> #include "gt/intel_gt_regs.h"
> #include "gt/intel_lrc.h"
> +#include "gt/intel_lrc_reg.h"
> #include "gt/intel_ring.h"
>
> #include "i915_drv.h"
next prev parent reply other threads:[~2022-02-15 15:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 17:38 [Intel-gfx] [PATCH 1/2] drm/i915/lrc: move lrc_get_runtime() to intel_lrc.c Jani Nikula
2022-02-14 17:38 ` [Intel-gfx] [PATCH 2/2] drm/i915/lrc: replace include with forward declarations Jani Nikula
2022-02-15 15:55 ` Tvrtko Ursulin
2022-02-15 15:54 ` Tvrtko Ursulin [this message]
2022-02-16 2:38 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/lrc: move lrc_get_runtime() to intel_lrc.c Patchwork
2022-02-17 3:57 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/lrc: move lrc_get_runtime() to intel_lrc.c (rev2) Patchwork
2022-02-17 12:14 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=de1a91cf-9366-2c93-9159-3e31313db53a@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@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