2 * Copyright 2011 Advanced Micro Devices, Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
22 * Authors: Alex Deucher
25 #ifndef __RV6XX_DPM_H__
26 #define __RV6XX_DPM_H__
30 /* Represents a single SCLK step. */
31 struct rv6xx_sclk_stepping {
36 struct rv6xx_pm_hw_state {
37 u32 sclks[R600_PM_NUMBER_OF_ACTIVITY_LEVELS];
38 u32 mclks[R600_PM_NUMBER_OF_MCLKS];
39 u16 vddc[R600_PM_NUMBER_OF_VOLTAGE_LEVELS];
40 bool backbias[R600_PM_NUMBER_OF_VOLTAGE_LEVELS];
41 bool pcie_gen2[R600_PM_NUMBER_OF_ACTIVITY_LEVELS];
51 u8 rp[R600_PM_NUMBER_OF_ACTIVITY_LEVELS];
52 u8 lp[R600_PM_NUMBER_OF_ACTIVITY_LEVELS];
55 struct rv6xx_power_info {
61 bool dynamic_pcie_gen2;
62 bool thermal_protection;
64 bool gfx_clock_gating;
72 u32 active_auto_throttle_sources;
73 /* current power state */
74 u32 restricted_levels;
75 struct rv6xx_pm_hw_state hw;
87 struct rv6xx_pl medium;
91 #define RV6XX_DEFAULT_VCLK_FREQ 40000 /* 10 khz */
92 #define RV6XX_DEFAULT_DCLK_FREQ 30000 /* 10 khz */