diff mbox series

drm/i915/guc: Correct capture of EIR register on hang

Message ID 20240223203204.1533410-1-John.C.Harrison@Intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/guc: Correct capture of EIR register on hang | expand

Commit Message

John Harrison Feb. 23, 2024, 8:32 p.m. UTC
From: John Harrison <John.C.Harrison@Intel.com>

The EIR register (0x20B0) was being included in the engine class list
for render and compute as the absolute register address. However, it
is actually a ring register available on all engines at an offset of
(base) + 0xB0. As it was included as an RCS engine but with the
absolute address, GuC was adding on another 0x2000 and coming out at
an invalid location. Thus it would reject the register and complain
about only managing a partial capture.

So update the list to use the RING_EIR version of the register and
include it for all engines.

Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Teres Alexis, Alan Previn Feb. 27, 2024, 6:54 p.m. UTC | #1
On Fri, 2024-02-23 at 12:32 -0800, John.C.Harrison@Intel.com wrote:
> From: John Harrison <John.C.Harrison@Intel.com>
alan:snip

> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
> @@ -51,6 +51,7 @@
>         { RING_ESR(0),              0,      0, "ESR" }, \
>         { RING_DMA_FADD(0),         0,      0, "RING_DMA_FADD_LDW" },
> \
>         { RING_DMA_FADD_UDW(0),     0,      0, "RING_DMA_FADD_UDW" },
> \
> +       { RING_EIR(0),              0,      0, "EIR" }, \
>         { RING_IPEIR(0),            0,      0, "IPEIR" }, \
>         { RING_IPEHR(0),            0,      0, "IPEHR" }, \
>         { RING_INSTPS(0),           0,      0, "INSTPS" }, \
> @@ -80,9 +81,6 @@
>         { GEN8_RING_PDP_LDW(0, 3),  0,      0, "PDP3_LDW" }, \
>         { GEN8_RING_PDP_UDW(0, 3),  0,      0, "PDP3_UDW" }
>  
> -#define COMMON_BASE_HAS_EU \
> -       { EIR,                      0,      0, "EIR" }
> -
alan:snip

alan: Thanks for catching this one.
Reviewed-by: Alan Previn <alan.previn.teres.alexis@intel.com>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
index a1cd40d805178..0cb5f22a173cb 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
@@ -51,6 +51,7 @@ 
 	{ RING_ESR(0),              0,      0, "ESR" }, \
 	{ RING_DMA_FADD(0),         0,      0, "RING_DMA_FADD_LDW" }, \
 	{ RING_DMA_FADD_UDW(0),     0,      0, "RING_DMA_FADD_UDW" }, \
+	{ RING_EIR(0),              0,      0, "EIR" }, \
 	{ RING_IPEIR(0),            0,      0, "IPEIR" }, \
 	{ RING_IPEHR(0),            0,      0, "IPEHR" }, \
 	{ RING_INSTPS(0),           0,      0, "INSTPS" }, \
@@ -80,9 +81,6 @@ 
 	{ GEN8_RING_PDP_LDW(0, 3),  0,      0, "PDP3_LDW" }, \
 	{ GEN8_RING_PDP_UDW(0, 3),  0,      0, "PDP3_UDW" }
 
-#define COMMON_BASE_HAS_EU \
-	{ EIR,                      0,      0, "EIR" }
-
 #define COMMON_BASE_RENDER \
 	{ GEN7_SC_INSTDONE,         0,      0, "GEN7_SC_INSTDONE" }
 
@@ -105,7 +103,6 @@  static const struct __guc_mmio_reg_descr xe_lp_global_regs[] = {
 
 /* XE_LP Render / Compute Per-Class */
 static const struct __guc_mmio_reg_descr xe_lp_rc_class_regs[] = {
-	COMMON_BASE_HAS_EU,
 	COMMON_BASE_RENDER,
 	COMMON_GEN12BASE_RENDER,
 };
@@ -148,7 +145,6 @@  static const struct __guc_mmio_reg_descr gen8_global_regs[] = {
 };
 
 static const struct __guc_mmio_reg_descr gen8_rc_class_regs[] = {
-	COMMON_BASE_HAS_EU,
 	COMMON_BASE_RENDER,
 };