]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/vf: Rename sriov_update_device_info
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Sun, 28 Sep 2025 17:48:10 +0000 (19:48 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 29 Sep 2025 19:42:28 +0000 (21:42 +0200)
This is a VF only function and its name should reflect that to
avoid any confusion. Move the VF check to the caller side.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://lore.kernel.org/r/20250928174811.198933-2-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_device.c

index 09f8a66c97282dd61eef58dbf2069133e9634ccb..0421042597a27851a54921acb4ba0388945b303f 100644 (file)
@@ -688,16 +688,15 @@ static int wait_for_lmem_ready(struct xe_device *xe)
 }
 ALLOW_ERROR_INJECTION(wait_for_lmem_ready, ERRNO); /* See xe_pci_probe() */
 
-static void sriov_update_device_info(struct xe_device *xe)
+static void vf_update_device_info(struct xe_device *xe)
 {
+       xe_assert(xe, IS_SRIOV_VF(xe));
        /* disable features that are not available/applicable to VFs */
-       if (IS_SRIOV_VF(xe)) {
-               xe->info.probe_display = 0;
-               xe->info.has_heci_cscfi = 0;
-               xe->info.has_heci_gscfi = 0;
-               xe->info.skip_guc_pc = 1;
-               xe->info.skip_pcode = 1;
-       }
+       xe->info.probe_display = 0;
+       xe->info.has_heci_cscfi = 0;
+       xe->info.has_heci_gscfi = 0;
+       xe->info.skip_guc_pc = 1;
+       xe->info.skip_pcode = 1;
 }
 
 static int xe_device_vram_alloc(struct xe_device *xe)
@@ -738,7 +737,8 @@ int xe_device_probe_early(struct xe_device *xe)
 
        xe_sriov_probe_early(xe);
 
-       sriov_update_device_info(xe);
+       if (IS_SRIOV_VF(xe))
+               vf_update_device_info(xe);
 
        err = xe_pcode_probe_early(xe);
        if (err || xe_survivability_mode_is_requested(xe)) {