summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
diff options
context:
space:
mode:
authorseshendra Gadagottu <sgadagottu@nvidia.com>2017-01-24 18:38:02 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-05-10 17:16:06 -0400
commit2baab4e49e8bb2d5c25759660bc1ae2382d9cb1b (patch)
tree268411c22d20b9245676a192e85b63f55e005f1c /drivers/gpu/nvgpu/gm20b/gr_gm20b.c
parent8b981f3c64897128fd2a94c03a819bbca5edd4da (diff)
gpu: nvgpu: changes related to preemption
Added function pointers to check chip specific valid gfx class and compute class. Also added function pointer to update ctx header with preemption buffer pointers. Bug 200292090 Change-Id: I8119ee082e2abb67186a8ac07088f8db7f410ba1 Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/1293502 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/gr_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/gr_gm20b.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
index 717e5487..99bccd0e 100644
--- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
@@ -474,6 +474,23 @@ static bool gr_gm20b_is_valid_class(struct gk20a *g, u32 class_num)
474 return valid; 474 return valid;
475} 475}
476 476
477static bool gr_gm20b_is_valid_gfx_class(struct gk20a *g, u32 class_num)
478{
479 if (class_num == MAXWELL_B)
480 return true;
481 else
482 return false;
483}
484
485static bool gr_gm20b_is_valid_compute_class(struct gk20a *g, u32 class_num)
486{
487 if (class_num == MAXWELL_COMPUTE_B)
488 return true;
489 else
490 return false;
491}
492
493
477/* Following are the blocks of registers that the ucode 494/* Following are the blocks of registers that the ucode
478 stores in the extended region.*/ 495 stores in the extended region.*/
479/* == ctxsw_extended_sm_dsm_perf_counter_register_stride_v() ? */ 496/* == ctxsw_extended_sm_dsm_perf_counter_register_stride_v() ? */
@@ -1527,6 +1544,8 @@ void gm20b_init_gr(struct gpu_ops *gops)
1527 gops->gr.set_circular_buffer_size = gr_gm20b_set_circular_buffer_size; 1544 gops->gr.set_circular_buffer_size = gr_gm20b_set_circular_buffer_size;
1528 gops->gr.enable_hww_exceptions = gr_gk20a_enable_hww_exceptions; 1545 gops->gr.enable_hww_exceptions = gr_gk20a_enable_hww_exceptions;
1529 gops->gr.is_valid_class = gr_gm20b_is_valid_class; 1546 gops->gr.is_valid_class = gr_gm20b_is_valid_class;
1547 gops->gr.is_valid_gfx_class = gr_gm20b_is_valid_gfx_class;
1548 gops->gr.is_valid_compute_class = gr_gm20b_is_valid_compute_class;
1530 gops->gr.get_sm_dsm_perf_regs = gr_gm20b_get_sm_dsm_perf_regs; 1549 gops->gr.get_sm_dsm_perf_regs = gr_gm20b_get_sm_dsm_perf_regs;
1531 gops->gr.get_sm_dsm_perf_ctrl_regs = gr_gm20b_get_sm_dsm_perf_ctrl_regs; 1550 gops->gr.get_sm_dsm_perf_ctrl_regs = gr_gm20b_get_sm_dsm_perf_ctrl_regs;
1532 gops->gr.init_fs_state = gr_gm20b_init_fs_state; 1551 gops->gr.init_fs_state = gr_gm20b_init_fs_state;