]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/xe/multi_queue: Use QUEUE_TIMESTAMP as job timestamp for multi-queue
authorUmesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Thu, 7 May 2026 16:20:27 +0000 (09:20 -0700)
committerUmesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Fri, 8 May 2026 20:49:36 +0000 (13:49 -0700)
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>
Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260507162016.3888309-23-umesh.nerlige.ramappa@intel.com
drivers/gpu/drm/xe/xe_ring_ops.c

index cfeb4fc7d2177337ca5b82aee41a88dd196f7951..39a670e91ba7221755e836ba6a835db076f4a7ee 100644 (file)
@@ -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;
        }