summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
diff options
context:
space:
mode:
authorSeema Khowala <seemaj@nvidia.com>2016-10-14 16:37:41 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-10-17 17:46:34 -0400
commit742156225248816acba9955b14fc43fc9fe737bc (patch)
tree142b24417100a108862d997237ff3a505f9a5cee /drivers/gpu/nvgpu/gv11b/gr_gv11b.c
parent2de62a6083075451318c2ef6b5323f50bf5ebc3f (diff)
gpu: nvgpu: gv11b: enable gpc exceptions
Add function ptr and function for enabling gpc exceptions. Disable Tex exceptions. JIRA GV11B-28 JIRA GV11B-27 Change-Id: Ife8fe22c24da00ae14f68fd977d84d208831eb45 Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: http://git-master/r/1236899 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/gr_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/gr_gv11b.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
index 89be2563..d8b79bac 100644
--- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
@@ -80,6 +80,20 @@ static int gr_gv11b_handle_sm_exception(struct gk20a *g, u32 gpc, u32 tpc,
80 return ret; 80 return ret;
81} 81}
82 82
83static void gr_gv11b_enable_gpc_exceptions(struct gk20a *g)
84{
85 struct gr_gk20a *gr = &g->gr;
86 u32 tpc_mask;
87
88 gk20a_writel(g, gr_gpcs_tpcs_tpccs_tpc_exception_en_r(),
89 gr_gpcs_tpcs_tpccs_tpc_exception_en_sm_enabled_f());
90
91 tpc_mask =
92 gr_gpcs_gpccs_gpc_exception_en_tpc_f((1 << gr->tpc_count) - 1);
93
94 gk20a_writel(g, gr_gpcs_gpccs_gpc_exception_en_r(), tpc_mask);
95}
96
83static int gr_gv11b_handle_tex_exception(struct gk20a *g, u32 gpc, u32 tpc, 97static int gr_gv11b_handle_tex_exception(struct gk20a *g, u32 gpc, u32 tpc,
84 bool *post_event) 98 bool *post_event)
85{ 99{
@@ -1670,6 +1684,7 @@ void gv11b_init_gr(struct gpu_ops *gops)
1670 gops->gr.get_access_map = gr_gv11b_get_access_map; 1684 gops->gr.get_access_map = gr_gv11b_get_access_map;
1671 gops->gr.handle_sm_exception = gr_gv11b_handle_sm_exception; 1685 gops->gr.handle_sm_exception = gr_gv11b_handle_sm_exception;
1672 gops->gr.handle_tex_exception = gr_gv11b_handle_tex_exception; 1686 gops->gr.handle_tex_exception = gr_gv11b_handle_tex_exception;
1687 gops->gr.enable_gpc_exceptions = gr_gv11b_enable_gpc_exceptions;
1673 gops->gr.mask_hww_warp_esr = gv11b_mask_hww_warp_esr; 1688 gops->gr.mask_hww_warp_esr = gv11b_mask_hww_warp_esr;
1674 gops->gr.pre_process_sm_exception = 1689 gops->gr.pre_process_sm_exception =
1675 gr_gv11b_pre_process_sm_exception; 1690 gr_gv11b_pre_process_sm_exception;