summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2018-09-21 02:36:36 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-24 13:14:56 -0400
commite16843c2efdffa13c15cc0a014b2a5598cc2f4ec (patch)
tree2942e8a53e954ab30b564a3eb07efc8c10270e10 /drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c
parent2a26075b8408b45d18920e3f4ca08a457b23a7e0 (diff)
gpu: nvgpu: read GPC mask from h/w
In gk20a_ctrl_ioctl_gpu_characteristics() we right now just calculate GPC mask in s/w and return to user space But this could give incorrect result as any GPC could be floorswept in h/w Add gops.fuse.fuse_status_opt_gpc() to read GPC floorsweep status from fuse Add gops.gr.get_gpc_mask() to get actual GPC mask from h/w Set these HALs only for dGPUs right now. Fuse register to read GPC mask is not yet supported in simulation and hence simulation boot fails These HALs will be set for iGPU once simulation issue is resolved Use gops.gr.get_gpc_mask() if it is defined in gk20a_ctrl_ioctl_gpu_characteristics() to send the actual GPC mask to user space Jira NVGPUT-132 Change-Id: I3b552de07883328fcfa41d4334ec0d777e04bdd3 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1822811 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c')
-rw-r--r--drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c
index 19b4286d..e8ed63f4 100644
--- a/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c
+++ b/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c
@@ -262,7 +262,11 @@ gk20a_ctrl_ioctl_gpu_characteristics(
262 262
263 gpu.compression_page_size = g->ops.fb.compression_page_size(g); 263 gpu.compression_page_size = g->ops.fb.compression_page_size(g);
264 264
265 gpu.gpc_mask = (1 << g->gr.gpc_count)-1; 265 if (g->ops.gr.get_gpc_mask) {
266 gpu.gpc_mask = g->ops.gr.get_gpc_mask(g);
267 } else {
268 gpu.gpc_mask = BIT32(g->gr.gpc_count) - 1;
269 }
266 270
267 gpu.flags = nvgpu_ctrl_ioctl_gpu_characteristics_flags(g); 271 gpu.flags = nvgpu_ctrl_ioctl_gpu_characteristics_flags(g);
268 272