Skip to content

Commit

Permalink
drm/xe/vf: Custom GT restart
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Michal Wajdeczko committed Jun 6, 2024
1 parent 5bfae67 commit df433a3
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions drivers/gpu/drm/xe/xe_gt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit df433a3

Please sign in to comment.