Top |
enum | igt_runtime_pm_status |
enum | igt_acpi_d_state |
struct | igt_pm_pci_dev_pwrattr |
struct | igt_device_card |
This library provides various helpers to enable power management for, and in some cases subsequently allow restoring the old behaviour of, various external components that by default are set up in a way that interferes with the testing of our power management functionality.
void
igt_pm_enable_audio_runtime_pm (void
);
We know that if we don't enable audio runtime PM, snd_hda_intel will never release its power well refcount, and we'll never reach the LPSP state. There's no guarantee that it will release the power well if we enable runtime PM, but at least we can try.
We don't have any assertions on open since the user may not even have snd_hda_intel loaded, which is not a problem.
void
igt_pm_enable_sata_link_power_management
(void
);
Enable the min_power policy for SATA link power management. Without this we cannot reach deep runtime power states.
void
igt_pm_restore_sata_link_power_management
(void
);
Restore the link power management policies to the values prior to enabling min_power.
Caveat: If the system supports hotplugging and hotplugging takes place during our testing so that the hosts change numbers we might restore the settings to the wrong hosts.
bool
igt_setup_runtime_pm (int device
);
Sets up the runtime PM helper functions and enables runtime PM. To speed up tests the autosuspend delay is set to 0.
void
igt_disable_runtime_pm (void
);
Disable the runtime pm for i915 device. igt_disable_runtime_pm assumes that igt_setup_runtime_pm has already called to save runtime autosuspend and control attributes.
void
igt_restore_runtime_pm (void
);
Restores the runtime PM configuration as it was before the call to igt_setup_runtime_pm.
bool
igt_wait_for_pm_status (enum igt_runtime_pm_status status
);
Waits until for the driver to switch to into the desired runtime PM status, with a 10 second timeout.
bool
igt_pm_pc8_plus_residencies_enabled (int msr_fd
);
bool i915_output_is_lpsp_capable (int drm_fd
,igt_output_t *output
);
int
igt_pm_get_pcie_acpihp_slot (struct pci_device *pci_dev
);
enum igt_acpi_d_state
igt_pm_get_acpi_real_d_state (struct pci_device *pci_dev
);
int
igt_pm_get_autosuspend_delay (struct pci_device *pci_dev
);
Get pci_dev autosuspend delay value from pci sysfs.
void igt_pm_set_autosuspend_delay (struct pci_device *pci_dev
,int delay_ms
);
Set pci_dev autosuspend delay value through pci sysfs.
void igt_pm_enable_pci_card_runtime_pm (struct pci_device *root
,struct pci_device *i915
);
void igt_pm_get_d3cold_allowed (const char *pci_slot_name
,uint32_t *value
);
Reads the value of d3cold_allowed attribute of the pci device
void igt_pm_set_d3cold_allowed (const char *pci_slot_name
,uint32_t value
);
writes the value to d3cold_allowed attribute of pci device
void
igt_pm_setup_pci_card_runtime_pm (struct pci_device *pci_dev
);
int
igt_pm_get_runtime_suspended_time (struct pci_device *pci_dev
);
int
igt_pm_get_runtime_usage (struct pci_device *pci_dev
);
Reports the runtime PM usage count of a device.