public inbox for intel-xe@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/pf: Fix VF's scheduling priority reporting
@ 2026-04-16 13:18 Michal Wajdeczko
  2026-04-16 13:24 ` ✗ CI.checkpatch: warning for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Michal Wajdeczko @ 2026-04-16 13:18 UTC (permalink / raw)
  To: intel-xe; +Cc: Michal Wajdeczko

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 <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 e112aa148dab..2c9b85b84b1b 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.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-04-16 21:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-16 13:18 [PATCH] drm/xe/pf: Fix VF's scheduling priority reporting Michal Wajdeczko
2026-04-16 13:24 ` ✗ CI.checkpatch: warning for " Patchwork
2026-04-16 13:26 ` ✓ CI.KUnit: success " Patchwork
2026-04-16 14:32 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-16 15:36 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-04-16 21:24   ` Michal Wajdeczko
2026-04-16 16:06 ` [PATCH] " Piotr Piórkowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox