summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.h
diff options
context:
space:
mode:
authorDeepak Goyal <dgoyal@nvidia.com>2018-07-16 01:40:23 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-07-24 02:52:39 -0400
commitd3b8415948de8c9ffe2f2fa66340dd7e71a894e6 (patch)
tree328970819ace31fae3bf3bc27376121330064db9 /drivers/gpu/nvgpu/gk20a/gk20a.h
parent2df33e32e40eb2c8e025f8d27396d9b5cdb3ac11 (diff)
gpu: nvgpu: tpc powergating through sysfs
- adds static tpc-powergating through sysfs. - active tpc count will remain till the GPU/systems is not booted again. - tpc_pg_mask can be written only after GPU probe finishes and GPU boot is triggered. Note: To be able to use this feature, we need to change boot/init scripts of the OS(used with nvgpu driver) to write to sysfs nodes before posting discover image size query to FECS. Bug 200406784 Change-Id: Id749c7a617422c625f77d0c1a9aada2eb960c4d0 Signed-off-by: Deepak Goyal <dgoyal@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1742422 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 948d8e60..4934958c 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -307,6 +307,7 @@ struct gpu_ops {
307 u32 class, u32 padding); 307 u32 class, u32 padding);
308 void (*free_gr_ctx)(struct gk20a *g, 308 void (*free_gr_ctx)(struct gk20a *g,
309 struct vm_gk20a *vm, struct nvgpu_gr_ctx *gr_ctx); 309 struct vm_gk20a *vm, struct nvgpu_gr_ctx *gr_ctx);
310 void (*powergate_tpc)(struct gk20a *g);
310 void (*update_ctxsw_preemption_mode)(struct gk20a *g, 311 void (*update_ctxsw_preemption_mode)(struct gk20a *g,
311 struct channel_gk20a *c, 312 struct channel_gk20a *c,
312 struct nvgpu_mem *mem); 313 struct nvgpu_mem *mem);
@@ -1361,6 +1362,8 @@ struct gk20a {
1361 u64 log_mask; 1362 u64 log_mask;
1362 u32 log_trace; 1363 u32 log_trace;
1363 1364
1365 struct nvgpu_mutex tpc_pg_lock;
1366
1364 struct nvgpu_gpu_params params; 1367 struct nvgpu_gpu_params params;
1365 1368
1366 /* 1369 /*
@@ -1532,6 +1535,11 @@ struct gk20a {
1532 1535
1533 u32 tpc_fs_mask_user; 1536 u32 tpc_fs_mask_user;
1534 1537
1538 u32 tpc_pg_mask;
1539 bool can_tpc_powergate;
1540
1541 u32 valid_tpc_mask;
1542
1535 struct nvgpu_bios bios; 1543 struct nvgpu_bios bios;
1536 bool bios_is_init; 1544 bool bios_is_init;
1537 1545