diff options
author | Richard Zhao <rizhao@nvidia.com> | 2018-08-01 14:38:17 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-08-06 20:36:26 -0400 |
commit | 6c9daf7626567fffc9d1ccd475865e81ae90a973 (patch) | |
tree | 0a088733457ce95943582a955b4b2492200732ca /drivers/gpu/nvgpu/os/linux | |
parent | 9b9a54920511d560d114881a923437fb88deffad (diff) |
gpu: nvgpu: fix gpc_tpc_mask to use max_gpc_count
gpc_tpc_mask uses gpc/tpc IDs directly read from fuse, so it needs to
use max_gpc_count for any possible cases rather not gpc_count.
Bug 2302005
Change-Id: I903ee3e0c10c4b329dd0d76c40d3516dc36ed303
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1790464
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux')
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c index f7de17ad..e87d5822 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c | |||
@@ -515,7 +515,7 @@ static int gk20a_ctrl_get_tpc_masks(struct gk20a *g, | |||
515 | { | 515 | { |
516 | struct gr_gk20a *gr = &g->gr; | 516 | struct gr_gk20a *gr = &g->gr; |
517 | int err = 0; | 517 | int err = 0; |
518 | const u32 gpc_tpc_mask_size = sizeof(u32) * gr->gpc_count; | 518 | const u32 gpc_tpc_mask_size = sizeof(u32) * gr->max_gpc_count; |
519 | 519 | ||
520 | if (args->mask_buf_size > 0) { | 520 | if (args->mask_buf_size > 0) { |
521 | size_t write_size = gpc_tpc_mask_size; | 521 | size_t write_size = gpc_tpc_mask_size; |