Skip to content

Commit b619bbc

Browse files
committed
drm/xe/multi_queue: Whitelist QUEUE_TIMESTAMP register
In a multi-queue use case, when a job is running on the secondary queue, the CTX_TIMESTAMP does not reflect the queues run ticks. Instead, we use the QUEUE TIMESTAMP to check how long the job ran. For user space to see the run ticks for a secondary queue, whitelist the QUEUE_TIMESTAMP register. Compute PR: intel/compute-runtime#923 Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Link: https://patch.msgid.link/20260507162016.3888309-24-umesh.nerlige.ramappa@intel.com
1 parent 1445cb7 commit b619bbc

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

drivers/gpu/drm/xe/xe_reg_whitelist.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "regs/xe_gt_regs.h"
1010
#include "regs/xe_oa_regs.h"
1111
#include "xe_device.h"
12+
#include "xe_gt.h"
1213
#include "xe_gt_types.h"
1314
#include "xe_gt_printk.h"
1415
#include "xe_platform_types.h"
@@ -33,6 +34,13 @@ static bool match_has_mert(const struct xe_device *xe,
3334
return xe_device_has_mert((struct xe_device *)xe);
3435
}
3536

37+
static bool match_multi_queue_class(const struct xe_device *xe,
38+
const struct xe_gt *gt,
39+
const struct xe_hw_engine *hwe)
40+
{
41+
return xe_gt_supports_multi_queue(gt, hwe->class);
42+
}
43+
3644
static const struct xe_rtp_entry_sr register_whitelist[] = {
3745
{ XE_RTP_NAME("WaAllowPMDepthAndInvocationCountAccessFromUMD, 1408556865"),
3846
XE_RTP_RULES(GRAPHICS_VERSION_RANGE(1200, 1210), ENGINE_CLASS(RENDER)),
@@ -54,6 +62,12 @@ static const struct xe_rtp_entry_sr register_whitelist[] = {
5462
RING_FORCE_TO_NONPRIV_ACCESS_RD,
5563
XE_RTP_ACTION_FLAG(ENGINE_BASE)))
5664
},
65+
{ XE_RTP_NAME("allow_read_queue_timestamp"),
66+
XE_RTP_RULES(GRAPHICS_VERSION_RANGE(3500, 3511), FUNC(match_multi_queue_class)),
67+
XE_RTP_ACTIONS(WHITELIST(RING_QUEUE_TIMESTAMP(0),
68+
RING_FORCE_TO_NONPRIV_ACCESS_RD,
69+
XE_RTP_ACTION_FLAG(ENGINE_BASE)))
70+
},
5771
{ XE_RTP_NAME("16014440446"),
5872
XE_RTP_RULES(PLATFORM(PVC)),
5973
XE_RTP_ACTIONS(WHITELIST(XE_REG(0x4400),

0 commit comments

Comments
 (0)