Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Bernatowicz, Marcin" <marcin.bernatowicz@linux.intel.com>
To: "Piórkowski, Piotr" <piotr.piorkowski@intel.com>,
	intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v1 4/4] drm/xe/pf: Extract helper to reset VFs provisioning
Date: Wed, 2 Dec 2026 18:10:58 +0100	[thread overview]
Message-ID: <b1bd5718-153e-4907-92fa-f1633825dfe1@linux.intel.com> (raw)
In-Reply-To: <20261201162219.22723-5-piotr.piorkowski@intel.com>


On 12/1/2026 5:22 PM, Piórkowski, Piotr wrote:
> From: Piotr Piórkowski <piotr.piorkowski@intel.com>
>
> Move the code that releases the VFs provisioning and restores the PF
> default configuration, done when changing to the auto mode, into a
> separate helper, as we will need it also to start VFs provisioning
> using the VGPU profile from the same clean state.
>
> Signed-off-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_sriov_pf_provision.c | 24 ++++++++++++++--------
>   1 file changed, 15 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_sriov_pf_provision.c b/drivers/gpu/drm/xe/xe_sriov_pf_provision.c
> index 598fd77c230f6..0ad1b51142f6b 100644
> --- a/drivers/gpu/drm/xe/xe_sriov_pf_provision.c
> +++ b/drivers/gpu/drm/xe/xe_sriov_pf_provision.c
> @@ -154,6 +154,20 @@ int xe_sriov_pf_reprovision_default(struct xe_device *xe)
>   	return pf_reprovision_default(xe);
>   }
>   
> +static int pf_reset_provisioning(struct xe_device *xe)
> +{
> +	lockdep_assert_held(xe_sriov_pf_master_mutex(xe));
> +
> +	if (xe_sriov_pf_num_vfs(xe)) {
> +		xe_sriov_dbg(xe, "can't reset provisioning: VFs must be disabled!\n");
> +		return -EBUSY;
> +	}
> +	pf_unprovision_all_vfs(xe);
> +
> +	/* custom PF EQ/PT/sched_if_idle would block fair VF scheduling */
> +	return pf_reprovision_default(xe);
> +}
> +
>   static int pf_change_mode(struct xe_device *xe, enum xe_sriov_provisioning_mode mode, void *who)
>   {
>   	lockdep_assert_held(xe_sriov_pf_master_mutex(xe));
> @@ -164,15 +178,7 @@ static int pf_change_mode(struct xe_device *xe, enum xe_sriov_provisioning_mode
>   	if (mode == XE_SRIOV_PROVISIONING_MODE_AUTO) {
>   		int err;
>   
> -		if (xe_sriov_pf_num_vfs(xe)) {
> -			xe_sriov_dbg(xe, "can't restore %s: VFs must be disabled!\n",
> -				     mode_to_string(mode));
> -			return -EBUSY;
> -		}
> -		pf_unprovision_all_vfs(xe);
> -
> -		/* custom PF EQ/PT/sched_if_idle would block fair VF scheduling */
> -		err = pf_reprovision_default(xe);
> +		err = pf_reset_provisioning(xe);
>   		if (err)
>   			return err;

LGTM,

Reviewed-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>

>   	}

  reply	other threads:[~2026-12-02 17:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 16:22 [PATCH v1 0/4] Add helpers for VGPU profiles provisioning Piórkowski, Piotr
2026-12-01 16:22 ` [PATCH v1 1/4] drm/xe/pf: Share SR-IOV config unit helpers Piórkowski, Piotr
2026-12-02 17:10   ` Bernatowicz, Marcin
2026-12-01 16:22 ` [PATCH v1 2/4] drm/xe/pf: Allow to configure execution quantum for range of VFs Piórkowski, Piotr
2026-12-01 16:22 ` [PATCH v1 3/4] drm/xe/pf: Allow to configure preemption timeout " Piórkowski, Piotr
2026-12-01 16:22 ` [PATCH v1 4/4] drm/xe/pf: Extract helper to reset VFs provisioning Piórkowski, Piotr
2026-12-02 17:10   ` Bernatowicz, Marcin [this message]
2026-12-01 16:50 ` ✓ CI.KUnit: success for Add helpers for VGPU profiles provisioning Patchwork
2026-12-01 17:28 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-12-02 10:59 ` ✓ Xe.CI.FULL: success " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b1bd5718-153e-4907-92fa-f1633825dfe1@linux.intel.com \
    --to=marcin.bernatowicz@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=piotr.piorkowski@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox