diff options
author | seshendra Gadagottu <sgadagottu@nvidia.com> | 2016-09-28 19:55:36 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-09-29 16:17:54 -0400 |
commit | 507081b2eae666f9c3e713fd7d9d97fdc8b6c56f (patch) | |
tree | 8d3bce7a202a2b0e408fbe11ac3c1ccdbb32e164 | |
parent | 09168aac40b22ba264de6a7fc1e5264528b1fe9f (diff) |
gpu: nvgpu: gv11b: kernel hw header update
Kernel hardware headers updtae related to ctxsw,
ramfc and pbdma.
JIRA GV11B-21
Change-Id: I99588b420a814068eaf894e999a8ad8e6234e26c
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/1228760
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hw_ctxsw_prog_gv11b.h | 96 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hw_gr_gv11b.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hw_pbdma_gv11b.h | 80 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hw_ram_gv11b.h | 32 |
4 files changed, 184 insertions, 28 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/hw_ctxsw_prog_gv11b.h b/drivers/gpu/nvgpu/gv11b/hw_ctxsw_prog_gv11b.h index 57a6b28d..4ca83ea4 100644 --- a/drivers/gpu/nvgpu/gv11b/hw_ctxsw_prog_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/hw_ctxsw_prog_gv11b.h | |||
@@ -58,6 +58,42 @@ static inline u32 ctxsw_prog_main_image_num_gpcs_o(void) | |||
58 | { | 58 | { |
59 | return 0x00000008; | 59 | return 0x00000008; |
60 | } | 60 | } |
61 | static inline u32 ctxsw_prog_main_image_ctl_o(void) | ||
62 | { | ||
63 | return 0x0000000c; | ||
64 | } | ||
65 | static inline u32 ctxsw_prog_main_image_ctl_type_f(u32 v) | ||
66 | { | ||
67 | return (v & 0x3f) << 0; | ||
68 | } | ||
69 | static inline u32 ctxsw_prog_main_image_ctl_type_undefined_v(void) | ||
70 | { | ||
71 | return 0x00000000; | ||
72 | } | ||
73 | static inline u32 ctxsw_prog_main_image_ctl_type_opengl_v(void) | ||
74 | { | ||
75 | return 0x00000008; | ||
76 | } | ||
77 | static inline u32 ctxsw_prog_main_image_ctl_type_dx9_v(void) | ||
78 | { | ||
79 | return 0x00000010; | ||
80 | } | ||
81 | static inline u32 ctxsw_prog_main_image_ctl_type_dx10_v(void) | ||
82 | { | ||
83 | return 0x00000011; | ||
84 | } | ||
85 | static inline u32 ctxsw_prog_main_image_ctl_type_dx11_v(void) | ||
86 | { | ||
87 | return 0x00000012; | ||
88 | } | ||
89 | static inline u32 ctxsw_prog_main_image_ctl_type_compute_v(void) | ||
90 | { | ||
91 | return 0x00000020; | ||
92 | } | ||
93 | static inline u32 ctxsw_prog_main_image_ctl_type_per_veid_header_v(void) | ||
94 | { | ||
95 | return 0x00000021; | ||
96 | } | ||
61 | static inline u32 ctxsw_prog_main_image_patch_count_o(void) | 97 | static inline u32 ctxsw_prog_main_image_patch_count_o(void) |
62 | { | 98 | { |
63 | return 0x00000010; | 99 | return 0x00000010; |
@@ -142,6 +178,62 @@ static inline u32 ctxsw_prog_main_image_num_restore_ops_o(void) | |||
142 | { | 178 | { |
143 | return 0x000000f8; | 179 | return 0x000000f8; |
144 | } | 180 | } |
181 | static inline u32 ctxsw_prog_main_image_zcull_ptr_hi_o(void) | ||
182 | { | ||
183 | return 0x00000060; | ||
184 | } | ||
185 | static inline u32 ctxsw_prog_main_image_zcull_ptr_hi_v_f(u32 v) | ||
186 | { | ||
187 | return (v & 0x1ffff) << 0; | ||
188 | } | ||
189 | static inline u32 ctxsw_prog_main_image_full_preemption_ptr_hi_o(void) | ||
190 | { | ||
191 | return 0x00000064; | ||
192 | } | ||
193 | static inline u32 ctxsw_prog_main_image_full_preemption_ptr_hi_v_f(u32 v) | ||
194 | { | ||
195 | return (v & 0x1ffff) << 0; | ||
196 | } | ||
197 | static inline u32 ctxsw_prog_main_image_full_preemption_ptr_o(void) | ||
198 | { | ||
199 | return 0x00000068; | ||
200 | } | ||
201 | static inline u32 ctxsw_prog_main_image_full_preemption_ptr_v_f(u32 v) | ||
202 | { | ||
203 | return (v & 0xffffffff) << 0; | ||
204 | } | ||
205 | static inline u32 ctxsw_prog_main_image_full_preemption_ptr_veid0_hi_o(void) | ||
206 | { | ||
207 | return 0x00000070; | ||
208 | } | ||
209 | static inline u32 ctxsw_prog_main_image_full_preemption_ptr_veid0_hi_v_f(u32 v) | ||
210 | { | ||
211 | return (v & 0x1ffff) << 0; | ||
212 | } | ||
213 | static inline u32 ctxsw_prog_main_image_full_preemption_ptr_veid0_o(void) | ||
214 | { | ||
215 | return 0x00000074; | ||
216 | } | ||
217 | static inline u32 ctxsw_prog_main_image_full_preemption_ptr_veid0_v_f(u32 v) | ||
218 | { | ||
219 | return (v & 0xffffffff) << 0; | ||
220 | } | ||
221 | static inline u32 ctxsw_prog_main_image_context_buffer_ptr_hi_o(void) | ||
222 | { | ||
223 | return 0x00000078; | ||
224 | } | ||
225 | static inline u32 ctxsw_prog_main_image_context_buffer_ptr_hi_v_f(u32 v) | ||
226 | { | ||
227 | return (v & 0x1ffff) << 0; | ||
228 | } | ||
229 | static inline u32 ctxsw_prog_main_image_context_buffer_ptr_o(void) | ||
230 | { | ||
231 | return 0x0000007c; | ||
232 | } | ||
233 | static inline u32 ctxsw_prog_main_image_context_buffer_ptr_v_f(u32 v) | ||
234 | { | ||
235 | return (v & 0xffffffff) << 0; | ||
236 | } | ||
145 | static inline u32 ctxsw_prog_main_image_magic_value_o(void) | 237 | static inline u32 ctxsw_prog_main_image_magic_value_o(void) |
146 | { | 238 | { |
147 | return 0x000000fc; | 239 | return 0x000000fc; |
@@ -270,10 +362,6 @@ static inline u32 ctxsw_prog_main_image_graphics_preemption_options_control_gfxp | |||
270 | { | 362 | { |
271 | return 0x1; | 363 | return 0x1; |
272 | } | 364 | } |
273 | static inline u32 ctxsw_prog_main_image_full_preemption_ptr_o(void) | ||
274 | { | ||
275 | return 0x00000068; | ||
276 | } | ||
277 | static inline u32 ctxsw_prog_main_image_compute_preemption_options_o(void) | 365 | static inline u32 ctxsw_prog_main_image_compute_preemption_options_o(void) |
278 | { | 366 | { |
279 | return 0x00000084; | 367 | return 0x00000084; |
diff --git a/drivers/gpu/nvgpu/gv11b/hw_gr_gv11b.h b/drivers/gpu/nvgpu/gv11b/hw_gr_gv11b.h index e8394215..c58ee6ba 100644 --- a/drivers/gpu/nvgpu/gv11b/hw_gr_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/hw_gr_gv11b.h | |||
@@ -3230,6 +3230,10 @@ static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff_r(u32 i) | |||
3230 | { | 3230 | { |
3231 | return 0x0041bfb0 + i*4; | 3231 | return 0x0041bfb0 + i*4; |
3232 | } | 3232 | } |
3233 | static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff__size_1_v(void) | ||
3234 | { | ||
3235 | return 0x00000005; | ||
3236 | } | ||
3233 | static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff_0_mod_value_f(u32 v) | 3237 | static inline u32 gr_ppcs_wwdx_map_table_cfg_coeff_0_mod_value_f(u32 v) |
3234 | { | 3238 | { |
3235 | return (v & 0xff) << 0; | 3239 | return (v & 0xff) << 0; |
diff --git a/drivers/gpu/nvgpu/gv11b/hw_pbdma_gv11b.h b/drivers/gpu/nvgpu/gv11b/hw_pbdma_gv11b.h index 38d63487..be8089d8 100644 --- a/drivers/gpu/nvgpu/gv11b/hw_pbdma_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/hw_pbdma_gv11b.h | |||
@@ -130,22 +130,6 @@ static inline u32 pbdma_put_hi_r(u32 i) | |||
130 | { | 130 | { |
131 | return 0x00040060 + i*8192; | 131 | return 0x00040060 + i*8192; |
132 | } | 132 | } |
133 | static inline u32 pbdma_formats_r(u32 i) | ||
134 | { | ||
135 | return 0x0004009c + i*8192; | ||
136 | } | ||
137 | static inline u32 pbdma_formats_gp_fermi0_f(void) | ||
138 | { | ||
139 | return 0x0; | ||
140 | } | ||
141 | static inline u32 pbdma_formats_pb_fermi1_f(void) | ||
142 | { | ||
143 | return 0x100; | ||
144 | } | ||
145 | static inline u32 pbdma_formats_mp_fermi0_f(void) | ||
146 | { | ||
147 | return 0x0; | ||
148 | } | ||
149 | static inline u32 pbdma_pb_header_r(u32 i) | 133 | static inline u32 pbdma_pb_header_r(u32 i) |
150 | { | 134 | { |
151 | return 0x00040084 + i*8192; | 135 | return 0x00040084 + i*8192; |
@@ -242,14 +226,6 @@ static inline u32 pbdma_data0_r(u32 i) | |||
242 | { | 226 | { |
243 | return 0x000400c4 + i*8192; | 227 | return 0x000400c4 + i*8192; |
244 | } | 228 | } |
245 | static inline u32 pbdma_target_r(u32 i) | ||
246 | { | ||
247 | return 0x000400ac + i*8192; | ||
248 | } | ||
249 | static inline u32 pbdma_target_engine_sw_f(void) | ||
250 | { | ||
251 | return 0x1f; | ||
252 | } | ||
253 | static inline u32 pbdma_acquire_r(u32 i) | 229 | static inline u32 pbdma_acquire_r(u32 i) |
254 | { | 230 | { |
255 | return 0x00040030 + i*8192; | 231 | return 0x00040030 + i*8192; |
@@ -574,6 +550,62 @@ static inline u32 pbdma_runlist_timeslice_enable_true_f(void) | |||
574 | { | 550 | { |
575 | return 0x10000000; | 551 | return 0x10000000; |
576 | } | 552 | } |
553 | static inline u32 pbdma_target_r(u32 i) | ||
554 | { | ||
555 | return 0x000400ac + i*8192; | ||
556 | } | ||
557 | static inline u32 pbdma_target_engine_sw_f(void) | ||
558 | { | ||
559 | return 0x1f; | ||
560 | } | ||
561 | static inline u32 pbdma_target_eng_ctx_valid_true_f(void) | ||
562 | { | ||
563 | return 0x10000; | ||
564 | } | ||
565 | static inline u32 pbdma_target_eng_ctx_valid_false_f(void) | ||
566 | { | ||
567 | return 0x0; | ||
568 | } | ||
569 | static inline u32 pbdma_target_ce_ctx_valid_true_f(void) | ||
570 | { | ||
571 | return 0x20000; | ||
572 | } | ||
573 | static inline u32 pbdma_target_ce_ctx_valid_false_f(void) | ||
574 | { | ||
575 | return 0x0; | ||
576 | } | ||
577 | static inline u32 pbdma_target_host_tsg_event_reason_pbdma_idle_f(void) | ||
578 | { | ||
579 | return 0x0; | ||
580 | } | ||
581 | static inline u32 pbdma_target_host_tsg_event_reason_semaphore_acquire_failure_f(void) | ||
582 | { | ||
583 | return 0x1000000; | ||
584 | } | ||
585 | static inline u32 pbdma_target_host_tsg_event_reason_tsg_yield_f(void) | ||
586 | { | ||
587 | return 0x2000000; | ||
588 | } | ||
589 | static inline u32 pbdma_target_host_tsg_event_reason_host_subchannel_switch_f(void) | ||
590 | { | ||
591 | return 0x3000000; | ||
592 | } | ||
593 | static inline u32 pbdma_target_should_send_tsg_event_true_f(void) | ||
594 | { | ||
595 | return 0x20000000; | ||
596 | } | ||
597 | static inline u32 pbdma_target_should_send_tsg_event_false_f(void) | ||
598 | { | ||
599 | return 0x0; | ||
600 | } | ||
601 | static inline u32 pbdma_target_needs_host_tsg_event_true_f(void) | ||
602 | { | ||
603 | return 0x80000000; | ||
604 | } | ||
605 | static inline u32 pbdma_target_needs_host_tsg_event_false_f(void) | ||
606 | { | ||
607 | return 0x0; | ||
608 | } | ||
577 | static inline u32 pbdma_set_channel_info_r(u32 i) | 609 | static inline u32 pbdma_set_channel_info_r(u32 i) |
578 | { | 610 | { |
579 | return 0x000400fc + i*8192; | 611 | return 0x000400fc + i*8192; |
diff --git a/drivers/gpu/nvgpu/gv11b/hw_ram_gv11b.h b/drivers/gpu/nvgpu/gv11b/hw_ram_gv11b.h index 7c89db4d..868e4ad9 100644 --- a/drivers/gpu/nvgpu/gv11b/hw_ram_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/hw_ram_gv11b.h | |||
@@ -90,6 +90,38 @@ static inline u32 ram_in_page_dir_base_vol_false_f(void) | |||
90 | { | 90 | { |
91 | return 0x0; | 91 | return 0x0; |
92 | } | 92 | } |
93 | static inline u32 ram_in_page_dir_base_fault_replay_tex_f(u32 v) | ||
94 | { | ||
95 | return (v & 0x1) << 4; | ||
96 | } | ||
97 | static inline u32 ram_in_page_dir_base_fault_replay_tex_m(void) | ||
98 | { | ||
99 | return 0x1 << 4; | ||
100 | } | ||
101 | static inline u32 ram_in_page_dir_base_fault_replay_tex_w(void) | ||
102 | { | ||
103 | return 128; | ||
104 | } | ||
105 | static inline u32 ram_in_page_dir_base_fault_replay_tex_true_f(void) | ||
106 | { | ||
107 | return 0x10; | ||
108 | } | ||
109 | static inline u32 ram_in_page_dir_base_fault_replay_gcc_f(u32 v) | ||
110 | { | ||
111 | return (v & 0x1) << 5; | ||
112 | } | ||
113 | static inline u32 ram_in_page_dir_base_fault_replay_gcc_m(void) | ||
114 | { | ||
115 | return 0x1 << 5; | ||
116 | } | ||
117 | static inline u32 ram_in_page_dir_base_fault_replay_gcc_w(void) | ||
118 | { | ||
119 | return 128; | ||
120 | } | ||
121 | static inline u32 ram_in_page_dir_base_fault_replay_gcc_true_f(void) | ||
122 | { | ||
123 | return 0x20; | ||
124 | } | ||
93 | static inline u32 ram_in_big_page_size_f(u32 v) | 125 | static inline u32 ram_in_big_page_size_f(u32 v) |
94 | { | 126 | { |
95 | return (v & 0x1) << 11; | 127 | return (v & 0x1) << 11; |