summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/clk/clk_arb.c
diff options
context:
space:
mode:
authorTejal Kudav <tkudav@nvidia.com>2017-07-28 02:50:52 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-09-27 06:08:05 -0400
commit20b746b485be79abd0b9d1aedc8fb9cd741e5183 (patch)
tree52b5fd2f09f39e4287f86a254837c3668b9ec992 /drivers/gpu/nvgpu/clk/clk_arb.c
parent84741589d691246a404928e3070e229a87e3f835 (diff)
gpu: nvgpu: Selectively disable/enable CFC
clk_pmu_freq_controller_load used the default mask and affected all the clock frequency controllers (CFC) which had their bits set in the mask. We wish to enable/disable the CFCs in isolation through debugfs. So we add a parameter(bit_idx) to the function which will help affect only one CFC at a time JIRA DNVGPU-207 DEPENDS ON: <http://git-master/r/1563302> Change-Id: I233f52158b4a987bcc058a425380983dbe53fac8 Signed-off-by: Tejal Kudav <tkudav@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1563303 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/clk/clk_arb.c')
-rw-r--r--drivers/gpu/nvgpu/clk/clk_arb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_arb.c b/drivers/gpu/nvgpu/clk/clk_arb.c
index ac37d03f..8c27b613 100644
--- a/drivers/gpu/nvgpu/clk/clk_arb.c
+++ b/drivers/gpu/nvgpu/clk/clk_arb.c
@@ -1178,7 +1178,8 @@ static void nvgpu_clk_arb_run_arbiter_cb(struct work_struct *work)
1178 nvgpu_mutex_acquire(&arb->pstate_lock); 1178 nvgpu_mutex_acquire(&arb->pstate_lock);
1179 status = nvgpu_lpwr_disable_pg(g, false); 1179 status = nvgpu_lpwr_disable_pg(g, false);
1180 1180
1181 status = clk_pmu_freq_controller_load(g, false); 1181 status = clk_pmu_freq_controller_load(g, false,
1182 CTRL_CLK_CLK_FREQ_CONTROLLER_ID_ALL);
1182 if (status < 0) { 1183 if (status < 0) {
1183 arb->status = status; 1184 arb->status = status;
1184 nvgpu_mutex_release(&arb->pstate_lock); 1185 nvgpu_mutex_release(&arb->pstate_lock);
@@ -1209,7 +1210,8 @@ static void nvgpu_clk_arb_run_arbiter_cb(struct work_struct *work)
1209 goto exit_arb; 1210 goto exit_arb;
1210 } 1211 }
1211 1212
1212 status = clk_pmu_freq_controller_load(g, true); 1213 status = clk_pmu_freq_controller_load(g, true,
1214 CTRL_CLK_CLK_FREQ_CONTROLLER_ID_ALL);
1213 if (status < 0) { 1215 if (status < 0) {
1214 arb->status = status; 1216 arb->status = status;
1215 nvgpu_mutex_release(&arb->pstate_lock); 1217 nvgpu_mutex_release(&arb->pstate_lock);