Skip to contentSkip to conversation

drm/xe: Add engine name to the engine reset and cat-err log

PATCH Applied Nirmoy Das 4 participants 7 messages May 28, 2024 – May 29, 2024

Subsystems (2)
lore
Share & tools
lore

Nirmoy Das

author
#0 lore raw

PATCH v2 1/1 drm/xe: Add engine name to the engine reset and cat-err log

Add engine name to the engine reset and cat error log which should be useful while debugging.

v2: Add logical mask and engine class(Matt)
Use xe_gt_{info|dbg} (Michal)

Cc Matthew Brost <[email protected]>
Cc Michal Wajdeczko <[email protected]>
---
 drivers/gpu/drm/xe/xe_guc_submit.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/xe/xe_guc_submit.c +7 -2
index 72aa2f91832c..e22bd6b09a74 100644
@@ -1681,6 +1681,7 @@ int xe_guc_deregister_done_handler(struct xe_guc *guc, u32 *msg, u32 len)
 
 int xe_guc_exec_queue_reset_handler(struct xe_guc *guc, u32 *msg, u32 len)
 {
+	struct xe_gt *gt = guc_to_gt(guc);
 	struct xe_device *xe = guc_to_xe(guc);
 	struct xe_exec_queue *q;
 	u32 guc_id = msg[0];
@@ -1694,7 +1695,8 @@ int xe_guc_exec_queue_reset_handler(struct xe_guc *guc, u32 *msg, u32 len)
 	if (unlikely(!q))
 		return -EPROTO;
 
-	drm_info(&xe->drm, "Engine reset: guc_id=%d", guc_id);
+	xe_gt_info(gt, "Engine reset: engine_class=%s, logical_mask: 0x%x, guc_id=%d",
+		   xe_hw_engine_class_to_str(q->class), q->logical_mask, guc_id);
 
 	/* FIXME: Do error capture, most likely async */
 
@@ -1716,6 +1718,7 @@ int xe_guc_exec_queue_reset_handler(struct xe_guc *guc, u32 *msg, u32 len)
 int xe_guc_exec_queue_memory_cat_error_handler(struct xe_guc *guc, u32 *msg,
 					       u32 len)
 {
+	struct xe_gt *gt = guc_to_gt(guc);
 	struct xe_device *xe = guc_to_xe(guc);
 	struct xe_exec_queue *q;
 	u32 guc_id = msg[0];
@@ -1729,7 +1732,9 @@ int xe_guc_exec_queue_memory_cat_error_handler(struct xe_guc *guc, u32 *msg,
 	if (unlikely(!q))
 		return -EPROTO;
 
-	drm_dbg(&xe->drm, "Engine memory cat error: guc_id=%d", guc_id);
+	xe_gt_dbg(gt, "Engine memory cat error: engine_class=%s, logical_mask: 0x%x, guc_id=%d",
+		  xe_hw_engine_class_to_str(q->class), q->logical_mask, guc_id);
+
 	trace_xe_exec_queue_memory_cat_error(q);
 
 	/* Treat the same as engine reset */
Signature · 1 line
2.42.0
#1 lore raw

✓ CI.Patch_applied: success for drm/xe: Add engine name to the engine reset and cat-err log (rev2)

== Series Details ==

== Series Details ==

Series: drm/xe: Add engine name to the engine reset and cat-err log (rev2)
URL : https://patchwork.freedesktop.org/series/132907/
State : success

== Summary ==

=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: 5ba74aaea55b drm-tip: 2024y-05m-28d-09h-56m-00s UTC integration manifest === git am output follows ===
Applying: drm/xe: Add engine name to the engine reset and cat-err log

#2 lore raw

✓ CI.checkpatch: success for drm/xe: Add engine name to the engine reset and cat-err log (rev2)

In reply to Nirmoy Das
== Series Details ==

== Series Details ==

Series: drm/xe: Add engine name to the engine reset and cat-err log (rev2)
URL : https://patchwork.freedesktop.org/series/132907/
State : success

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master 51ce9f6cd981d42d7467409d7dbc559a450abc1e
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 406deccc19f62be6f2f1268a30faf8ac25aab902

Author: Nirmoy Das <[email protected]>
Date:   Tue May 28 12:14:45 2024 +0200

drm/xe: Add engine name to the engine reset and cat-err log

Add engine name to the engine reset and cat error log which should be useful while debugging.

v2: Add logical mask and engine class(Matt)
Use xe_gt_{info|dbg} (Michal)

Cc Matthew Brost <[email protected]>
Cc Michal Wajdeczko <[email protected]>

+ /mt/dim checkpatch 5ba74aaea55bf295898f2a4f69c59fe12e84e842 drm-intel 406deccc19f6 drm/xe: Add engine name to the engine reset and cat-err log

#3 lore raw

✗ CI.KUnit: failure for drm/xe: Add engine name to the engine reset and cat-err log (rev2)

In reply to Nirmoy Das
== Series Details ==

== Series Details ==

Series: drm/xe: Add engine name to the engine reset and cat-err log (rev2)
URL : https://patchwork.freedesktop.org/series/132907/
State : failure

== Summary ==

+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig [10:38:51] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[10:38:55] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
../lib/iomap.c:156:5: warning: no previous prototype for ‘ioread64_lo_hi’ [-Wmissing-prototypes]
  156 | u64 ioread64_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:163:5: warning: no previous prototype for ‘ioread64_hi_lo’ [-Wmissing-prototypes]
  163 | u64 ioread64_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:170:5: warning: no previous prototype for ‘ioread64be_lo_hi’ [-Wmissing-prototypes]
  170 | u64 ioread64be_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:178:5: warning: no previous prototype for ‘ioread64be_hi_lo’ [-Wmissing-prototypes]
  178 | u64 ioread64be_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:264:6: warning: no previous prototype for ‘iowrite64_lo_hi’ [-Wmissing-prototypes]
  264 | void iowrite64_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:272:6: warning: no previous prototype for ‘iowrite64_hi_lo’ [-Wmissing-prototypes]
  272 | void iowrite64_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:280:6: warning: no previous prototype for ‘iowrite64be_lo_hi’ [-Wmissing-prototypes]
  280 | void iowrite64be_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~
../lib/iomap.c:288:6: warning: no previous prototype for ‘iowrite64be_hi_lo’ [-Wmissing-prototypes]
  288 | void iowrite64be_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~

[10:39:21] Starting KUnit Kernel (1/1)...
[10:39:21] ============================================================ Running tests with:

$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[10:39:22] =================== guc_dbm (7 subtests) ===================
[10:39:22] [PASSED] test_empty
[10:39:22] [PASSED] test_default
[10:39:22] ======================== test_size  ========================
[10:39:22] [PASSED] 4
[10:39:22] [PASSED] 8
[10:39:22] [PASSED] 32
[10:39:22] [PASSED] 256
[10:39:22] ==================== [PASSED] test_size ====================
[10:39:22] ======================= test_reuse  ========================
[10:39:22] [PASSED] 4
[10:39:22] [PASSED] 8
[10:39:22] [PASSED] 32
[10:39:22] [PASSED] 256
[10:39:22] =================== [PASSED] test_reuse ====================
[10:39:22] =================== test_range_overlap  ====================
[10:39:22] [PASSED] 4
[10:39:22] [PASSED] 8
[10:39:22] [PASSED] 32
[10:39:22] [PASSED] 256
[10:39:22] =============== [PASSED] test_range_overlap ================
[10:39:22] =================== test_range_compact  ====================
[10:39:22] [PASSED] 4
[10:39:22] [PASSED] 8
[10:39:22] [PASSED] 32
[10:39:22] [PASSED] 256
[10:39:22] =============== [PASSED] test_range_compact ================
[10:39:22] ==================== test_range_spare  =====================
[10:39:22] [PASSED] 4
[10:39:22] [PASSED] 8
[10:39:22] [PASSED] 32
[10:39:22] [PASSED] 256
[10:39:22] ================ [PASSED] test_range_spare =================
[10:39:22] ===================== [PASSED] guc_dbm =====================
[10:39:22] =================== guc_idm (6 subtests) ===================
[10:39:22] [PASSED] bad_init
[10:39:22] [PASSED] no_init
[10:39:22] [PASSED] init_fini
[10:39:22] [PASSED] check_used
[10:39:22] [PASSED] check_quota
[10:39:22] [PASSED] check_all
[10:39:22] ===================== [PASSED] guc_idm =====================
[10:39:22] ================== no_relay (3 subtests) ===================
[10:39:22] [PASSED] xe_drops_guc2pf_if_not_ready
[10:39:22] [PASSED] xe_drops_guc2vf_if_not_ready
[10:39:22] [PASSED] xe_rejects_send_if_not_ready
[10:39:22] ==================== [PASSED] no_relay =====================
[10:39:22] ================== pf_relay (14 subtests) ==================
[10:39:22] [PASSED] pf_rejects_guc2pf_too_short
[10:39:22] [PASSED] pf_rejects_guc2pf_too_long
[10:39:22] [PASSED] pf_rejects_guc2pf_no_payload
[10:39:22] [PASSED] pf_fails_no_payload
[10:39:22] [PASSED] pf_fails_bad_origin
[10:39:22] [PASSED] pf_fails_bad_type
[10:39:22] [PASSED] pf_txn_reports_error
[10:39:22] [PASSED] pf_txn_sends_pf2guc
[10:39:22] [PASSED] pf_sends_pf2guc
[10:39:22] [SKIPPED] pf_loopback_nop
[10:39:22] [SKIPPED] pf_loopback_echo
[10:39:22] [SKIPPED] pf_loopback_fail
[10:39:22] [SKIPPED] pf_loopback_busy
[10:39:22] [SKIPPED] pf_loopback_retry
[10:39:22] ==================== [PASSED] pf_relay =====================
[10:39:22] ================== vf_relay (3 subtests) ===================
[10:39:22] [PASSED] vf_rejects_guc2vf_too_short
[10:39:22] [PASSED] vf_rejects_guc2vf_too_long
[10:39:22] [PASSED] vf_rejects_guc2vf_no_payload
[10:39:22] ==================== [PASSED] vf_relay =====================
[10:39:22] ================= pf_service (11 subtests) =================
[10:39:22] [PASSED] pf_negotiate_any
[10:39:22] [PASSED] pf_negotiate_base_match
[10:39:22] [PASSED] pf_negotiate_base_newer
[10:39:22] [PASSED] pf_negotiate_base_next
[10:39:22] [SKIPPED] pf_negotiate_base_older
[10:39:22] [PASSED] pf_negotiate_base_prev
[10:39:22] [PASSED] pf_negotiate_latest_match
[10:39:22] [PASSED] pf_negotiate_latest_newer
[10:39:22] [PASSED] pf_negotiate_latest_next
[10:39:22] [SKIPPED] pf_negotiate_latest_older
[10:39:22] [SKIPPED] pf_negotiate_latest_prev
[10:39:22] =================== [PASSED] pf_service ====================
[10:39:22] ===================== lmtt (1 subtest) =====================
[10:39:22] ======================== test_ops  =========================
[10:39:22] [PASSED] 2-level
[10:39:22] [PASSED] multi-level
[10:39:22] ==================== [PASSED] test_ops =====================
[10:39:22] ====================== [PASSED] lmtt =======================
[10:39:22] ==================== xe_bo (2 subtests) ====================
[10:39:22] [SKIPPED] xe_ccs_migrate_kunit
[10:39:22] [SKIPPED] xe_bo_evict_kunit
[10:39:22] ===================== [SKIPPED] xe_bo ======================
[10:39:22] ================== xe_dma_buf (1 subtest) ==================
[10:39:22] [SKIPPED] xe_dma_buf_kunit
[10:39:22] =================== [SKIPPED] xe_dma_buf ===================
[10:39:22] ================== xe_migrate (1 subtest) ==================
[10:39:22] [SKIPPED] xe_migrate_sanity_kunit
[10:39:22] =================== [SKIPPED] xe_migrate ===================
[10:39:22] =================== xe_mocs (2 subtests) ===================
[10:39:22] [SKIPPED] xe_live_mocs_kernel_kunit
[10:39:22] [SKIPPED] xe_live_mocs_reset_kunit
[10:39:22] ==================== [SKIPPED] xe_mocs =====================
[10:39:22] ==================== args (11 subtests) ====================
[10:39:22] [PASSED] count_args_test
[10:39:22] [PASSED] call_args_example
[10:39:22] [PASSED] call_args_test
[10:39:22] [PASSED] drop_first_arg_example
[10:39:22] [PASSED] drop_first_arg_test
[10:39:22] [PASSED] first_arg_example
[10:39:22] [PASSED] first_arg_test
[10:39:22] [PASSED] last_arg_example
[10:39:22] [PASSED] last_arg_test
[10:39:22] [PASSED] pick_arg_example
[10:39:22] [PASSED] sep_comma_example
[10:39:22] ====================== [PASSED] args =======================
[10:39:22] =================== xe_pci (2 subtests) ====================
[10:39:22] [PASSED] xe_gmdid_graphics_ip
[10:39:22] [PASSED] xe_gmdid_media_ip
[10:39:22] ===================== [PASSED] xe_pci ======================
[10:39:22] ==================== xe_rtp (1 subtest) ====================
[10:39:22] ================== xe_rtp_process_tests  ===================
[10:39:22] [PASSED] coalesce-same-reg
[10:39:22] [PASSED] no-match-no-add
[10:39:22] [PASSED] no-match-no-add-multiple-rules
[10:39:22] [PASSED] two-regs-two-entries
[10:39:22] [PASSED] clr-one-set-other
[10:39:22] [PASSED] set-field
[10:39:22] [PASSED] conflict-duplicate
[10:39:22] [PASSED] conflict-not-disjoint
[10:39:22] [PASSED] conflict-reg-type
[10:39:22] ============== [PASSED] xe_rtp_process_tests ===============
stty: 'standard input': Inappropriate ioctl for device
[10:39:22] ===================== [PASSED] xe_rtp ======================
[10:39:22] ==================== xe_wa (1 subtest) =====================
[10:39:22] ======================== xe_wa_gt  =========================
[10:39:22] [PASSED] TIGERLAKE (B0)
[10:39:22] [PASSED] DG1 (A0)
[10:39:22] [PASSED] DG1 (B0)
[10:39:22] [PASSED] ALDERLAKE_S (A0)
[10:39:22] [PASSED] ALDERLAKE_S (B0)
[10:39:22] [PASSED] ALDERLAKE_S (C0)
[10:39:22] [PASSED] ALDERLAKE_S (D0)
[10:39:22] [PASSED] ALDERLAKE_P (A0)
[10:39:22] [PASSED] ALDERLAKE_P (B0)
[10:39:22] [PASSED] ALDERLAKE_P (C0)
[10:39:22] [PASSED] ALDERLAKE_S_RPLS (D0)
[10:39:22] [PASSED] ALDERLAKE_P_RPLU (E0)
[10:39:22] [PASSED] DG2_G10 (C0)
[10:39:22] [PASSED] DG2_G11 (B1)
[10:39:22] [PASSED] DG2_G12 (A1)
[10:39:22] [PASSED] METEORLAKE (g:A0, m:A0)
[10:39:22] [PASSED] METEORLAKE (g:A0, m:A0)
[10:39:22] [PASSED] METEORLAKE (g:A0, m:A0)
[10:39:22] [PASSED] LUNARLAKE (g:A0, m:A0)
[10:39:22] [PASSED] LUNARLAKE (g:B0, m:A0)
[10:39:22] ==================== [PASSED] xe_wa_gt =====================
[10:39:22] ====================== [PASSED] xe_wa ======================
[10:39:22] ============================================================
[10:39:22] Testing complete. Ran 109 tests: passed: 95, skipped: 14
[10:39:22] Elapsed time: 31.134s total, 4.279s configuring, 26.585s building, 0.217s running

+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig ERROR:root:
WARNING: unmet direct dependencies detected for DRM_DISPLAY_HDMI_STATE_HELPER
Depends on [n]: HAS_IOMEM [=y] && DRM [=y] && DRM_DISPLAY_HELPER [=y] && DRM_DISPLAY_HDMI_HELPER [=n] Selected by [y]:
- DRM_KUNIT_TEST [=y] && HAS_IOMEM [=y] && DRM [=y] && KUNIT [=y] && MMU [=y]

WARNING: unmet direct dependencies detected for DRM_DISPLAY_HDMI_STATE_HELPER
Depends on [n]: HAS_IOMEM [=y] && DRM [=y] && DRM_DISPLAY_HELPER [=y] && DRM_DISPLAY_HDMI_HELPER [=n] Selected by [y]:
- DRM_KUNIT_TEST [=y] && HAS_IOMEM [=y] && DRM [=y] && KUNIT [=y] && MMU [=y]

WARNING: unmet direct dependencies detected for DRM_DISPLAY_HDMI_STATE_HELPER
Depends on [n]: HAS_IOMEM [=y] && DRM [=y] && DRM_DISPLAY_HELPER [=y] && DRM_DISPLAY_HDMI_HELPER [=n] Selected by [y]:
- DRM_KUNIT_TEST [=y] && HAS_IOMEM [=y] && DRM [=y] && KUNIT [=y] && MMU [=y]
../lib/iomap.c:156:5: warning: no previous prototype for ‘ioread64_lo_hi’ [-Wmissing-prototypes]
156 | u64 ioread64_lo_hi(const void __iomem *addr)

      |     ^~~~~~~~~~~~~~
../lib/iomap.c:163:5: warning: no previous prototype for ‘ioread64_hi_lo’ [-Wmissing-prototypes]
  163 | u64 ioread64_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:170:5: warning: no previous prototype for ‘ioread64be_lo_hi’ [-Wmissing-prototypes]
  170 | u64 ioread64be_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:178:5: warning: no previous prototype for ‘ioread64be_hi_lo’ [-Wmissing-prototypes]
  178 | u64 ioread64be_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:264:6: warning: no previous prototype for ‘iowrite64_lo_hi’ [-Wmissing-prototypes]
  264 | void iowrite64_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:272:6: warning: no previous prototype for ‘iowrite64_hi_lo’ [-Wmissing-prototypes]
  272 | void iowrite64_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:280:6: warning: no previous prototype for ‘iowrite64be_lo_hi’ [-Wmissing-prototypes]
  280 | void iowrite64be_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~
../lib/iomap.c:288:6: warning: no previous prototype for ‘iowrite64be_hi_lo’ [-Wmissing-prototypes]
  288 | void iowrite64be_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~

/usr/bin/ld: drivers/gpu/drm/tests/drm_connector_test.o: in function `drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc':
drm_connector_test.c:(.text+0x570): undefined reference to `drm_hdmi_compute_mode_clock'
/usr/bin/ld: drivers/gpu/drm/tests/drm_connector_test.o: in function `drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc':
drm_connector_test.c:(.text+0x760): undefined reference to `drm_hdmi_compute_mode_clock'
/usr/bin/ld: drivers/gpu/drm/tests/drm_connector_test.o: in function `drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc':
drm_connector_test.c:(.text+0x950): undefined reference to `drm_hdmi_compute_mode_clock'
/usr/bin/ld: drivers/gpu/drm/tests/drm_connector_test.o: in function `drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc':
drm_connector_test.c:(.text+0xb40): undefined reference to `drm_hdmi_compute_mode_clock'
/usr/bin/ld: drivers/gpu/drm/tests/drm_connector_test.o: in function `drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc':
drm_connector_test.c:(.text+0xd30): undefined reference to `drm_hdmi_compute_mode_clock'
/usr/bin/ld: drivers/gpu/drm/tests/drm_connector_test.o:drm_connector_test.c:(.text+0xf26): more undefined references to drm_hdmi_compute_mode_clock' follow /usr/bin/ld: drivers/gpu/drm/display/drm_hdmi_state_helper.o: in function drm_atomic_helper_connector_hdmi_check':
drm_hdmi_state_helper.c:(.text+0x9d8): undefined reference to `drm_hdmi_avi_infoframe_colorimetry'
/usr/bin/ld: drm_hdmi_state_helper.c:(.text+0x9ea): undefined reference to `drm_hdmi_avi_infoframe_bars'
/usr/bin/ld: drm_hdmi_state_helper.c:(.text+0xa54): undefined reference to `drm_hdmi_infoframe_set_hdr_metadata'
collect2: error: ld returned 1 exit status
make[3]: *** [../scripts/Makefile.vmlinux:34: vmlinux] Error 1
make[2]: *** [/kernel/Makefile:1171: vmlinux] Error 2
make[1]: *** [/kernel/Makefile:240: __sub-make] Error 2
make: *** [Makefile:240: __sub-make] Error 2

[10:39:22] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[10:39:23] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
maintainer Reviewed-by on v2 1/1
#4 lore raw
In reply to Nirmoy Das
Quoted 7 lines · Nirmoy Das

Add engine name to the engine reset and cat error log which should be useful while debugging.

v2: Add logical mask and engine class(Matt)
Use xe_gt_{info|dbg} (Michal)

Cc Matthew Brost <[email protected]>

Sending to correct version:

Quoted 50 lines
Cc Michal Wajdeczko <[email protected]>
---
 drivers/gpu/drm/xe/xe_guc_submit.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/xe/xe_guc_submit.c +7 -2
index 72aa2f91832c..e22bd6b09a74 100644
@@ -1681,6 +1681,7 @@ int xe_guc_deregister_done_handler(struct xe_guc *guc, u32 *msg, u32 len)
 
 int xe_guc_exec_queue_reset_handler(struct xe_guc *guc, u32 *msg, u32 len)
 {
+	struct xe_gt *gt = guc_to_gt(guc);
 	struct xe_device *xe = guc_to_xe(guc);
 	struct xe_exec_queue *q;
 	u32 guc_id = msg[0];
@@ -1694,7 +1695,8 @@ int xe_guc_exec_queue_reset_handler(struct xe_guc *guc, u32 *msg, u32 len)
 	if (unlikely(!q))
 		return -EPROTO;
 
-	drm_info(&xe->drm, "Engine reset: guc_id=%d", guc_id);
+	xe_gt_info(gt, "Engine reset: engine_class=%s, logical_mask: 0x%x, guc_id=%d",
+		   xe_hw_engine_class_to_str(q->class), q->logical_mask, guc_id);
 
 	/* FIXME: Do error capture, most likely async */
 
@@ -1716,6 +1718,7 @@ int xe_guc_exec_queue_reset_handler(struct xe_guc *guc, u32 *msg, u32 len)
 int xe_guc_exec_queue_memory_cat_error_handler(struct xe_guc *guc, u32 *msg,
 					       u32 len)
 {
+	struct xe_gt *gt = guc_to_gt(guc);
 	struct xe_device *xe = guc_to_xe(guc);
 	struct xe_exec_queue *q;
 	u32 guc_id = msg[0];
@@ -1729,7 +1732,9 @@ int xe_guc_exec_queue_memory_cat_error_handler(struct xe_guc *guc, u32 *msg,
 	if (unlikely(!q))
 		return -EPROTO;
 
-	drm_dbg(&xe->drm, "Engine memory cat error: guc_id=%d", guc_id);
+	xe_gt_dbg(gt, "Engine memory cat error: engine_class=%s, logical_mask: 0x%x, guc_id=%d",
+		  xe_hw_engine_class_to_str(q->class), q->logical_mask, guc_id);
+
 	trace_xe_exec_queue_memory_cat_error(q);
 
 	/* Treat the same as engine reset */
Signature · 1 line
2.42.0
Applied
#5 lore raw
Quoted 10 lines · Matthew Brost
Quoted 7 lines · Nirmoy Das

Add engine name to the engine reset and cat error log which should be useful while debugging.

v2: Add logical mask and engine class(Matt)
Use xe_gt_{info|dbg} (Michal)

Cc Matthew Brost <[email protected]>

Sending to correct version:

Merged to drm-xe-next.

Thanks,

Nirmoy

Quoted 51 lines
Quoted 51 lines
Cc Michal Wajdeczko <[email protected]>
---
  drivers/gpu/drm/xe/xe_guc_submit.c | 9 +++++++--
  1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/xe/xe_guc_submit.c +7 -2
index 72aa2f91832c..e22bd6b09a74 100644
@@ -1681,6 +1681,7 @@ int xe_guc_deregister_done_handler(struct xe_guc *guc, u32 *msg, u32 len)
 
  int xe_guc_exec_queue_reset_handler(struct xe_guc *guc, u32 *msg, u32 len)
  {
+	struct xe_gt *gt = guc_to_gt(guc);
  	struct xe_device *xe = guc_to_xe(guc);
  	struct xe_exec_queue *q;
  	u32 guc_id = msg[0];
@@ -1694,7 +1695,8 @@ int xe_guc_exec_queue_reset_handler(struct xe_guc *guc, u32 *msg, u32 len)
  	if (unlikely(!q))
  		return -EPROTO;
 
-	drm_info(&xe->drm, "Engine reset: guc_id=%d", guc_id);
+	xe_gt_info(gt, "Engine reset: engine_class=%s, logical_mask: 0x%x, guc_id=%d",
+		   xe_hw_engine_class_to_str(q->class), q->logical_mask, guc_id);
 
  	/* FIXME: Do error capture, most likely async */
 
@@ -1716,6 +1718,7 @@ int xe_guc_exec_queue_reset_handler(struct xe_guc *guc, u32 *msg, u32 len)
  int xe_guc_exec_queue_memory_cat_error_handler(struct xe_guc *guc, u32 *msg,
  					       u32 len)
  {
+	struct xe_gt *gt = guc_to_gt(guc);
  	struct xe_device *xe = guc_to_xe(guc);
  	struct xe_exec_queue *q;
  	u32 guc_id = msg[0];
@@ -1729,7 +1732,9 @@ int xe_guc_exec_queue_memory_cat_error_handler(struct xe_guc *guc, u32 *msg,
  	if (unlikely(!q))
  		return -EPROTO;
 
-	drm_dbg(&xe->drm, "Engine memory cat error: guc_id=%d", guc_id);
+	xe_gt_dbg(gt, "Engine memory cat error: engine_class=%s, logical_mask: 0x%x, guc_id=%d",
+		  xe_hw_engine_class_to_str(q->class), q->logical_mask, guc_id);
+
  	trace_xe_exec_queue_memory_cat_error(q);
 
  	/* Treat the same as engine reset */
Signature · 1 line
2.42.0
#6 lore raw

✗ CI.Patch_applied: failure for drm/xe: Add engine name to the engine reset and cat-err log (rev3)

In reply to Nirmoy Das
== Series Details ==

== Series Details ==

Series: drm/xe: Add engine name to the engine reset and cat-err log (rev3)
URL : https://patchwork.freedesktop.org/series/132907/
State : failure

== Summary ==

=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: 1b67381f9fbf drm-tip: 2024y-05m-29d-08h-59m-25s UTC integration manifest === git am output follows ===
error: patch failed: drivers/gpu/drm/xe/xe_guc_submit.c:1681
error: drivers/gpu/drm/xe/xe_guc_submit.c: patch does not apply
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Applying: drm/xe: Add engine name to the engine reset and cat-err log Patch failed at 0001 drm/xe: Add engine name to the engine reset and cat-err log When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".