]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/pf: Print applied policy KLVs
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 2 Apr 2026 19:17:17 +0000 (21:17 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Sun, 12 Apr 2026 08:32:47 +0000 (10:32 +0200)
Under CONFIG_DRM_XE_DEBUG_SRIOV print all policy KLVs sent to the
GuC for better diagnostics.  This is similar what we are already
doing with VF configuration KLVs.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://patch.msgid.link/20260402191726.4932-5-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_gt_sriov_pf_policy.c

index 6ab02e96e46cbe118f7b124ecc2c34292777d445..c88c4e6a9b61a091686eca3ecb64f6077c1e9531 100644 (file)
@@ -68,6 +68,15 @@ static int pf_push_policy_buf_klvs(struct xe_gt *gt, u32 num_klvs,
                return err;
        }
 
+       if (IS_ENABLED(CONFIG_DRM_XE_DEBUG_SRIOV)) {
+               struct drm_printer p = xe_gt_dbg_printer(gt);
+               void *klvs = xe_guc_buf_cpu_ptr(buf);
+
+               xe_gt_sriov_dbg(gt, "pushed policy update with %u KLV%s:\n",
+                               num_klvs, str_plural(num_klvs));
+               xe_guc_klv_print(klvs, num_dwords, &p);
+       }
+
        return 0;
 }