Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
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 v3 11/11] drm/xe/multi_queue: Whitelist QUEUE_TIMESTAMP register
Date: Tue,  5 May 2026 16:44:20 -0700	[thread overview]
Message-ID: <20260505234408.3552147-24-umesh.nerlige.ramappa@intel.com> (raw)
In-Reply-To: <20260505234408.3552147-13-umesh.nerlige.ramappa@intel.com>

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>
---
v2: Whitelist QUEUE_TIMESTAMP only for copy and compute engines (Niranjana)
v3: (Niranjana)
- s/multiq/multi_queue/
- Base the condition on multi_queue_engine_class_mask
---
 drivers/gpu/drm/xe/xe_reg_whitelist.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_reg_whitelist.c b/drivers/gpu/drm/xe/xe_reg_whitelist.c
index 8cc313182968..6f96bf84df66 100644
--- a/drivers/gpu/drm/xe/xe_reg_whitelist.c
+++ b/drivers/gpu/drm/xe/xe_reg_whitelist.c
@@ -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_hwe_class_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),
-- 
2.51.0


  parent reply	other threads:[~2026-05-05 23:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05 23:44 [PATCH v3 00/11] Support run ticks for multi-queue use case Umesh Nerlige Ramappa
2026-05-05 23:44 ` [PATCH v3 01/11] drm/xe/lrc: Use 64 bit ctx timestamp in the LRC snapshot Umesh Nerlige Ramappa
2026-05-05 23:44 ` [PATCH v3 02/11] drm/xe: Add timestamp_ms to " Umesh Nerlige Ramappa
2026-05-06  3:10   ` Niranjana Vishwanathapura
2026-05-05 23:44 ` [PATCH v3 03/11] drm/xe/lrc: Refactor xe_lrc_timestamp to simplify logic Umesh Nerlige Ramappa
2026-05-06  3:13   ` Niranjana Vishwanathapura
2026-05-05 23:44 ` [PATCH v3 04/11] drm/xe/multi_queue: Refactor check for multi queue support for engine class Umesh Nerlige Ramappa
2026-05-06  3:16   ` Niranjana Vishwanathapura
2026-05-05 23:44 ` [PATCH v3 05/11] drm/xe/multi_queue: Store primary LRC and position info in LRC Umesh Nerlige Ramappa
2026-05-06  3:47   ` Niranjana Vishwanathapura
2026-05-05 23:44 ` [PATCH v3 06/11] drm/xe/multi_queue: Add helpers to access CS QUEUE TIMESTAMP from lrc Umesh Nerlige Ramappa
2026-05-06  3:25   ` Niranjana Vishwanathapura
2026-05-06  5:07   ` Niranjana Vishwanathapura
2026-05-05 23:44 ` [PATCH v3 07/11] drm/xe/lrc: Refactor out engine id to hwe conversion Umesh Nerlige Ramappa
2026-05-05 23:44 ` [PATCH v3 08/11] drm/xe/multi_queue: Capture queue run times for active queues Umesh Nerlige Ramappa
2026-05-06  3:30   ` Niranjana Vishwanathapura
2026-05-05 23:44 ` [PATCH v3 09/11] drm/xe/multi_queue: Add trace event for the multi queue timestamp Umesh Nerlige Ramappa
2026-05-06  5:03   ` Niranjana Vishwanathapura
2026-05-06 20:25     ` Umesh Nerlige Ramappa
2026-05-05 23:44 ` [PATCH v3 10/11] drm/xe/multi_queue: Use QUEUE_TIMESTAMP as job timestamp for multi-queue Umesh Nerlige Ramappa
2026-05-05 23:44 ` Umesh Nerlige Ramappa [this message]
2026-05-06  3:31   ` [PATCH v3 11/11] drm/xe/multi_queue: Whitelist QUEUE_TIMESTAMP register Niranjana Vishwanathapura
2026-05-05 23:51 ` ✗ CI.checkpatch: warning for Support run ticks for multi-queue use case (rev3) Patchwork
2026-05-05 23:53 ` ✓ CI.KUnit: success " Patchwork

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=20260505234408.3552147-24-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