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 --- .../gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h index 90994a53..473eaff4 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h @@ -1572,6 +1572,42 @@ static inline u32 gr_fe_tpc_fs_r(u32 i) { return 0x0040a200U + i*4U; } +static inline u32 gr_fe_tpc_pesmask_r(void) +{ + return 0x0040a260U; +} +static inline u32 gr_fe_tpc_pesmask_pesid_f(u32 v) +{ + return (v & 0x3fU) << 24U; +} +static inline u32 gr_fe_tpc_pesmask_gpcid_f(u32 v) +{ + return (v & 0xffU) << 16U; +} +static inline u32 gr_fe_tpc_pesmask_action_m(void) +{ + return 0x1U << 30U; +} +static inline u32 gr_fe_tpc_pesmask_action_write_f(void) +{ + return 0x40000000U; +} +static inline u32 gr_fe_tpc_pesmask_action_read_f(void) +{ + return 0x0U; +} +static inline u32 gr_fe_tpc_pesmask_req_m(void) +{ + return 0x1U << 31U; +} +static inline u32 gr_fe_tpc_pesmask_req_send_f(void) +{ + return 0x80000000U; +} +static inline u32 gr_fe_tpc_pesmask_mask_m(void) +{ + return 0xffffU << 0U; +} static inline u32 gr_pri_mme_shadow_raw_index_r(void) { return 0x00404488U; -- cgit v1.2.2