summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/hw_ctxsw_prog_gk20a.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/hw_ctxsw_prog_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/hw_ctxsw_prog_gk20a.h190
1 files changed, 189 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/hw_ctxsw_prog_gk20a.h b/drivers/gpu/nvgpu/gk20a/hw_ctxsw_prog_gk20a.h
index 39cbbb58..da555f7c 100644
--- a/drivers/gpu/nvgpu/gk20a/hw_ctxsw_prog_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/hw_ctxsw_prog_gk20a.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2012-2015, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2012-2016, 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,
@@ -246,4 +246,192 @@ static inline u32 ctxsw_prog_main_image_context_id_o(void)
246{ 246{
247 return 0x000000f0; 247 return 0x000000f0;
248} 248}
249static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_control_o(void)
250{
251 return 0x000000ac;
252}
253static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_control_num_records_f(u32 v)
254{
255 return (v & 0xffff) << 0;
256}
257static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_o(void)
258{
259 return 0x000000b0;
260}
261static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_v_m(void)
262{
263 return 0xfffffff << 0;
264}
265static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_target_m(void)
266{
267 return 0x3 << 28;
268}
269static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_target_vid_mem_f(void)
270{
271 return 0x0;
272}
273static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_target_sys_mem_coherent_f(void)
274{
275 return 0x20000000;
276}
277static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_hi_target_sys_mem_noncoherent_f(void)
278{
279 return 0x30000000;
280}
281static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_o(void)
282{
283 return 0x000000b4;
284}
285static inline u32 ctxsw_prog_main_image_context_timestamp_buffer_ptr_v_f(u32 v)
286{
287 return (v & 0xffffffff) << 0;
288}
289static inline u32 ctxsw_prog_record_timestamp_record_size_in_bytes_v(void)
290{
291 return 0x00000080;
292}
293static inline u32 ctxsw_prog_record_timestamp_record_size_in_words_v(void)
294{
295 return 0x00000020;
296}
297static inline u32 ctxsw_prog_record_timestamp_magic_value_lo_o(void)
298{
299 return 0x00000000;
300}
301static inline u32 ctxsw_prog_record_timestamp_magic_value_lo_v_value_v(void)
302{
303 return 0x00000000;
304}
305static inline u32 ctxsw_prog_record_timestamp_magic_value_hi_o(void)
306{
307 return 0x00000004;
308}
309static inline u32 ctxsw_prog_record_timestamp_magic_value_hi_v_value_v(void)
310{
311 return 0x600dbeef;
312}
313static inline u32 ctxsw_prog_record_timestamp_context_id_o(void)
314{
315 return 0x00000008;
316}
317static inline u32 ctxsw_prog_record_timestamp_context_ptr_o(void)
318{
319 return 0x0000000c;
320}
321static inline u32 ctxsw_prog_record_timestamp_new_context_id_o(void)
322{
323 return 0x00000010;
324}
325static inline u32 ctxsw_prog_record_timestamp_new_context_ptr_o(void)
326{
327 return 0x00000014;
328}
329static inline u32 ctxsw_prog_record_timestamp_timestamp_lo_o(void)
330{
331 return 0x00000018;
332}
333static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_o(void)
334{
335 return 0x0000001c;
336}
337static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_v_f(u32 v)
338{
339 return (v & 0xffffff) << 0;
340}
341static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_v_v(u32 r)
342{
343 return (r >> 0) & 0xffffff;
344}
345static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_f(u32 v)
346{
347 return (v & 0xff) << 24;
348}
349static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_m(void)
350{
351 return 0xff << 24;
352}
353static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_v(u32 r)
354{
355 return (r >> 24) & 0xff;
356}
357static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_ctxsw_req_by_host_v(void)
358{
359 return 0x00000001;
360}
361static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_ctxsw_req_by_host_f(void)
362{
363 return 0x1000000;
364}
365static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_v(void)
366{
367 return 0x00000002;
368}
369static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_f(void)
370{
371 return 0x2000000;
372}
373static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_wfi_v(void)
374{
375 return 0x0000000a;
376}
377static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_wfi_f(void)
378{
379 return 0xa000000;
380}
381static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_gfxp_v(void)
382{
383 return 0x0000000b;
384}
385static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_gfxp_f(void)
386{
387 return 0xb000000;
388}
389static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_ctap_v(void)
390{
391 return 0x0000000c;
392}
393static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_ctap_f(void)
394{
395 return 0xc000000;
396}
397static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_cilp_v(void)
398{
399 return 0x0000000d;
400}
401static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_fe_ack_cilp_f(void)
402{
403 return 0xd000000;
404}
405static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_save_end_v(void)
406{
407 return 0x00000003;
408}
409static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_save_end_f(void)
410{
411 return 0x3000000;
412}
413static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_restore_start_v(void)
414{
415 return 0x00000004;
416}
417static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_restore_start_f(void)
418{
419 return 0x4000000;
420}
421static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_context_start_v(void)
422{
423 return 0x00000005;
424}
425static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_context_start_f(void)
426{
427 return 0x5000000;
428}
429static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_invalid_timestamp_v(void)
430{
431 return 0x000000ff;
432}
433static inline u32 ctxsw_prog_record_timestamp_timestamp_hi_tag_invalid_timestamp_f(void)
434{
435 return 0xff000000;
436}
249#endif 437#endif