drm/xe: Use GT oriented message to report engine activity error
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 14 Apr 2025 20:23:47 +0000 (22:23 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 17 Apr 2025 19:57:51 +0000 (21:57 +0200)
We are enabling/disabling engine activity on per-GT basis, so any
errors should be also reported per GT, like:

 [ ] xe 0000:00:02.0: [drm] GT0: PF: Failed to enable engine activity function stats (-ENOSPC)
 [ ] xe 0000:00:02.0: [drm] GT1: PF: Failed to enable engine activity function stats (-ENOSPC)

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Cc: Riana Tauro <riana.tauro@intel.com>
Reviewed-by: Riana Tauro <riana.tauro@intel.com>
Link: https://lore.kernel.org/r/20250414202347.1909-2-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_pci_sriov.c

index d69b6b2a30615f3a9b16b45c912259126d09bf49..8813efdcafbb19cfad3782d0dd662d272b09d30d 100644 (file)
@@ -7,6 +7,7 @@
 #include "xe_device.h"
 #include "xe_gt_sriov_pf_config.h"
 #include "xe_gt_sriov_pf_control.h"
+#include "xe_gt_sriov_printk.h"
 #include "xe_guc_engine_activity.h"
 #include "xe_pci_sriov.h"
 #include "xe_pm.h"
@@ -121,8 +122,8 @@ static void pf_engine_activity_stats(struct xe_device *xe, unsigned int num_vfs,
        for_each_gt(gt, xe, id) {
                ret = xe_guc_engine_activity_function_stats(&gt->uc.guc, num_vfs, enable);
                if (ret)
-                       xe_sriov_info(xe, "Failed to %s engine activity function stats (%pe)\n",
-                                     str_enable_disable(enable), ERR_PTR(ret));
+                       xe_gt_sriov_info(gt, "Failed to %s engine activity function stats (%pe)\n",
+                                        str_enable_disable(enable), ERR_PTR(ret));
        }
 }