From d3b8415948de8c9ffe2f2fa66340dd7e71a894e6 Mon Sep 17 00:00:00 2001 From: Deepak Goyal Date: Mon, 16 Jul 2018 11:10:23 +0530 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1742422 Reviewed-by: svc-misra-checker GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h') 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 { u32 class, u32 padding); void (*free_gr_ctx)(struct gk20a *g, struct vm_gk20a *vm, struct nvgpu_gr_ctx *gr_ctx); + void (*powergate_tpc)(struct gk20a *g); void (*update_ctxsw_preemption_mode)(struct gk20a *g, struct channel_gk20a *c, struct nvgpu_mem *mem); @@ -1361,6 +1362,8 @@ struct gk20a { u64 log_mask; u32 log_trace; + struct nvgpu_mutex tpc_pg_lock; + struct nvgpu_gpu_params params; /* @@ -1532,6 +1535,11 @@ struct gk20a { u32 tpc_fs_mask_user; + u32 tpc_pg_mask; + bool can_tpc_powergate; + + u32 valid_tpc_mask; + struct nvgpu_bios bios; bool bios_is_init; -- cgit v1.2.2