diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 30 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h | 6 |
2 files changed, 35 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c index 31c1a420..daadef68 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c | |||
@@ -1941,6 +1941,34 @@ static void gv11b_restore_context_header(struct gk20a *g, | |||
1941 | gk20a_mem_wr(g, ctxheader, | 1941 | gk20a_mem_wr(g, ctxheader, |
1942 | ctxsw_prog_main_image_num_save_ops_o(), 0); | 1942 | ctxsw_prog_main_image_num_save_ops_o(), 0); |
1943 | } | 1943 | } |
1944 | static void gr_gv11b_write_zcull_ptr(struct gk20a *g, | ||
1945 | struct mem_desc *mem, u64 gpu_va) | ||
1946 | { | ||
1947 | u32 va_lo, va_hi; | ||
1948 | |||
1949 | gpu_va = gpu_va >> 8; | ||
1950 | va_lo = u64_lo32(gpu_va); | ||
1951 | va_hi = u64_hi32(gpu_va); | ||
1952 | gk20a_mem_wr(g, mem, | ||
1953 | ctxsw_prog_main_image_zcull_ptr_o(), va_lo); | ||
1954 | gk20a_mem_wr(g, mem, | ||
1955 | ctxsw_prog_main_image_zcull_ptr_hi_o(), va_hi); | ||
1956 | } | ||
1957 | |||
1958 | |||
1959 | static void gr_gv11b_write_pm_ptr(struct gk20a *g, | ||
1960 | struct mem_desc *mem, u64 gpu_va) | ||
1961 | { | ||
1962 | u32 va_lo, va_hi; | ||
1963 | |||
1964 | gpu_va = gpu_va >> 8; | ||
1965 | va_lo = u64_lo32(gpu_va); | ||
1966 | va_hi = u64_hi32(gpu_va); | ||
1967 | gk20a_mem_wr(g, mem, | ||
1968 | ctxsw_prog_main_image_pm_ptr_o(), va_lo); | ||
1969 | gk20a_mem_wr(g, mem, | ||
1970 | ctxsw_prog_main_image_pm_ptr_hi_o(), va_hi); | ||
1971 | } | ||
1944 | 1972 | ||
1945 | void gv11b_init_gr(struct gpu_ops *gops) | 1973 | void gv11b_init_gr(struct gpu_ops *gops) |
1946 | { | 1974 | { |
@@ -1995,5 +2023,7 @@ void gv11b_init_gr(struct gpu_ops *gops) | |||
1995 | gr_gv11b_program_sm_id_numbering; | 2023 | gr_gv11b_program_sm_id_numbering; |
1996 | gops->gr.commit_inst = gr_gv11b_commit_inst; | 2024 | gops->gr.commit_inst = gr_gv11b_commit_inst; |
1997 | gops->gr.restore_context_header = gv11b_restore_context_header; | 2025 | gops->gr.restore_context_header = gv11b_restore_context_header; |
2026 | gops->gr.write_zcull_ptr = gr_gv11b_write_zcull_ptr; | ||
2027 | gops->gr.write_pm_ptr = gr_gv11b_write_pm_ptr; | ||
1998 | 2028 | ||
1999 | } | 2029 | } |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h index 228bf5f2..a0f40de0 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2017, 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, |
@@ -186,6 +186,10 @@ static inline u32 ctxsw_prog_main_image_zcull_ptr_hi_v_f(u32 v) | |||
186 | { | 186 | { |
187 | return (v & 0x1ffff) << 0; | 187 | return (v & 0x1ffff) << 0; |
188 | } | 188 | } |
189 | static inline u32 ctxsw_prog_main_image_pm_ptr_hi_o(void) | ||
190 | { | ||
191 | return 0x00000094; | ||
192 | } | ||
189 | static inline u32 ctxsw_prog_main_image_full_preemption_ptr_hi_o(void) | 193 | static inline u32 ctxsw_prog_main_image_full_preemption_ptr_hi_o(void) |
190 | { | 194 | { |
191 | return 0x00000064; | 195 | return 0x00000064; |