From 15deba45756eeeacca2ad83ac931606986f8d669 Mon Sep 17 00:00:00 2001 From: David Weinehall Date: Thu, 18 Feb 2016 13:08:46 +0200 Subject: lib/igt_pm: Lib for power management Move power management related code to a separate library. Initially this is done only for workarounds that apply to external components. Modify the users of such workarounds accordingly. This currently involves HD audio and SATA link power management. For SATA link PM there's also code to save the previous settings, to allow for resetting the values after we've finished testing. Signed-off-by: David Weinehall Reviewed-by: Marius Vlad Signed-off-by: Marius Vlad --- lib/igt_pm.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 lib/igt_pm.h (limited to 'lib/igt_pm.h') diff --git a/lib/igt_pm.h b/lib/igt_pm.h new file mode 100644 index 00000000..c14ff1f7 --- /dev/null +++ b/lib/igt_pm.h @@ -0,0 +1,31 @@ +/* + * Copyright © 2015 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#ifndef IGT_PM_H +#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); + +#endif /* IGT_PM_H */ -- cgit v1.2.3