summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_gt.c
diff options
context:
space:
mode:
authorMichal Wajdeczko <michal.wajdeczko@intel.com>2024-06-04 23:22:31 +0200
committerMichal Wajdeczko <michal.wajdeczko@intel.com>2024-06-06 16:02:46 +0200
commitdf433a3fac078c79dc4efab81015dec012322668 (patch)
treec62997050de6eee503b18bcd74b92837c33d7fd5 /drivers/gpu/drm/xe/xe_gt.c
parent5bfae679d39966fb12c8e390a80e7ecf05693dfe (diff)
downloadlwn-df433a3fac078c79dc4efab81015dec012322668.tar.gz
lwn-df433a3fac078c79dc4efab81015dec012322668.zip
drm/xe/vf: Custom GT restart
Only few steps from the GT restart phase are applicable for the VF drivers, as initialization of PAT, WOPCM, MOCS or CCS mode can be done only by the native or PF drivers. Use custom GT restart function if running in VF mode. 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-5-michal.wajdeczko@intel.com
Diffstat (limited to 'drivers/gpu/drm/xe/xe_gt.c')
-rw-r--r--drivers/gpu/drm/xe/xe_gt.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
index 4e11662b78bd..57d84751e160 100644
--- a/drivers/gpu/drm/xe/xe_gt.c
+++ b/drivers/gpu/drm/xe/xe_gt.c
@@ -611,12 +611,34 @@ static int do_gt_reset(struct xe_gt *gt)
return err;
}
+static int vf_gt_restart(struct xe_gt *gt)
+{
+ int err;
+
+ err = xe_uc_sanitize_reset(&gt->uc);
+ if (err)
+ return err;
+
+ err = xe_uc_init_hw(&gt->uc);
+ if (err)
+ return err;
+
+ err = xe_uc_start(&gt->uc);
+ if (err)
+ return err;
+
+ return 0;
+}
+
static int do_gt_restart(struct xe_gt *gt)
{
struct xe_hw_engine *hwe;
enum xe_hw_engine_id id;
int err;
+ if (IS_SRIOV_VF(gt_to_xe(gt)))
+ return vf_gt_restart(gt);
+
xe_pat_init(gt);
xe_gt_mcr_set_implicit_defaults(gt);