[PATCH i-g-t v2 0/2] Add a check for power management PCI capability

Jakub Kolakowski jakub1.kolakowski at intel.com
Fri Mar 14 11:27:30 UTC 2025


This patch series is introducing a helper for checking the presence of
power management PCI capability and it utilizes this new helper in
xe_pm tests that are related to D-states.

Introduce igt_has_pci_pm_capability(), a helper function to check
whether a PCI device supports the PCI Power Management (PM) capability.
With this helper one can make sure the capability is present on device
under test before proceeding with any actions related to PM.

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.

v2:
- moved check for PCI PM capability to setup_d3() to avoid duplication
- edited commit messages of both patches
- changed description of helper function to indicate it is PCI capability
- changed name of helper function to igt_has_pci_pm_capability()
- shortened body of new helper without changing its functionality

Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
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>

Jakub Kolakowski (2):
  lib/igt_pm: Introduce helper to check for PM capability
  tests/intel/xe_pm: Add a check for power management capability

 lib/igt_pm.c        | 18 ++++++++++++++++++
 lib/igt_pm.h        |  1 +
 tests/intel/xe_pm.c |  4 ++++
 3 files changed, 23 insertions(+)

-- 
2.34.1



More information about the igt-dev mailing list