diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/gr_gm20b.c | 10 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/hw_ctxsw_prog_gm20b.h | 12 |
2 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c index 17b4b8ea..df7f2af9 100644 --- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c | |||
@@ -1052,6 +1052,15 @@ static void gr_gm20b_init_cyclestats(struct gk20a *g) | |||
1052 | #endif | 1052 | #endif |
1053 | } | 1053 | } |
1054 | 1054 | ||
1055 | void gr_gm20b_enable_cde_in_fecs(void *ctx_ptr) | ||
1056 | { | ||
1057 | u32 cde_v; | ||
1058 | |||
1059 | cde_v = gk20a_mem_rd32(ctx_ptr + ctxsw_prog_main_image_ctl_o(), 0); | ||
1060 | cde_v |= ctxsw_prog_main_image_ctl_cde_enabled_f(); | ||
1061 | gk20a_mem_wr32(ctx_ptr + ctxsw_prog_main_image_ctl_o(), 0, cde_v); | ||
1062 | } | ||
1063 | |||
1055 | void gm20b_init_gr(struct gpu_ops *gops) | 1064 | void gm20b_init_gr(struct gpu_ops *gops) |
1056 | { | 1065 | { |
1057 | gops->gr.init_gpc_mmu = gr_gm20b_init_gpc_mmu; | 1066 | gops->gr.init_gpc_mmu = gr_gm20b_init_gpc_mmu; |
@@ -1107,4 +1116,5 @@ void gm20b_init_gr(struct gpu_ops *gops) | |||
1107 | gops->gr.init_sm_dsm_reg_info = gr_gm20b_init_sm_dsm_reg_info; | 1116 | gops->gr.init_sm_dsm_reg_info = gr_gm20b_init_sm_dsm_reg_info; |
1108 | gops->gr.wait_empty = gr_gk20a_wait_idle; | 1117 | gops->gr.wait_empty = gr_gk20a_wait_idle; |
1109 | gops->gr.init_cyclestats = gr_gm20b_init_cyclestats; | 1118 | gops->gr.init_cyclestats = gr_gm20b_init_cyclestats; |
1119 | gops->gr.enable_cde_in_fecs = gr_gm20b_enable_cde_in_fecs; | ||
1110 | } | 1120 | } |
diff --git a/drivers/gpu/nvgpu/gm20b/hw_ctxsw_prog_gm20b.h b/drivers/gpu/nvgpu/gm20b/hw_ctxsw_prog_gm20b.h index cefd91e1..34f8a6a4 100644 --- a/drivers/gpu/nvgpu/gm20b/hw_ctxsw_prog_gm20b.h +++ b/drivers/gpu/nvgpu/gm20b/hw_ctxsw_prog_gm20b.h | |||
@@ -58,6 +58,18 @@ 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_cde_enabled_f(void) | ||
66 | { | ||
67 | return 0x400; | ||
68 | } | ||
69 | static inline u32 ctxsw_prog_main_image_ctl_cde_disabled_f(void) | ||
70 | { | ||
71 | return 0x0; | ||
72 | } | ||
61 | static inline u32 ctxsw_prog_main_image_patch_count_o(void) | 73 | static inline u32 ctxsw_prog_main_image_patch_count_o(void) |
62 | { | 74 | { |
63 | return 0x00000010; | 75 | return 0x00000010; |