From: Matthew Brost <matthew.brost@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: "Satyanarayana K V P" <satyanarayana.k.v.p@intel.com>,
intel-xe@lists.freedesktop.org,
"Michal Wajdeczko" <michal.wajdeczko@intel.com>,
"Michał Winiarski" <michal.winiarski@intel.com>,
"Anshuman Gupta" <anshuman.gupta@intel.com>,
"Maarten Lankhorst" <dev@lankhorst.se>
Subject: Re: [PATCH v6] drm/xe/pm: Disable RPM for SR-IOV VFs
Date: Sun, 17 Aug 2025 19:13:02 -0700 [thread overview]
Message-ID: <aKKMLn7becx6s4Gh@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <aKIGF3wKoK3U6bVu@intel.com>
On Sun, Aug 17, 2025 at 12:40:55PM -0400, Rodrigo Vivi wrote:
> On Tue, Aug 12, 2025 at 10:06:13PM +0530, Satyanarayana K V P wrote:
> > VFs without native PCIe Power Management (PM) capabilities inherit their
> > PF's power state as per PCIe specifications(§5.10.1 PCIe Base Spec 7.0).
> > Enabling Runtime Power Management (RPM) for these VFs trigger unnecessary
> > driver suspend/resume operations that ultimately perform no PCI-level power
> > transition.
> >
> > Since VFs without PM capabilities cannot independently enter low-power
> > states, the existing RPM workflow becomes redundant:
> > 1. Driver executes full suspend/resume sequence
> > 2. PCI PM transition step becomes no-op
> > 3. VF power state remains tied to PF's status
> >
> > Disabling RPM for VFs eliminates this redundant processing while
> > maintaining proper power management through PF dependency. This
> > optimization ensures VFs follow their PF's power state without superfluous
> > runtime handling.
> >
> > Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
> > Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > Cc: Matthew Brost <matthew.brost@intel.com>
> > Cc: Michał Winiarski <michal.winiarski@intel.com>
> > Cc: Anshuman Gupta <anshuman.gupta@intel.com>
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Cc: Maarten Lankhorst <dev@lankhorst.se>
>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> and pushing
>
This might need a little more thought(?). What are the full consequences
of this patch? For example, will xe_pm_suspend()/xe_pm_resume() never be
called on a VF? I think that’s correct and desirable, but consider code
paths like:
if (xe_pm_runtime_get_if_active())
/* Take action assuming GPU state is valid */
else
/* Take action assuming GPU state has been lost */
On a VF, this is now broken, since we don’t lose GPU state—unless I’m
missing something, or xe_pm_runtime_get_if_active() always returns true
on a VF which in that case we should be good.
Matt
> >
> > ---
> > V5 -> V6:
> > - Updated comment (Rodrigo).
> >
> > V4 -> V5:
> > - Disable RPM for VFs without checking pm_cap (Rodrigo).
> > - Updated commit title.
> >
> > V3 -> V4:
> > - Fixed review comments (Rodrigo & Maarten)
> >
> > V2 -> V3:
> > - Fixed review comments (Michal Wajdeczko).
> >
> > V1 -> V2:
> > - Disable RPM only for VF devices when PM cap is not implemented.
> > ---
> > drivers/gpu/drm/xe/xe_pm.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
> > index 5e8126ca8e27..51934d5dc44f 100644
> > --- a/drivers/gpu/drm/xe/xe_pm.c
> > +++ b/drivers/gpu/drm/xe/xe_pm.c
> > @@ -247,6 +247,10 @@ static void xe_pm_runtime_init(struct xe_device *xe)
> > {
> > struct device *dev = xe->drm.dev;
> >
> > + /* Our current VFs do not support RPM. so, disable it */
> > + if (IS_SRIOV_VF(xe))
> > + return;
> > +
> > /*
> > * Disable the system suspend direct complete optimization.
> > * We need to ensure that the regular device suspend/resume functions
> > @@ -367,6 +371,10 @@ static void xe_pm_runtime_fini(struct xe_device *xe)
> > {
> > struct device *dev = xe->drm.dev;
> >
> > + /* Our current VFs do not support RPM. so, disable it */
> > + if (IS_SRIOV_VF(xe))
> > + return;
> > +
> > pm_runtime_get_sync(dev);
> > pm_runtime_forbid(dev);
> > }
> > --
> > 2.43.0
> >
next prev parent reply other threads:[~2025-08-18 2:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-12 16:36 [PATCH v6] drm/xe/pm: Disable RPM for SR-IOV VFs Satyanarayana K V P
2025-08-12 16:26 ` ✓ CI.KUnit: success for drm/xe/pm: Disable RPM for SR-IOV VFs (rev2) Patchwork
2025-08-12 17:28 ` ✓ Xe.CI.BAT: " Patchwork
2025-08-12 20:07 ` ✗ Xe.CI.Full: failure " Patchwork
2025-08-17 16:40 ` [PATCH v6] drm/xe/pm: Disable RPM for SR-IOV VFs Rodrigo Vivi
2025-08-18 2:13 ` Matthew Brost [this message]
2025-08-18 10:13 ` Matthew Auld
2025-08-18 16:06 ` Matthew Brost
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=aKKMLn7becx6s4Gh@lstrano-desk.jf.intel.com \
--to=matthew.brost@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=dev@lankhorst.se \
--cc=intel-xe@lists.freedesktop.org \
--cc=michal.wajdeczko@intel.com \
--cc=michal.winiarski@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=satyanarayana.k.v.p@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.