]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/xe/vf: Custom GuC reset
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 4 Jun 2024 21:22:30 +0000 (23:22 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 6 Jun 2024 14:02:05 +0000 (16:02 +0200)
The VF drivers can't trigger real GuC firmware reset using GDRST
register, but for the VF drivers it is sufficient to send VF_RESET
message to reset any VF specific state maintained by the GuC.
Use our existing VF bootstrap function as VF_RESET is part of it.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240604212231.1416-4-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_guc.c

index 086a048876baa86d9947d736aaae698436881096..0bf6e01b891001ecad148e7491e4c0ba1ef033d3 100644 (file)
@@ -430,6 +430,9 @@ int xe_guc_reset(struct xe_guc *guc)
 
        xe_force_wake_assert_held(gt_to_fw(gt), XE_FW_GT);
 
+       if (IS_SRIOV_VF(gt_to_xe(gt)))
+               return xe_gt_sriov_vf_bootstrap(gt);
+
        xe_mmio_write32(gt, GDRST, GRDOM_GUC);
 
        ret = xe_mmio_wait32(gt, GDRST, GRDOM_GUC, 0, 5000, &gdrst, false);