diff options
author | seshendra Gadagottu <sgadagottu@nvidia.com> | 2018-06-08 19:25:49 -0400 |
---|---|---|
committer | Tejal Kudav <tkudav@nvidia.com> | 2018-06-14 09:44:08 -0400 |
commit | ae47fa042c2b7379079d54be13df001911954b9e (patch) | |
tree | 870a5d8eb2c506c79c335608a62dad2287ac3371 /drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c | |
parent | 6a46965eb3b7b657c089142579ab20d6efefc0fc (diff) |
gpu: nvgpu: populate vsm mapping based on nonpes_aware_tpc
For gv1xx, kernel smid configuration programming is done based
on nonpes aware tpc. For user space to be in sync with hw
populate vsm mapping based on nonpes_aware_tpcs.
Bug 200405202
Change-Id: Id89291ca64c2118915dc6f18f62e17f411d467b0
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1744304
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c index cda2ce46..73a8131d 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c | |||
@@ -782,7 +782,14 @@ static int gk20a_ctrl_vsm_mapping(struct gk20a *g, | |||
782 | 782 | ||
783 | for (i = 0; i < gr->no_of_sm; i++) { | 783 | for (i = 0; i < gr->no_of_sm; i++) { |
784 | vsms_buf[i].gpc_index = gr->sm_to_cluster[i].gpc_index; | 784 | vsms_buf[i].gpc_index = gr->sm_to_cluster[i].gpc_index; |
785 | vsms_buf[i].tpc_index = gr->sm_to_cluster[i].tpc_index; | 785 | if (g->ops.gr.get_nonpes_aware_tpc) |
786 | vsms_buf[i].tpc_index = | ||
787 | g->ops.gr.get_nonpes_aware_tpc(g, | ||
788 | gr->sm_to_cluster[i].gpc_index, | ||
789 | gr->sm_to_cluster[i].tpc_index); | ||
790 | else | ||
791 | vsms_buf[i].tpc_index = | ||
792 | gr->sm_to_cluster[i].tpc_index; | ||
786 | } | 793 | } |
787 | 794 | ||
788 | err = copy_to_user((void __user *)(uintptr_t) | 795 | err = copy_to_user((void __user *)(uintptr_t) |