[PATCH 22/26] drm/xe/eudebug/ptl: Add RCU_DEBUG_1 register support for xe3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Dominik Grzegorzek <dominik.grzegorzek@xxxxxxxxx>

Format of Register_RenderControlUnitDebug1 is different from
previous gens. Adjust it so it matches PTL/xe3 format.

Acked-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>
Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek@xxxxxxxxx>
Signed-off-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/xe/xe_eudebug.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_eudebug.c b/drivers/gpu/drm/xe/xe_eudebug.c
index c259e5804386..09b455a96571 100644
--- a/drivers/gpu/drm/xe/xe_eudebug.c
+++ b/drivers/gpu/drm/xe/xe_eudebug.c
@@ -1443,6 +1443,17 @@ static u32 engine_status_xe2(const struct xe_hw_engine * const hwe,
 	return (rcu_debug1 >> shift) & RCU_DEBUG_1_ENGINE_STATUS;
 }
 
+static u32 engine_status_xe3(const struct xe_hw_engine * const hwe,
+			     u32 rcu_debug1)
+{
+	const unsigned int first = 6;
+	const unsigned int incr = 4;
+	const unsigned int i = rcu_debug1_engine_index(hwe);
+	const unsigned int shift = first + (i * incr);
+
+	return (rcu_debug1 >> shift) & RCU_DEBUG_1_ENGINE_STATUS;
+}
+
 static u32 engine_status(const struct xe_hw_engine * const hwe,
 			 u32 rcu_debug1)
 {
@@ -1452,6 +1463,8 @@ static u32 engine_status(const struct xe_hw_engine * const hwe,
 		status = engine_status_xe1(hwe, rcu_debug1);
 	else if (GRAPHICS_VER(gt_to_xe(hwe->gt)) < 30)
 		status = engine_status_xe2(hwe, rcu_debug1);
+	else if (GRAPHICS_VER(gt_to_xe(hwe->gt)) < 35)
+		status = engine_status_xe3(hwe, rcu_debug1);
 	else
 		XE_WARN_ON(GRAPHICS_VER(gt_to_xe(hwe->gt)));
 
-- 
2.43.0




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux