From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
To: intel-xe@lists.freedesktop.org, niranjana.vishwanathapura@intel.com
Cc: matthew.brost@intel.com, stuart.summers@intel.com
Subject: [PATCH v2 8/9] drm/xe/multi_queue: Use QUEUE_TIMESTAMP as job timestamp for multi-queue
Date: Fri, 1 May 2026 17:53:41 -0700 [thread overview]
Message-ID: <20260502005332.3135977-19-umesh.nerlige.ramappa@intel.com> (raw)
In-Reply-To: <20260502005332.3135977-11-umesh.nerlige.ramappa@intel.com>
Each queue in a multi queue group has a dedicated timestamp counter. Use
this QUEUE TIMESTAMP register to capture the start timestamp for the
job.
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
---
v2: Use xe_lrc_is_multi_queue for check (Niranjana)
---
drivers/gpu/drm/xe/xe_ring_ops.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_ring_ops.c b/drivers/gpu/drm/xe/xe_ring_ops.c
index cfeb4fc7d217..39a670e91ba7 100644
--- a/drivers/gpu/drm/xe/xe_ring_ops.c
+++ b/drivers/gpu/drm/xe/xe_ring_ops.c
@@ -269,8 +269,12 @@ static u32 get_ppgtt_flag(struct xe_sched_job *job)
static int emit_copy_timestamp(struct xe_device *xe, struct xe_lrc *lrc,
u32 *dw, int i)
{
+ const struct xe_reg reg = xe_lrc_is_multi_queue(lrc) ?
+ RING_QUEUE_TIMESTAMP(0) :
+ RING_CTX_TIMESTAMP(0);
+
dw[i++] = MI_STORE_REGISTER_MEM | MI_SRM_USE_GGTT | MI_SRM_ADD_CS_OFFSET;
- dw[i++] = RING_CTX_TIMESTAMP(0).addr;
+ dw[i++] = reg.addr;
dw[i++] = xe_lrc_ctx_job_timestamp_ggtt_addr(lrc);
dw[i++] = 0;
@@ -281,7 +285,7 @@ static int emit_copy_timestamp(struct xe_device *xe, struct xe_lrc *lrc,
if (IS_SRIOV_VF(xe)) {
dw[i++] = MI_STORE_REGISTER_MEM | MI_SRM_USE_GGTT |
MI_SRM_ADD_CS_OFFSET;
- dw[i++] = RING_CTX_TIMESTAMP(0).addr;
+ dw[i++] = reg.addr;
dw[i++] = xe_lrc_ctx_timestamp_ggtt_addr(lrc);
dw[i++] = 0;
}
--
2.43.0
next prev parent reply other threads:[~2026-05-02 0:53 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
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 ` Umesh Nerlige Ramappa [this message]
2026-05-05 4:20 ` [PATCH v2 8/9] drm/xe/multi_queue: Use QUEUE_TIMESTAMP as job timestamp for multi-queue 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=20260502005332.3135977-19-umesh.nerlige.ramappa@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