[PATCH v4 2/6] drm/xe/pf: Resend PF provisioning after GT reset
Piotr Piórkowski
piotr.piorkowski at intel.com
Tue Jul 15 07:02:32 UTC 2025
Michal Wajdeczko <michal.wajdeczko at intel.com> wrote on pią [2025-lip-11 21:33:12 +0200]:
> 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: 411220808cee ("drm/xe/pf: Restart VFs provisioning after GT reset")
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> ---
> drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 27 ++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
> index d0cf1d80be07..e84fd44c6598 100644
> --- a/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c
> @@ -2366,6 +2366,21 @@ int xe_gt_sriov_pf_config_restore(struct xe_gt *gt, unsigned int vfid,
> return err;
> }
>
> +static int pf_push_self_config(struct xe_gt *gt)
> +{
> + int err;
> +
> + err = pf_push_full_vf_config(gt, PFID);
> + if (err) {
> + xe_gt_sriov_err(gt, "Failed to push self configuration (%pe)\n",
> + ERR_PTR(err));
> + return err;
> + }
> +
> + xe_gt_sriov_dbg_verbose(gt, "self configuration completed\n");
> + return 0;
> +}
> +
> static void fini_config(void *arg)
> {
> struct xe_gt *gt = arg;
> @@ -2389,9 +2404,17 @@ static void fini_config(void *arg)
> int xe_gt_sriov_pf_config_init(struct xe_gt *gt)
> {
> struct xe_device *xe = gt_to_xe(gt);
> + int err;
>
> xe_gt_assert(gt, IS_SRIOV_PF(xe));
>
> + mutex_lock(xe_gt_sriov_pf_master_mutex(gt));
> + err = pf_push_self_config(gt);
> + mutex_unlock(xe_gt_sriov_pf_master_mutex(gt));
> +
> + if (err)
> + return err;
> +
> return devm_add_action_or_reset(xe->drm.dev, fini_config, gt);
> }
>
> @@ -2409,6 +2432,10 @@ void xe_gt_sriov_pf_config_restart(struct xe_gt *gt)
> unsigned int n, total_vfs = xe_sriov_pf_get_totalvfs(gt_to_xe(gt));
> unsigned int fail = 0, skip = 0;
>
> + mutex_lock(xe_gt_sriov_pf_master_mutex(gt));
> + pf_push_self_config(gt);
> + mutex_unlock(xe_gt_sriov_pf_master_mutex(gt));
> +
> for (n = 1; n <= total_vfs; n++) {
> if (xe_gt_sriov_pf_config_is_empty(gt, n))
> skip++;
LGTM:
Reviewed-by: Piotr Piórkowski <piotr.piorkowski at intel.com>
> --
> 2.47.1
>
--
More information about the Intel-xe
mailing list