[PATCH i-g-t v4 2/2] tests/intel/xe_pm: Add a check for power management capability

Kamil Konieczny kamil.konieczny at linux.intel.com
Mon Mar 24 18:17:10 UTC 2025


Hi Poosa,,
On 2025-03-19 at 20:29:29 +0530, Poosa, Karthik wrote:
> 
> On 19-03-2025 13:44, Bernatowicz, Marcin wrote:
> > 
> > 
> > On 3/19/2025 9:05 AM, Poosa, Karthik wrote:
> > > 
> > > On 18-03-2025 20:31, Jakub Kolakowski wrote:
> > > > Add a check for power management capability of device tested in tests
> > > > related to D3 states. Currently if test is started on configuration
> > > > that does not support the PM capability it doesn't skip, instead
> > > > depending on test it may fail, abort or timeout.
> > > > With this change test will skip with a clear message why it did.
> > > > 
> > > > Cc: Adam Miszczak<adam.miszczak at linux.intel.com>
> > > > Cc: Lukasz Laguna<lukasz.laguna at intel.com>
> > > > Cc: Marcin Bernatowicz<marcin.bernatowicz at linux.intel.com>
> > > > Signed-off-by: Jakub Kolakowski<jakub1.kolakowski at intel.com>

Applied with a comment added in first commit:
For SR-IOV VFs (Virtual Functions) the Power Management Capability
is optional.

Thank you for a fix.

Regards,
Kamil

> > > > ---
> > > >   tests/intel/xe_pm.c | 3 +++
> > > >   1 file changed, 3 insertions(+)
> > > > 
> > > > diff --git a/tests/intel/xe_pm.c b/tests/intel/xe_pm.c
> > > > index c2026474d..70f0613fb 100644
> > > > --- a/tests/intel/xe_pm.c
> > > > +++ b/tests/intel/xe_pm.c
> > > > @@ -146,6 +146,9 @@ static void vram_d3cold_threshold_restore(int sig)
> > > >   static bool setup_d3(device_t device, enum igt_acpi_d_state state)
> > > >   {
> > > > +    igt_require_f(igt_has_pci_pm_capability(device.pci_xe),
> > > > +              "PCI power management capability not found\n");
> > > 
> > > Hi Jakub,
> > > 
> > > As per PCIe Base spec, all PCI Express Functions are required to
> > > support PCI Power Management Capability.
> > > 
> > > Only legacy PCI devices wouldn't have it.
> > > 
> > > Can you share details of failures without this capability.
> > > 
> > > All Xe supported GPUs are PCIe complaint, this check may not be
> > > needed at all.
> > 
> > This happens for runs with Virtual Function (VF) passed to Virtual
> > Machine (VM).
> > 
> > "9.6 SR-IOV Power Management
> > This section defines the PCI Express SR-IOV power management
> > capabilities and protocols.
> > The Power Management Capability is required for PFs as described in
> > Chapter 5 .
> > For VFs, the Power Management Capability is optional."
> > 
> > -- 
> > marcin
> Okay, LGTM then.
> Reviewed-by: Karthik Poosa <karthik.poosa at intel.com>
> > > 
> > > > +
> > > >       dpms_on_off(device, DRM_MODE_DPMS_OFF);
> > > >       /*
> > 


More information about the igt-dev mailing list