]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/xe/debugfs: Don't expose dgfx residencies attributes on VF
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 5 Sep 2025 17:36:25 +0000 (19:36 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 9 Sep 2025 15:29:10 +0000 (17:29 +0200)
In addition of checking if we are running on the BATTLEMAGE,
we should also check for not being a VF driver, as VFs can't
access necessary registers, and doing so leads to:

 | .. [drm] GT0: VF is trying to read an inaccessible register 0x35b004+0x0
 | RIP: 0010:xe_gt_sriov_vf_read32+0x5e2/0x8a0 [xe]
 | Call Trace:
 |  xe_mmio_read32+0x110/0x280 [xe]
 |  read_residency_counter+0x42/0xd0 [xe]
 |  dgfx_pkg_residencies_show+0x115/0x190 [xe]
 | .. [drm] Package G2 counter failed to read, ret -19

or

 | .. [drm] GT0: VF is trying to read an inaccessible register 0x35b004+0x0
 | RIP: 0010:xe_gt_sriov_vf_read32+0x5e2/0x8a0 [xe]
 | Call Trace:
 |  xe_mmio_read32+0x110/0x280 [xe]
 |  read_residency_counter+0x42/0xd0 [xe]
 |  dgfx_pcie_link_residencies_show+0xe7/0x160 [xe]
 | .. [drm] PCIE LINK L0 RESIDENCY counter failed to read, ret -19

Similarly, there is no point to expose inject_csc_hw_error on VFs,
as HW errors support is already disabled for VFs.

Bspec: 53221
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Soham Purkait <soham.purkait@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Riana Tauro <riana.tauro@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250905173625.8398-1-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_debugfs.c

index 38169238dbed276a0a57983131cebfbecf7f4dde..d67e32ebbe291c19d25224f7e54e804b755b2667 100644 (file)
@@ -347,7 +347,7 @@ void xe_debugfs_register(struct xe_device *xe)
                                 ARRAY_SIZE(debugfs_list),
                                 root, minor);
 
-       if (xe->info.platform == XE_BATTLEMAGE) {
+       if (xe->info.platform == XE_BATTLEMAGE && !IS_SRIOV_VF(xe)) {
                drm_debugfs_create_files(debugfs_residencies,
                                         ARRAY_SIZE(debugfs_residencies),
                                         root, minor);