[PATCH i-g-t v2 2/2] tests/intel/xe_pm: Add a check for power management capability
Bernatowicz, Marcin
marcin.bernatowicz at linux.intel.com
Mon Mar 17 09:17:52 UTC 2025
On 3/14/2025 12:27 PM, 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>
> ---
> tests/intel/xe_pm.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tests/intel/xe_pm.c b/tests/intel/xe_pm.c
> index c2026474d..53792e1c6 100644
> --- a/tests/intel/xe_pm.c
> +++ b/tests/intel/xe_pm.c
> @@ -146,6 +146,10 @@ static void vram_d3cold_threshold_restore(int sig)
>
> static bool setup_d3(device_t device, enum igt_acpi_d_state state)
> {
> +
trailing whitespace
> + igt_require_f(igt_has_pci_pm_capability(device.pci_root),
> + "PCI power management capability not found\n");
Alignment should match open parenthesis
please run checkpatch
> +
> dpms_on_off(device, DRM_MODE_DPMS_OFF);
>
> /*
More information about the igt-dev
mailing list