gpu: nvgpu: nvgpu_pmu_enable_elpg to return status

nvgpu_pmu_enable_elpg was always returning 0 when a proper
status could be returned instead. This patch fixes the issue
and makes use of it in fifo_gv11b.

JIRA NVGPU-677

Change-Id: Idfcae786ce40ca5498e527e61b2b5cbb1fd1413c
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1996855
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Nicolas Benech
2019-01-16 17:09:59 -05:00
committed by mobile promotions
parent a93b350c67
commit 6cbae2c28f
2 changed files with 11 additions and 4 deletions

View File

@@ -178,10 +178,15 @@ static int pmu_enable_elpg_locked(struct gk20a *g, u8 pg_engine_id)
status = nvgpu_pmu_cmd_post(g, &cmd, NULL, NULL,
PMU_COMMAND_QUEUE_HPQ, pmu_handle_pg_elpg_msg,
pmu, &seq);
WARN_ON(status != 0);
nvgpu_log_fn(g, "done");
return 0;
if (status != 0) {
nvgpu_log_fn(g, "pmu_enable_elpg_locked FAILED err=%d",
status);
} else {
nvgpu_log_fn(g, "done");
}
return status;
}
int nvgpu_pmu_enable_elpg(struct gk20a *g)

View File

@@ -1279,7 +1279,9 @@ void gv11b_fifo_teardown_ch_tsg(struct gk20a *g, u32 act_eng_bitmask,
/* It is safe to enable ELPG again. */
if (g->support_pmu && g->elpg_enabled) {
nvgpu_pmu_enable_elpg(g);
if (nvgpu_pmu_enable_elpg(g) != 0) {
nvgpu_err(g, "ELPG enable failed");
}
}
/* release runlist_lock */