mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
drm/xe/vf: Fix guc_info debugfs for VFs
The guc_info debugfs attempts to read a bunch of registers that the VFs doesn't have access to, so fix it by skipping the reads. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4775 Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Lukasz Laguna <lukasz.laguna@intel.com> Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com> Link: https://lore.kernel.org/r/20250423173908.1571412-1-daniele.ceraolospurio@intel.com
This commit is contained in:
@@ -1510,30 +1510,32 @@ void xe_guc_print_info(struct xe_guc *guc, struct drm_printer *p)
|
||||
|
||||
xe_uc_fw_print(&guc->fw, p);
|
||||
|
||||
fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
|
||||
if (!fw_ref)
|
||||
return;
|
||||
if (!IS_SRIOV_VF(gt_to_xe(gt))) {
|
||||
fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
|
||||
if (!fw_ref)
|
||||
return;
|
||||
|
||||
status = xe_mmio_read32(>->mmio, GUC_STATUS);
|
||||
status = xe_mmio_read32(>->mmio, GUC_STATUS);
|
||||
|
||||
drm_printf(p, "\nGuC status 0x%08x:\n", status);
|
||||
drm_printf(p, "\tBootrom status = 0x%x\n",
|
||||
REG_FIELD_GET(GS_BOOTROM_MASK, status));
|
||||
drm_printf(p, "\tuKernel status = 0x%x\n",
|
||||
REG_FIELD_GET(GS_UKERNEL_MASK, status));
|
||||
drm_printf(p, "\tMIA Core status = 0x%x\n",
|
||||
REG_FIELD_GET(GS_MIA_MASK, status));
|
||||
drm_printf(p, "\tLog level = %d\n",
|
||||
xe_guc_log_get_level(&guc->log));
|
||||
drm_printf(p, "\nGuC status 0x%08x:\n", status);
|
||||
drm_printf(p, "\tBootrom status = 0x%x\n",
|
||||
REG_FIELD_GET(GS_BOOTROM_MASK, status));
|
||||
drm_printf(p, "\tuKernel status = 0x%x\n",
|
||||
REG_FIELD_GET(GS_UKERNEL_MASK, status));
|
||||
drm_printf(p, "\tMIA Core status = 0x%x\n",
|
||||
REG_FIELD_GET(GS_MIA_MASK, status));
|
||||
drm_printf(p, "\tLog level = %d\n",
|
||||
xe_guc_log_get_level(&guc->log));
|
||||
|
||||
drm_puts(p, "\nScratch registers:\n");
|
||||
for (i = 0; i < SOFT_SCRATCH_COUNT; i++) {
|
||||
drm_printf(p, "\t%2d: \t0x%x\n",
|
||||
i, xe_mmio_read32(>->mmio, SOFT_SCRATCH(i)));
|
||||
drm_puts(p, "\nScratch registers:\n");
|
||||
for (i = 0; i < SOFT_SCRATCH_COUNT; i++) {
|
||||
drm_printf(p, "\t%2d: \t0x%x\n",
|
||||
i, xe_mmio_read32(>->mmio, SOFT_SCRATCH(i)));
|
||||
}
|
||||
|
||||
xe_force_wake_put(gt_to_fw(gt), fw_ref);
|
||||
}
|
||||
|
||||
xe_force_wake_put(gt_to_fw(gt), fw_ref);
|
||||
|
||||
drm_puts(p, "\n");
|
||||
xe_guc_ct_print(&guc->ct, p, false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user