summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
diff options
context:
space:
mode:
authorseshendra Gadagottu <sgadagottu@nvidia.com>2017-01-11 17:28:32 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-01-18 19:47:20 -0500
commit64ab12979590564db19c820ff8cdd71579a9b317 (patch)
treeaa042293a77dd5f63b552ad04b6b536492b36f8d /drivers/gpu/nvgpu/gv11b/gr_gv11b.c
parent3f0e08da43a448d8a1a85529b03d4c073f8c11c5 (diff)
gpu: nvgpu: gv11b: sw methods for shader exception
Added proper sw methods handling of shader execptions for gv11b. Bug 1834201 Change-Id: I3f3a45beed777cc4af59368dccd9dc7bb8181c37 Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/1283729 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.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
index 4984af46..79eee0e5 100644
--- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
@@ -407,6 +407,25 @@ static void gr_gv11b_set_coalesce_buffer_size(struct gk20a *g, u32 data)
407 gk20a_dbg_fn("done"); 407 gk20a_dbg_fn("done");
408} 408}
409 409
410
411static void gv11b_gr_set_shader_exceptions(struct gk20a *g, u32 data)
412{
413 u32 val;
414
415 gk20a_dbg_fn("");
416
417 if (data == NVA297_SET_SHADER_EXCEPTIONS_ENABLE_FALSE)
418 val = 0;
419 else
420 val = 0xffffffff;
421
422 /* setup sm warp esr report masks */
423 gk20a_writel(g, gr_gpcs_tpcs_sms_hww_warp_esr_report_mask_r(), val);
424
425 /* setup sm global esr report mask */
426 gk20a_writel(g, gr_gpcs_tpcs_sms_hww_global_esr_report_mask_r(), val);
427}
428
410static int gr_gv11b_handle_sw_method(struct gk20a *g, u32 addr, 429static int gr_gv11b_handle_sw_method(struct gk20a *g, u32 addr,
411 u32 class_num, u32 offset, u32 data) 430 u32 class_num, u32 offset, u32 data)
412{ 431{
@@ -415,7 +434,7 @@ static int gr_gv11b_handle_sw_method(struct gk20a *g, u32 addr,
415 if (class_num == VOLTA_COMPUTE_A) { 434 if (class_num == VOLTA_COMPUTE_A) {
416 switch (offset << 2) { 435 switch (offset << 2) {
417 case NVC0C0_SET_SHADER_EXCEPTIONS: 436 case NVC0C0_SET_SHADER_EXCEPTIONS:
418 gk20a_gr_set_shader_exceptions(g, data); 437 gv11b_gr_set_shader_exceptions(g, data);
419 break; 438 break;
420 default: 439 default:
421 goto fail; 440 goto fail;
@@ -425,7 +444,7 @@ static int gr_gv11b_handle_sw_method(struct gk20a *g, u32 addr,
425 if (class_num == VOLTA_A) { 444 if (class_num == VOLTA_A) {
426 switch (offset << 2) { 445 switch (offset << 2) {
427 case NVC397_SET_SHADER_EXCEPTIONS: 446 case NVC397_SET_SHADER_EXCEPTIONS:
428 gk20a_gr_set_shader_exceptions(g, data); 447 gv11b_gr_set_shader_exceptions(g, data);
429 break; 448 break;
430 case NVC397_SET_CIRCULAR_BUFFER_SIZE: 449 case NVC397_SET_CIRCULAR_BUFFER_SIZE:
431 g->ops.gr.set_circular_buffer_size(g, data); 450 g->ops.gr.set_circular_buffer_size(g, data);