Skip to content

Commit 1c38dd6

Browse files
committed
drm/xe/pf: Resend PF provisioning after GT reset
If we reload the GuC due to suspend/resume or GT reset then we have to resend not only any VFs provisioning data, but also PF configuration, like scheduling parameters (EQ, PT), as otherwise GuC will continue to use default values. Fixes: 4112208 ("drm/xe/pf: Restart VFs provisioning after GT reset") Signed-off-by: Michal Wajdeczko <[email protected]> Reviewed-by: Piotr Piórkowski <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 9f50b72 commit 1c38dd6

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2366,6 +2366,21 @@ int xe_gt_sriov_pf_config_restore(struct xe_gt *gt, unsigned int vfid,
23662366
return err;
23672367
}
23682368

2369+
static int pf_push_self_config(struct xe_gt *gt)
2370+
{
2371+
int err;
2372+
2373+
err = pf_push_full_vf_config(gt, PFID);
2374+
if (err) {
2375+
xe_gt_sriov_err(gt, "Failed to push self configuration (%pe)\n",
2376+
ERR_PTR(err));
2377+
return err;
2378+
}
2379+
2380+
xe_gt_sriov_dbg_verbose(gt, "self configuration completed\n");
2381+
return 0;
2382+
}
2383+
23692384
static void fini_config(void *arg)
23702385
{
23712386
struct xe_gt *gt = arg;
@@ -2389,9 +2404,17 @@ static void fini_config(void *arg)
23892404
int xe_gt_sriov_pf_config_init(struct xe_gt *gt)
23902405
{
23912406
struct xe_device *xe = gt_to_xe(gt);
2407+
int err;
23922408

23932409
xe_gt_assert(gt, IS_SRIOV_PF(xe));
23942410

2411+
mutex_lock(xe_gt_sriov_pf_master_mutex(gt));
2412+
err = pf_push_self_config(gt);
2413+
mutex_unlock(xe_gt_sriov_pf_master_mutex(gt));
2414+
2415+
if (err)
2416+
return err;
2417+
23952418
return devm_add_action_or_reset(xe->drm.dev, fini_config, gt);
23962419
}
23972420

@@ -2409,6 +2432,10 @@ void xe_gt_sriov_pf_config_restart(struct xe_gt *gt)
24092432
unsigned int n, total_vfs = xe_sriov_pf_get_totalvfs(gt_to_xe(gt));
24102433
unsigned int fail = 0, skip = 0;
24112434

2435+
mutex_lock(xe_gt_sriov_pf_master_mutex(gt));
2436+
pf_push_self_config(gt);
2437+
mutex_unlock(xe_gt_sriov_pf_master_mutex(gt));
2438+
24122439
for (n = 1; n <= total_vfs; n++) {
24132440
if (xe_gt_sriov_pf_config_is_empty(gt, n))
24142441
skip++;

0 commit comments

Comments
 (0)