Skip to content

Commit 5c244ee

Browse files
mwajdeczlucasdemarchi
authored andcommitted
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] (cherry picked from commit 1c38dd6) Signed-off-by: Lucas De Marchi <[email protected]>
1 parent 81dccec commit 5c244ee

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
@@ -2364,6 +2364,21 @@ int xe_gt_sriov_pf_config_restore(struct xe_gt *gt, unsigned int vfid,
23642364
return err;
23652365
}
23662366

2367+
static int pf_push_self_config(struct xe_gt *gt)
2368+
{
2369+
int err;
2370+
2371+
err = pf_push_full_vf_config(gt, PFID);
2372+
if (err) {
2373+
xe_gt_sriov_err(gt, "Failed to push self configuration (%pe)\n",
2374+
ERR_PTR(err));
2375+
return err;
2376+
}
2377+
2378+
xe_gt_sriov_dbg_verbose(gt, "self configuration completed\n");
2379+
return 0;
2380+
}
2381+
23672382
static void fini_config(void *arg)
23682383
{
23692384
struct xe_gt *gt = arg;
@@ -2387,9 +2402,17 @@ static void fini_config(void *arg)
23872402
int xe_gt_sriov_pf_config_init(struct xe_gt *gt)
23882403
{
23892404
struct xe_device *xe = gt_to_xe(gt);
2405+
int err;
23902406

23912407
xe_gt_assert(gt, IS_SRIOV_PF(xe));
23922408

2409+
mutex_lock(xe_gt_sriov_pf_master_mutex(gt));
2410+
err = pf_push_self_config(gt);
2411+
mutex_unlock(xe_gt_sriov_pf_master_mutex(gt));
2412+
2413+
if (err)
2414+
return err;
2415+
23932416
return devm_add_action_or_reset(xe->drm.dev, fini_config, gt);
23942417
}
23952418

@@ -2407,6 +2430,10 @@ void xe_gt_sriov_pf_config_restart(struct xe_gt *gt)
24072430
unsigned int n, total_vfs = xe_sriov_pf_get_totalvfs(gt_to_xe(gt));
24082431
unsigned int fail = 0, skip = 0;
24092432

2433+
mutex_lock(xe_gt_sriov_pf_master_mutex(gt));
2434+
pf_push_self_config(gt);
2435+
mutex_unlock(xe_gt_sriov_pf_master_mutex(gt));
2436+
24102437
for (n = 1; n <= total_vfs; n++) {
24112438
if (xe_gt_sriov_pf_config_is_empty(gt, n))
24122439
skip++;

0 commit comments

Comments
 (0)