diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/hw_flush_gp10b.h | 20 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/hw_pwr_gp10b.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h | 120 |
3 files changed, 131 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/hw_flush_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_flush_gp10b.h index f442991e..e2dff490 100644 --- a/drivers/gpu/nvgpu/gp10b/hw_flush_gp10b.h +++ b/drivers/gpu/nvgpu/gp10b/hw_flush_gp10b.h | |||
@@ -114,43 +114,43 @@ static inline u32 flush_l2_flush_dirty_outstanding_true_v(void) | |||
114 | { | 114 | { |
115 | return 0x00000001; | 115 | return 0x00000001; |
116 | } | 116 | } |
117 | static inline u32 flush_clean_comptags_r(void) | 117 | static inline u32 flush_l2_clean_comptags_r(void) |
118 | { | 118 | { |
119 | return 0x0007000c; | 119 | return 0x0007000c; |
120 | } | 120 | } |
121 | static inline u32 flush_clean_comptags_pending_v(u32 r) | 121 | static inline u32 flush_l2_clean_comptags_pending_v(u32 r) |
122 | { | 122 | { |
123 | return (r >> 0) & 0x1; | 123 | return (r >> 0) & 0x1; |
124 | } | 124 | } |
125 | static inline u32 flush_clean_comptags_pending_empty_v(void) | 125 | static inline u32 flush_l2_clean_comptags_pending_empty_v(void) |
126 | { | 126 | { |
127 | return 0x00000000; | 127 | return 0x00000000; |
128 | } | 128 | } |
129 | static inline u32 flush_clean_comptags_pending_empty_f(void) | 129 | static inline u32 flush_l2_clean_comptags_pending_empty_f(void) |
130 | { | 130 | { |
131 | return 0x0; | 131 | return 0x0; |
132 | } | 132 | } |
133 | static inline u32 flush_clean_comptags_pending_busy_v(void) | 133 | static inline u32 flush_l2_clean_comptags_pending_busy_v(void) |
134 | { | 134 | { |
135 | return 0x00000001; | 135 | return 0x00000001; |
136 | } | 136 | } |
137 | static inline u32 flush_clean_comptags_pending_busy_f(void) | 137 | static inline u32 flush_l2_clean_comptags_pending_busy_f(void) |
138 | { | 138 | { |
139 | return 0x1; | 139 | return 0x1; |
140 | } | 140 | } |
141 | static inline u32 flush_clean_comptags_outstanding_v(u32 r) | 141 | static inline u32 flush_l2_clean_comptags_outstanding_v(u32 r) |
142 | { | 142 | { |
143 | return (r >> 1) & 0x1; | 143 | return (r >> 1) & 0x1; |
144 | } | 144 | } |
145 | static inline u32 flush_clean_comptags_outstanding_false_v(void) | 145 | static inline u32 flush_l2_clean_comptags_outstanding_false_v(void) |
146 | { | 146 | { |
147 | return 0x00000000; | 147 | return 0x00000000; |
148 | } | 148 | } |
149 | static inline u32 flush_clean_comptags_outstanding_false_f(void) | 149 | static inline u32 flush_l2_clean_comptags_outstanding_false_f(void) |
150 | { | 150 | { |
151 | return 0x0; | 151 | return 0x0; |
152 | } | 152 | } |
153 | static inline u32 flush_clean_comptags_outstanding_true_v(void) | 153 | static inline u32 flush_l2_clean_comptags_outstanding_true_v(void) |
154 | { | 154 | { |
155 | return 0x00000001; | 155 | return 0x00000001; |
156 | } | 156 | } |
diff --git a/drivers/gpu/nvgpu/gp10b/hw_pwr_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_pwr_gp10b.h index f66812d6..75bf59a3 100644 --- a/drivers/gpu/nvgpu/gp10b/hw_pwr_gp10b.h +++ b/drivers/gpu/nvgpu/gp10b/hw_pwr_gp10b.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h index aed75481..17b1fb7e 100644 --- a/drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h +++ b/drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h | |||
@@ -170,6 +170,18 @@ static inline u32 therm_config1_r(void) | |||
170 | { | 170 | { |
171 | return 0x00020050; | 171 | return 0x00020050; |
172 | } | 172 | } |
173 | static inline u32 therm_config2_r(void) | ||
174 | { | ||
175 | return 0x00020130; | ||
176 | } | ||
177 | static inline u32 therm_config2_slowdown_factor_extended_f(u32 v) | ||
178 | { | ||
179 | return (v & 0x1) << 24; | ||
180 | } | ||
181 | static inline u32 therm_config2_grad_enable_f(u32 v) | ||
182 | { | ||
183 | return (v & 0x1) << 31; | ||
184 | } | ||
173 | static inline u32 therm_gate_ctrl_r(u32 i) | 185 | static inline u32 therm_gate_ctrl_r(u32 i) |
174 | { | 186 | { |
175 | return 0x00020200 + i*4; | 187 | return 0x00020200 + i*4; |
@@ -278,4 +290,112 @@ static inline u32 therm_clk_slowdown_idle_factor_disabled_f(void) | |||
278 | { | 290 | { |
279 | return 0x0; | 291 | return 0x0; |
280 | } | 292 | } |
293 | static inline u32 therm_grad_stepping_table_r(u32 i) | ||
294 | { | ||
295 | return 0x000202c8 + i*4; | ||
296 | } | ||
297 | static inline u32 therm_grad_stepping_table_slowdown_factor0_f(u32 v) | ||
298 | { | ||
299 | return (v & 0x3f) << 0; | ||
300 | } | ||
301 | static inline u32 therm_grad_stepping_table_slowdown_factor0_m(void) | ||
302 | { | ||
303 | return 0x3f << 0; | ||
304 | } | ||
305 | static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by1p5_f(void) | ||
306 | { | ||
307 | return 0x1; | ||
308 | } | ||
309 | static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by2_f(void) | ||
310 | { | ||
311 | return 0x2; | ||
312 | } | ||
313 | static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by4_f(void) | ||
314 | { | ||
315 | return 0x6; | ||
316 | } | ||
317 | static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by8_f(void) | ||
318 | { | ||
319 | return 0xe; | ||
320 | } | ||
321 | static inline u32 therm_grad_stepping_table_slowdown_factor1_f(u32 v) | ||
322 | { | ||
323 | return (v & 0x3f) << 6; | ||
324 | } | ||
325 | static inline u32 therm_grad_stepping_table_slowdown_factor1_m(void) | ||
326 | { | ||
327 | return 0x3f << 6; | ||
328 | } | ||
329 | static inline u32 therm_grad_stepping_table_slowdown_factor2_f(u32 v) | ||
330 | { | ||
331 | return (v & 0x3f) << 12; | ||
332 | } | ||
333 | static inline u32 therm_grad_stepping_table_slowdown_factor2_m(void) | ||
334 | { | ||
335 | return 0x3f << 12; | ||
336 | } | ||
337 | static inline u32 therm_grad_stepping_table_slowdown_factor3_f(u32 v) | ||
338 | { | ||
339 | return (v & 0x3f) << 18; | ||
340 | } | ||
341 | static inline u32 therm_grad_stepping_table_slowdown_factor3_m(void) | ||
342 | { | ||
343 | return 0x3f << 18; | ||
344 | } | ||
345 | static inline u32 therm_grad_stepping_table_slowdown_factor4_f(u32 v) | ||
346 | { | ||
347 | return (v & 0x3f) << 24; | ||
348 | } | ||
349 | static inline u32 therm_grad_stepping_table_slowdown_factor4_m(void) | ||
350 | { | ||
351 | return 0x3f << 24; | ||
352 | } | ||
353 | static inline u32 therm_grad_stepping0_r(void) | ||
354 | { | ||
355 | return 0x000202c0; | ||
356 | } | ||
357 | static inline u32 therm_grad_stepping0_feature_s(void) | ||
358 | { | ||
359 | return 1; | ||
360 | } | ||
361 | static inline u32 therm_grad_stepping0_feature_f(u32 v) | ||
362 | { | ||
363 | return (v & 0x1) << 0; | ||
364 | } | ||
365 | static inline u32 therm_grad_stepping0_feature_m(void) | ||
366 | { | ||
367 | return 0x1 << 0; | ||
368 | } | ||
369 | static inline u32 therm_grad_stepping0_feature_v(u32 r) | ||
370 | { | ||
371 | return (r >> 0) & 0x1; | ||
372 | } | ||
373 | static inline u32 therm_grad_stepping0_feature_enable_f(void) | ||
374 | { | ||
375 | return 0x1; | ||
376 | } | ||
377 | static inline u32 therm_grad_stepping1_r(void) | ||
378 | { | ||
379 | return 0x000202c4; | ||
380 | } | ||
381 | static inline u32 therm_grad_stepping1_pdiv_duration_f(u32 v) | ||
382 | { | ||
383 | return (v & 0x1ffff) << 0; | ||
384 | } | ||
385 | static inline u32 therm_clk_timing_r(u32 i) | ||
386 | { | ||
387 | return 0x000203c0 + i*4; | ||
388 | } | ||
389 | static inline u32 therm_clk_timing_grad_slowdown_f(u32 v) | ||
390 | { | ||
391 | return (v & 0x1) << 16; | ||
392 | } | ||
393 | static inline u32 therm_clk_timing_grad_slowdown_m(void) | ||
394 | { | ||
395 | return 0x1 << 16; | ||
396 | } | ||
397 | static inline u32 therm_clk_timing_grad_slowdown_enabled_f(void) | ||
398 | { | ||
399 | return 0x10000; | ||
400 | } | ||
281 | #endif | 401 | #endif |