Skip to content

Commit 1445cb7

Browse files
committed
drm/xe/multi_queue: Use QUEUE_TIMESTAMP as job timestamp for multi-queue
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
1 parent 1f30396 commit 1445cb7

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

drivers/gpu/drm/xe/xe_ring_ops.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,12 @@ static u32 get_ppgtt_flag(struct xe_sched_job *job)
269269
static int emit_copy_timestamp(struct xe_device *xe, struct xe_lrc *lrc,
270270
u32 *dw, int i)
271271
{
272+
const struct xe_reg reg = xe_lrc_is_multi_queue(lrc) ?
273+
RING_QUEUE_TIMESTAMP(0) :
274+
RING_CTX_TIMESTAMP(0);
275+
272276
dw[i++] = MI_STORE_REGISTER_MEM | MI_SRM_USE_GGTT | MI_SRM_ADD_CS_OFFSET;
273-
dw[i++] = RING_CTX_TIMESTAMP(0).addr;
277+
dw[i++] = reg.addr;
274278
dw[i++] = xe_lrc_ctx_job_timestamp_ggtt_addr(lrc);
275279
dw[i++] = 0;
276280

@@ -281,7 +285,7 @@ static int emit_copy_timestamp(struct xe_device *xe, struct xe_lrc *lrc,
281285
if (IS_SRIOV_VF(xe)) {
282286
dw[i++] = MI_STORE_REGISTER_MEM | MI_SRM_USE_GGTT |
283287
MI_SRM_ADD_CS_OFFSET;
284-
dw[i++] = RING_CTX_TIMESTAMP(0).addr;
288+
dw[i++] = reg.addr;
285289
dw[i++] = xe_lrc_ctx_timestamp_ggtt_addr(lrc);
286290
dw[i++] = 0;
287291
}

0 commit comments

Comments
 (0)