From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
To: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <matthew.brost@intel.com>,
<stuart.summers@intel.com>
Subject: Re: [PATCH v2 2/9] drm/xe: Add timestamp_ms to LRC snapshot
Date: Tue, 5 May 2026 11:03:32 -0700 [thread overview]
Message-ID: <afow9Ap0QC+lv2YQ@soc-5CG1426VCC.clients.intel.com> (raw)
In-Reply-To: <afky3io69uo2yxKU@nvishwa1-desk>
On Mon, May 04, 2026 at 04:59:26PM -0700, Niranjana Vishwanathapura wrote:
>On Fri, May 01, 2026 at 05:53:35PM -0700, Umesh Nerlige Ramappa wrote:
>>From: Matthew Brost <matthew.brost@intel.com>
>>
>>Add a timestamp in milliseconds to the LRC snapshot to make it easier to
>>reason about how long the LRC has been running and the average duration
>>of each job.
>>
>>Signed-off-by: Matthew Brost <matthew.brost@intel.com>
>>---
>>drivers/gpu/drm/xe/xe_lrc.c | 4 ++++
>>drivers/gpu/drm/xe/xe_lrc.h | 1 +
>>2 files changed, 5 insertions(+)
>>
>>diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c
>>index 98dc4d0eb61b..d85c712d106b 100644
>>--- a/drivers/gpu/drm/xe/xe_lrc.c
>>+++ b/drivers/gpu/drm/xe/xe_lrc.c
>>@@ -23,6 +23,7 @@
>>#include "xe_drm_client.h"
>>#include "xe_exec_queue_types.h"
>>#include "xe_gt.h"
>>+#include "xe_gt_clock.h"
>>#include "xe_gt_printk.h"
>>#include "xe_hw_fence.h"
>>#include "xe_map.h"
>>@@ -2476,6 +2477,8 @@ struct xe_lrc_snapshot *xe_lrc_snapshot_capture(struct xe_lrc *lrc)
>> snapshot->replay_size = lrc->replay_size;
>> snapshot->lrc_snapshot = NULL;
>> snapshot->ctx_timestamp = xe_lrc_ctx_timestamp(lrc);
>>+ snapshot->ctx_timestamp_ms =
>>+ xe_gt_clock_interval_to_ms(lrc->gt, xe_lrc_ctx_timestamp(lrc));
>> snapshot->ctx_job_timestamp = xe_lrc_ctx_job_timestamp(lrc);
>> return snapshot;
>>}
>>@@ -2529,6 +2532,7 @@ void xe_lrc_snapshot_print(struct xe_lrc_snapshot *snapshot, struct drm_printer
>> drm_printf(p, "\tStart seqno: (memory) %d\n", snapshot->start_seqno);
>> drm_printf(p, "\tSeqno: (memory) %d\n", snapshot->seqno);
>> drm_printf(p, "\tTimestamp: 0x%016llx\n", snapshot->ctx_timestamp);
>>+ drm_printf(p, "\tTimestamp ms: %llu\n", snapshot->ctx_timestamp_ms);
>
>Do we need a separate field for this? Maybe add it in a single line?
>drm_printf(p, "\tTimestamp: 0x%016llx (%llums)\n", snapshot->ctx_timestamp, snapshot->ctx_timestamp_ms);
>
>I am hoping we don't have any script that is using these capture dumps which we might be breaking here.
I don't know, but I think it's easier for scripts if the new prints are
on separate line. Also the intention was to keep Matt's patch separate
here.
>
>> drm_printf(p, "\tJob Timestamp: 0x%08x\n", snapshot->ctx_job_timestamp);
>>
>> if (!snapshot->lrc_snapshot)
>>diff --git a/drivers/gpu/drm/xe/xe_lrc.h b/drivers/gpu/drm/xe/xe_lrc.h
>>index 62beaffba0af..97aef0327fc8 100644
>>--- a/drivers/gpu/drm/xe/xe_lrc.h
>>+++ b/drivers/gpu/drm/xe/xe_lrc.h
>>@@ -39,6 +39,7 @@ struct xe_lrc_snapshot {
>> u32 seqno;
>> u64 ctx_timestamp;
>> u32 ctx_job_timestamp;
>>+ u64 ctx_timestamp_ms;
>
>NIT...may be put ctx_timestamp_ms right after ctx_timestamp?
>That way, we won't be adding a u32 in between two u64s.
will change,
Umesh
>
>Niranjana
>
>>};
>>
>>#define LRC_PPHWSP_FLUSH_INVAL_SCRATCH_ADDR (0x34 * 4)
>>--
>>2.43.0
>>
next prev parent reply other threads:[~2026-05-05 18:03 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-02 0:53 [PATCH v2 0/9] Support run ticks for multi-queue use case Umesh Nerlige Ramappa
2026-05-02 0:53 ` [PATCH v2 1/9] drm/xe/lrc: Use 64 bit ctx timestamp in the LRC snapshot Umesh Nerlige Ramappa
2026-05-04 23:51 ` Niranjana Vishwanathapura
2026-05-02 0:53 ` [PATCH v2 2/9] drm/xe: Add timestamp_ms to " Umesh Nerlige Ramappa
2026-05-04 23:59 ` Niranjana Vishwanathapura
2026-05-05 18:03 ` Umesh Nerlige Ramappa [this message]
2026-05-02 0:53 ` [PATCH v2 3/9] drm/xe/multi_queue: Store primary LRC and position info in LRC Umesh Nerlige Ramappa
2026-05-05 3:46 ` Niranjana Vishwanathapura
2026-05-05 18:35 ` Umesh Nerlige Ramappa
2026-05-05 18:45 ` Niranjana Vishwanathapura
2026-05-05 18:51 ` Umesh Nerlige Ramappa
2026-05-02 0:53 ` [PATCH v2 4/9] drm/xe/multi_queue: Add helpers to access CS QUEUE TIMESTAMP from lrc Umesh Nerlige Ramappa
2026-05-05 4:00 ` Niranjana Vishwanathapura
2026-05-02 0:53 ` [PATCH v2 5/9] drm/xe/lrc: Refactor out engine id to hwe conversion Umesh Nerlige Ramappa
2026-05-05 4:16 ` Niranjana Vishwanathapura
2026-05-02 0:53 ` [PATCH v2 6/9] drm/xe/multi_queue: Capture queue run times for active queues Umesh Nerlige Ramappa
2026-05-05 4:12 ` Niranjana Vishwanathapura
2026-05-05 19:02 ` Umesh Nerlige Ramappa
2026-05-02 0:53 ` [PATCH v2 7/9] drm/xe/multi_queue: Add trace event for the multi queue timestamp Umesh Nerlige Ramappa
2026-05-05 4:19 ` Niranjana Vishwanathapura
2026-05-02 0:53 ` [PATCH v2 8/9] drm/xe/multi_queue: Use QUEUE_TIMESTAMP as job timestamp for multi-queue Umesh Nerlige Ramappa
2026-05-05 4:20 ` Niranjana Vishwanathapura
2026-05-02 0:53 ` [PATCH v2 9/9] drm/xe/multi_queue: Whitelist QUEUE_TIMESTAMP register Umesh Nerlige Ramappa
2026-05-05 4:25 ` Niranjana Vishwanathapura
2026-05-05 17:58 ` Umesh Nerlige Ramappa
2026-05-05 18:34 ` Niranjana Vishwanathapura
2026-05-05 19:06 ` Umesh Nerlige Ramappa
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=afow9Ap0QC+lv2YQ@soc-5CG1426VCC.clients.intel.com \
--to=umesh.nerlige.ramappa@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=niranjana.vishwanathapura@intel.com \
--cc=stuart.summers@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