From 0ffc5fa5e44c623b6fde3d6bed5369b9674ee089 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 9 Jul 2019 15:12:32 +0530 Subject: gpu: nvgpu: add clock gating support for HSHUB Add BLCG and SLCG clock gating support for HSHUB unit on gv11b Register list for BLCG and SLCG is auto generated with scripts. Add HAL operations to enable/disable HSHUB clock gating Re-generate gv11b reglist so that all the manually commented registers are automatically deleted. Some of the unicast registers are also deleted. We already have corresponding broadcast registers present. Cherry-pick/manually port from dev-main Bug 2526212 Change-Id: I2654f158daa802bcf992e103ed4a44675aa5fd4d Signed-off-by: Deepak Nibade Reviewed-on: https://git-master.nvidia.com/r/2150199 (cherry picked from commit e34b6f76d38ad5641c1ed7c3a4b36752d9dd4750) Reviewed-on: https://git-master.nvidia.com/r/2224708 Reviewed-by: Seshendra Gadagottu GVS: Gerrit_Virtual_Submit Tested-by: Peter Daifuku Reviewed-by: Luis Dib Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/power_features/cg/cg.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'drivers/gpu/nvgpu/common/power_features/cg') diff --git a/drivers/gpu/nvgpu/common/power_features/cg/cg.c b/drivers/gpu/nvgpu/common/power_features/cg/cg.c index a538c44b..39796bc8 100644 --- a/drivers/gpu/nvgpu/common/power_features/cg/cg.c +++ b/drivers/gpu/nvgpu/common/power_features/cg/cg.c @@ -428,6 +428,9 @@ void nvgpu_cg_init_gr_load_gating_prod(struct gk20a *g) if (g->ops.clock_gating.slcg_xbar_load_gating_prod != NULL) { g->ops.clock_gating.slcg_xbar_load_gating_prod(g, true); } + if (g->ops.clock_gating.slcg_hshub_load_gating_prod != NULL) { + g->ops.clock_gating.slcg_hshub_load_gating_prod(g, true); + } check_can_blcg: if (!nvgpu_is_enabled(g, NVGPU_GPU_CAN_BLCG)) { @@ -449,6 +452,9 @@ check_can_blcg: if (g->ops.clock_gating.blcg_xbar_load_gating_prod != NULL) { g->ops.clock_gating.blcg_xbar_load_gating_prod(g, true); } + if (g->ops.clock_gating.blcg_hshub_load_gating_prod != NULL) { + g->ops.clock_gating.blcg_hshub_load_gating_prod(g, true); + } pg_gr_load: if (g->ops.clock_gating.pg_gr_load_gating_prod != NULL) { g->ops.clock_gating.pg_gr_load_gating_prod(g, true); @@ -538,6 +544,9 @@ void nvgpu_cg_blcg_set_blcg_enabled(struct gk20a *g, bool enable) if (g->ops.clock_gating.blcg_xbar_load_gating_prod != NULL) { g->ops.clock_gating.blcg_xbar_load_gating_prod(g, enable); } + if (g->ops.clock_gating.blcg_hshub_load_gating_prod != NULL) { + g->ops.clock_gating.blcg_hshub_load_gating_prod(g, enable); + } done: nvgpu_mutex_release(&g->cg_pg_lock); @@ -610,6 +619,9 @@ void nvgpu_cg_slcg_set_slcg_enabled(struct gk20a *g, bool enable) if (g->ops.clock_gating.slcg_xbar_load_gating_prod != NULL) { g->ops.clock_gating.slcg_xbar_load_gating_prod(g, enable); } + if (g->ops.clock_gating.slcg_hshub_load_gating_prod != NULL) { + g->ops.clock_gating.slcg_hshub_load_gating_prod(g, enable); + } done: nvgpu_mutex_release(&g->cg_pg_lock); -- cgit v1.2.2