]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/xe/multi_queue: Whitelist QUEUE_TIMESTAMP register
authorUmesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Thu, 7 May 2026 16:20:28 +0000 (09:20 -0700)
committerUmesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Fri, 8 May 2026 20:50:11 +0000 (13:50 -0700)
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: https://github.com/intel/compute-runtime/pull/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
drivers/gpu/drm/xe/xe_reg_whitelist.c

index 8cc313182968d354f29b16629ce2f44bd7395f05..fb65940848d7ae1cc6ca2a185b2c3f7db90cd059 100644 (file)
@@ -9,6 +9,7 @@
 #include "regs/xe_gt_regs.h"
 #include "regs/xe_oa_regs.h"
 #include "xe_device.h"
+#include "xe_gt.h"
 #include "xe_gt_types.h"
 #include "xe_gt_printk.h"
 #include "xe_platform_types.h"
@@ -33,6 +34,13 @@ static bool match_has_mert(const struct xe_device *xe,
        return xe_device_has_mert((struct xe_device *)xe);
 }
 
+static bool match_multi_queue_class(const struct xe_device *xe,
+                                   const struct xe_gt *gt,
+                                   const struct xe_hw_engine *hwe)
+{
+       return xe_gt_supports_multi_queue(gt, hwe->class);
+}
+
 static const struct xe_rtp_entry_sr register_whitelist[] = {
        { XE_RTP_NAME("WaAllowPMDepthAndInvocationCountAccessFromUMD, 1408556865"),
          XE_RTP_RULES(GRAPHICS_VERSION_RANGE(1200, 1210), ENGINE_CLASS(RENDER)),
@@ -54,6 +62,12 @@ static const struct xe_rtp_entry_sr register_whitelist[] = {
                                RING_FORCE_TO_NONPRIV_ACCESS_RD,
                                XE_RTP_ACTION_FLAG(ENGINE_BASE)))
        },
+       { XE_RTP_NAME("allow_read_queue_timestamp"),
+         XE_RTP_RULES(GRAPHICS_VERSION_RANGE(3500, 3511), FUNC(match_multi_queue_class)),
+         XE_RTP_ACTIONS(WHITELIST(RING_QUEUE_TIMESTAMP(0),
+                                  RING_FORCE_TO_NONPRIV_ACCESS_RD,
+                                  XE_RTP_ACTION_FLAG(ENGINE_BASE)))
+       },
        { XE_RTP_NAME("16014440446"),
          XE_RTP_RULES(PLATFORM(PVC)),
          XE_RTP_ACTIONS(WHITELIST(XE_REG(0x4400),