diff options
author | Lakshmanan M <lm@nvidia.com> | 2016-10-07 05:00:12 -0400 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 04:56:50 -0500 |
commit | 776ab920a7a4d31c6180e7dcb9f3fcea611e92bd (patch) | |
tree | 89931a821b7a3fa27e132fa640f27310695bbccf /drivers/gpu/nvgpu/pmgr/pwrpolicy.h | |
parent | 90f80a282eff04412858361df35c2f88372e88cb (diff) |
gpu: nvgpu: Add SW_THRESHOLD policy support
Added SW_THRESHOLD policy support for over power protection.
JIRA DNVGPU-70
Change-Id: I7a9d202619c997d6cab6fb750db7f3018229b2fd
Signed-off-by: Lakshmanan M <lm@nvidia.com>
Reviewed-on: http://git-master/r/1233055
(cherry picked from commit b233c74b9ba4a3802f111757aecf24a27c830fc1)
Reviewed-on: http://git-master/r/1241960
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/pmgr/pwrpolicy.h')
-rw-r--r-- | drivers/gpu/nvgpu/pmgr/pwrpolicy.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/pmgr/pwrpolicy.h b/drivers/gpu/nvgpu/pmgr/pwrpolicy.h index 82289137..008282d3 100644 --- a/drivers/gpu/nvgpu/pmgr/pwrpolicy.h +++ b/drivers/gpu/nvgpu/pmgr/pwrpolicy.h | |||
@@ -99,10 +99,20 @@ struct pwr_policy_hw_threshold { | |||
99 | u16 low_threshold_value; | 99 | u16 low_threshold_value; |
100 | }; | 100 | }; |
101 | 101 | ||
102 | struct pwr_policy_sw_threshold { | ||
103 | struct pwr_policy_limit super; | ||
104 | u8 threshold_idx; | ||
105 | u8 low_threshold_idx; | ||
106 | bool b_use_low_threshold; | ||
107 | u16 low_threshold_value; | ||
108 | u8 event_id; | ||
109 | }; | ||
110 | |||
102 | union pwr_policy_data_union { | 111 | union pwr_policy_data_union { |
103 | struct boardobj boardobj; | 112 | struct boardobj boardobj; |
104 | struct pwr_policy pwrpolicy; | 113 | struct pwr_policy pwrpolicy; |
105 | struct pwr_policy_hw_threshold hw_threshold; | 114 | struct pwr_policy_hw_threshold hw_threshold; |
115 | struct pwr_policy_sw_threshold sw_threshold; | ||
106 | } ; | 116 | } ; |
107 | 117 | ||
108 | #define PMGR_GET_PWR_POLICY(g, policy_idx) \ | 118 | #define PMGR_GET_PWR_POLICY(g, policy_idx) \ |