All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	Matt Roper <matthew.d.roper@intel.com>
Subject: Re: [PATCH v2 1/3] drm/xe: Save CTX_TIMESTAMP mmio value instead of LRC value
Date: Fri, 25 Apr 2025 21:42:01 -0700	[thread overview]
Message-ID: <aAxkGScKPwgsCr6g@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20250426002951.1795492-2-umesh.nerlige.ramappa@intel.com>

On Fri, Apr 25, 2025 at 05:29:49PM -0700, Umesh Nerlige Ramappa wrote:
> For determining actual job execution time, save the current value of the
> CTX_TIMESTAMP register rather than the value saved in LRC since the
> current register value is the closest to the start time of the job.
> 
> Fixes: 65921374c48f ("drm/xe: Emit ctx timestamp copy in ring ops")
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>

Reviewed-by: Matthew Brost <matthew.brost@intel.com>

> ---
>  drivers/gpu/drm/xe/xe_ring_ops.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_ring_ops.c b/drivers/gpu/drm/xe/xe_ring_ops.c
> index a7582b097ae6..bc1689db4cd7 100644
> --- a/drivers/gpu/drm/xe/xe_ring_ops.c
> +++ b/drivers/gpu/drm/xe/xe_ring_ops.c
> @@ -234,13 +234,10 @@ static u32 get_ppgtt_flag(struct xe_sched_job *job)
>  
>  static int emit_copy_timestamp(struct xe_lrc *lrc, u32 *dw, int i)
>  {
> -	dw[i++] = MI_COPY_MEM_MEM | MI_COPY_MEM_MEM_SRC_GGTT |
> -		MI_COPY_MEM_MEM_DST_GGTT;
> +	dw[i++] = MI_STORE_REGISTER_MEM | MI_SRM_USE_GGTT | MI_SRM_ADD_CS_OFFSET;
> +	dw[i++] = RING_CTX_TIMESTAMP(0).addr;
>  	dw[i++] = xe_lrc_ctx_job_timestamp_ggtt_addr(lrc);
>  	dw[i++] = 0;
> -	dw[i++] = xe_lrc_ctx_timestamp_ggtt_addr(lrc);
> -	dw[i++] = 0;
> -	dw[i++] = MI_NOOP;
>  
>  	return i;
>  }
> -- 
> 2.43.0
> 

  reply	other threads:[~2025-04-26  4:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-26  0:29 [PATCH v2 0/3] Support active context utilization Umesh Nerlige Ramappa
2025-04-26  0:29 ` [PATCH v2 1/3] drm/xe: Save CTX_TIMESTAMP mmio value instead of LRC value Umesh Nerlige Ramappa
2025-04-26  4:42   ` Matthew Brost [this message]
2025-04-26  0:29 ` [PATCH v2 2/3] drm/xe: Save the gt pointer in lrc and drop the tile Umesh Nerlige Ramappa
2025-04-26  4:43   ` Matthew Brost
2025-04-26  0:29 ` [PATCH v2 3/3] drm/xe: Add WA BB to capture active context utilization Umesh Nerlige Ramappa
2025-04-26  4:54   ` Matthew Brost

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=aAxkGScKPwgsCr6g@lstrano-desk.jf.intel.com \
    --to=matthew.brost@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=umesh.nerlige.ramappa@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.