summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2015-11-30 12:30:22 -0500
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:52:09 -0500
commitd44b5ecc30eaf4c307d56ee6205f8ca0b0f737c4 (patch)
treee97a5a0eff103ba5912da9d448c218d098d7ea6c /drivers
parent108c0ac8bdeb6b27a9ab8756137e5f58af0da9d1 (diff)
gpu: nvgpu: Recreate HW headers
Add gradual slowdown registers, and fix names for L2 flush registers. Change-Id: If085c4febef494ae299d2147ca5201cd373bee0b Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/839369 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gp10b/hw_flush_gp10b.h20
-rw-r--r--drivers/gpu/nvgpu/gp10b/hw_pwr_gp10b.h2
-rw-r--r--drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h120
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}
117static inline u32 flush_clean_comptags_r(void) 117static inline u32 flush_l2_clean_comptags_r(void)
118{ 118{
119 return 0x0007000c; 119 return 0x0007000c;
120} 120}
121static inline u32 flush_clean_comptags_pending_v(u32 r) 121static inline u32 flush_l2_clean_comptags_pending_v(u32 r)
122{ 122{
123 return (r >> 0) & 0x1; 123 return (r >> 0) & 0x1;
124} 124}
125static inline u32 flush_clean_comptags_pending_empty_v(void) 125static inline u32 flush_l2_clean_comptags_pending_empty_v(void)
126{ 126{
127 return 0x00000000; 127 return 0x00000000;
128} 128}
129static inline u32 flush_clean_comptags_pending_empty_f(void) 129static inline u32 flush_l2_clean_comptags_pending_empty_f(void)
130{ 130{
131 return 0x0; 131 return 0x0;
132} 132}
133static inline u32 flush_clean_comptags_pending_busy_v(void) 133static inline u32 flush_l2_clean_comptags_pending_busy_v(void)
134{ 134{
135 return 0x00000001; 135 return 0x00000001;
136} 136}
137static inline u32 flush_clean_comptags_pending_busy_f(void) 137static inline u32 flush_l2_clean_comptags_pending_busy_f(void)
138{ 138{
139 return 0x1; 139 return 0x1;
140} 140}
141static inline u32 flush_clean_comptags_outstanding_v(u32 r) 141static inline u32 flush_l2_clean_comptags_outstanding_v(u32 r)
142{ 142{
143 return (r >> 1) & 0x1; 143 return (r >> 1) & 0x1;
144} 144}
145static inline u32 flush_clean_comptags_outstanding_false_v(void) 145static inline u32 flush_l2_clean_comptags_outstanding_false_v(void)
146{ 146{
147 return 0x00000000; 147 return 0x00000000;
148} 148}
149static inline u32 flush_clean_comptags_outstanding_false_f(void) 149static inline u32 flush_l2_clean_comptags_outstanding_false_f(void)
150{ 150{
151 return 0x0; 151 return 0x0;
152} 152}
153static inline u32 flush_clean_comptags_outstanding_true_v(void) 153static 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}
173static inline u32 therm_config2_r(void)
174{
175 return 0x00020130;
176}
177static inline u32 therm_config2_slowdown_factor_extended_f(u32 v)
178{
179 return (v & 0x1) << 24;
180}
181static inline u32 therm_config2_grad_enable_f(u32 v)
182{
183 return (v & 0x1) << 31;
184}
173static inline u32 therm_gate_ctrl_r(u32 i) 185static 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}
293static inline u32 therm_grad_stepping_table_r(u32 i)
294{
295 return 0x000202c8 + i*4;
296}
297static inline u32 therm_grad_stepping_table_slowdown_factor0_f(u32 v)
298{
299 return (v & 0x3f) << 0;
300}
301static inline u32 therm_grad_stepping_table_slowdown_factor0_m(void)
302{
303 return 0x3f << 0;
304}
305static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by1p5_f(void)
306{
307 return 0x1;
308}
309static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by2_f(void)
310{
311 return 0x2;
312}
313static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by4_f(void)
314{
315 return 0x6;
316}
317static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by8_f(void)
318{
319 return 0xe;
320}
321static inline u32 therm_grad_stepping_table_slowdown_factor1_f(u32 v)
322{
323 return (v & 0x3f) << 6;
324}
325static inline u32 therm_grad_stepping_table_slowdown_factor1_m(void)
326{
327 return 0x3f << 6;
328}
329static inline u32 therm_grad_stepping_table_slowdown_factor2_f(u32 v)
330{
331 return (v & 0x3f) << 12;
332}
333static inline u32 therm_grad_stepping_table_slowdown_factor2_m(void)
334{
335 return 0x3f << 12;
336}
337static inline u32 therm_grad_stepping_table_slowdown_factor3_f(u32 v)
338{
339 return (v & 0x3f) << 18;
340}
341static inline u32 therm_grad_stepping_table_slowdown_factor3_m(void)
342{
343 return 0x3f << 18;
344}
345static inline u32 therm_grad_stepping_table_slowdown_factor4_f(u32 v)
346{
347 return (v & 0x3f) << 24;
348}
349static inline u32 therm_grad_stepping_table_slowdown_factor4_m(void)
350{
351 return 0x3f << 24;
352}
353static inline u32 therm_grad_stepping0_r(void)
354{
355 return 0x000202c0;
356}
357static inline u32 therm_grad_stepping0_feature_s(void)
358{
359 return 1;
360}
361static inline u32 therm_grad_stepping0_feature_f(u32 v)
362{
363 return (v & 0x1) << 0;
364}
365static inline u32 therm_grad_stepping0_feature_m(void)
366{
367 return 0x1 << 0;
368}
369static inline u32 therm_grad_stepping0_feature_v(u32 r)
370{
371 return (r >> 0) & 0x1;
372}
373static inline u32 therm_grad_stepping0_feature_enable_f(void)
374{
375 return 0x1;
376}
377static inline u32 therm_grad_stepping1_r(void)
378{
379 return 0x000202c4;
380}
381static inline u32 therm_grad_stepping1_pdiv_duration_f(u32 v)
382{
383 return (v & 0x1ffff) << 0;
384}
385static inline u32 therm_clk_timing_r(u32 i)
386{
387 return 0x000203c0 + i*4;
388}
389static inline u32 therm_clk_timing_grad_slowdown_f(u32 v)
390{
391 return (v & 0x1) << 16;
392}
393static inline u32 therm_clk_timing_grad_slowdown_m(void)
394{
395 return 0x1 << 16;
396}
397static inline u32 therm_clk_timing_grad_slowdown_enabled_f(void)
398{
399 return 0x10000;
400}
281#endif 401#endif