From 0479934ec74f8f4e03ee654eb2e19074297e069f Mon Sep 17 00:00:00 2001 From: Michal Wajdeczko Date: Thu, 16 Apr 2026 15:18:31 +0200 Subject: [PATCH] drm/xe/pf: Fix VF's scheduling priority reporting MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When preparing number of impacted VFs parameter for the reporting helper function, we wrongly ended with adding +1 (representing PF) twice, since local variable total_vfs was already adjusted. This resulted in printing a message that was referring to an invalid VF: [] xe ... [drm] PF: Enabled 2 of 24 VFs [] xe ... [drm] PF: Tile0: GT0: PF..VF25 provisioned with 0(low) scheduling priority Fix variable initialization and adjust the loop accordingly. Fixes: fbbf73a81b84 ("drm/xe/pf: Force new VFs prorities only once") Signed-off-by: Michal Wajdeczko Reviewed-by: Piotr Piórkowski Link: https://patch.msgid.link/20260416131831.7302-1-michal.wajdeczko@intel.com --- drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c index e112aa148dab3..2c9b85b84b1be 100644 --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c @@ -2626,14 +2626,14 @@ u32 xe_gt_sriov_pf_config_get_sched_priority(struct xe_gt *gt, unsigned int vfid */ void xe_gt_sriov_pf_config_force_sched_priority_locked(struct xe_gt *gt, u32 priority) { - unsigned int total_vfs = 1 + xe_gt_sriov_pf_get_totalvfs(gt); + unsigned int total_vfs = xe_gt_sriov_pf_get_totalvfs(gt); struct xe_gt_sriov_config *config; unsigned int n; xe_gt_assert(gt, IS_SRIOV_PF(gt_to_xe(gt))); lockdep_assert_held(xe_gt_sriov_pf_master_mutex(gt)); - for (n = 0; n < total_vfs; n++) { + for (n = 0; n <= total_vfs; n++) { config = pf_pick_vf_config(gt, VFID(n)); config->sched_priority = priority; } -- 2.47.3