diff options
author | Jyoti Yadav <jyoti.r.yadav@intel.com> | 2019-09-19 23:00:28 +0530 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2019-09-20 13:51:55 +0300 |
commit | df7814112a8b078cdc4d61f01fa15daa51f7f22d (patch) | |
tree | aabe76105f51406bc06033be16711d2e8c0aaac3 /lib/igt_pm.h | |
parent | 924e5c59dbb82938e743efd6b0812eeb5760b70d (diff) |
lib/igt_pm: igt lib helper routines to support DC5/6 tests
This patch does the following changes to lib/igt_pm.c
-dmc_loaded() will be used by new test i915_pm_dc.c which will validate
Display C States. So moving the same to igt_pm library.
-Introduced igt_disable_runtime_pm() in order to disable runtime suspend
for the function which support dc9.
-Changed the igt_pm_enable_sata_link_power_management() and
igt_pm_restore_sata_link_power_management() in order to save
and restore the sata link power policy by an exit handler.
v2: Simplify the comment section.
v3: Remove . from the subject line.
v4: Rebased, resolve conflicts in pm_rpm.c
Included patch set version change log.
v5: Listing actual change in patch set changelog to make review easier.
v6: igt's lib added support for disabling runtime suspend,
change in commit log. rebased due to test name pm_rpm changed
to i915_pm_rpm.
v7: Addressed review comment by saving POWER_DIR values in
igt_disable_runtime_pm(). [Imre]
v8: Addressed the review comment, igt_pm_enable_sata_link_power_management
function to restore the original SATA link power policy if things fail
by using an exit handler. [Imre]
v9: IGT failure fixture in i915_pm_backlight and i915_pm_rpm.
v10:Review comment fixup in sata_link_power_management
lib functions. [Imre]
v11:Add igt_assert_fd(pm_status_fd) in igt_disable_runtime_pm().
[Imre & Petri]
v12: Refactor igt_pm_pc8_plus_residencies_enabled() from
supports_pc8_plus_residencies().
Changed igt_disable_runtime_pm() return type. [Imre]
Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Diffstat (limited to 'lib/igt_pm.h')
-rw-r--r-- | lib/igt_pm.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/igt_pm.h b/lib/igt_pm.h index 10cc6794..7dc24174 100644 --- a/lib/igt_pm.h +++ b/lib/igt_pm.h @@ -25,8 +25,8 @@ #define IGT_PM_H void igt_pm_enable_audio_runtime_pm(void); -int8_t *igt_pm_enable_sata_link_power_management(void); -void igt_pm_restore_sata_link_power_management(int8_t *pm_data); +void igt_pm_enable_sata_link_power_management(void); +void igt_pm_restore_sata_link_power_management(void); /** * igt_runtime_pm_status: @@ -47,8 +47,11 @@ enum igt_runtime_pm_status { }; bool igt_setup_runtime_pm(void); +void igt_disable_runtime_pm(void); void igt_restore_runtime_pm(void); enum igt_runtime_pm_status igt_get_runtime_pm_status(void); bool igt_wait_for_pm_status(enum igt_runtime_pm_status status); +bool igt_pm_dmc_loaded(int debugfs); +bool igt_pm_pc8_plus_residencies_enabled(int msr_fd); #endif /* IGT_PM_H */ |