summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/pmu/pmu_pg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/pmu/pmu_pg.c')
-rw-r--r--drivers/gpu/nvgpu/common/pmu/pmu_pg.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/common/pmu/pmu_pg.c b/drivers/gpu/nvgpu/common/pmu/pmu_pg.c
index 4978708c..76ed0621 100644
--- a/drivers/gpu/nvgpu/common/pmu/pmu_pg.c
+++ b/drivers/gpu/nvgpu/common/pmu/pmu_pg.c
@@ -34,17 +34,17 @@
34 * ON => OFF is always synchronized 34 * ON => OFF is always synchronized
35 */ 35 */
36/* elpg is off */ 36/* elpg is off */
37#define PMU_ELPG_STAT_OFF 0 37#define PMU_ELPG_STAT_OFF 0U
38/* elpg is on */ 38/* elpg is on */
39#define PMU_ELPG_STAT_ON 1 39#define PMU_ELPG_STAT_ON 1U
40/* elpg is off, ALLOW cmd has been sent, wait for ack */ 40/* elpg is off, ALLOW cmd has been sent, wait for ack */
41#define PMU_ELPG_STAT_ON_PENDING 2 41#define PMU_ELPG_STAT_ON_PENDING 2U
42/* elpg is on, DISALLOW cmd has been sent, wait for ack */ 42/* elpg is on, DISALLOW cmd has been sent, wait for ack */
43#define PMU_ELPG_STAT_OFF_PENDING 3 43#define PMU_ELPG_STAT_OFF_PENDING 3U
44/* elpg is off, caller has requested on, but ALLOW 44/* elpg is off, caller has requested on, but ALLOW
45 * cmd hasn't been sent due to ENABLE_ALLOW delay 45 * cmd hasn't been sent due to ENABLE_ALLOW delay
46 */ 46 */
47#define PMU_ELPG_STAT_OFF_ON_PENDING 4 47#define PMU_ELPG_STAT_OFF_ON_PENDING 4U
48 48
49#define PMU_PGENG_GR_BUFFER_IDX_INIT (0) 49#define PMU_PGENG_GR_BUFFER_IDX_INIT (0)
50#define PMU_PGENG_GR_BUFFER_IDX_ZBC (1) 50#define PMU_PGENG_GR_BUFFER_IDX_ZBC (1)
@@ -58,7 +58,7 @@ static void pmu_handle_pg_elpg_msg(struct gk20a *g, struct pmu_msg *msg,
58 58
59 nvgpu_log_fn(g, " "); 59 nvgpu_log_fn(g, " ");
60 60
61 if (status != 0) { 61 if (status != 0U) {
62 nvgpu_err(g, "ELPG cmd aborted"); 62 nvgpu_err(g, "ELPG cmd aborted");
63 /* TBD: disable ELPG */ 63 /* TBD: disable ELPG */
64 return; 64 return;
@@ -174,7 +174,7 @@ static int pmu_enable_elpg_locked(struct gk20a *g, u32 pg_engine_id)
174 status = nvgpu_pmu_cmd_post(g, &cmd, NULL, NULL, 174 status = nvgpu_pmu_cmd_post(g, &cmd, NULL, NULL,
175 PMU_COMMAND_QUEUE_HPQ, pmu_handle_pg_elpg_msg, 175 PMU_COMMAND_QUEUE_HPQ, pmu_handle_pg_elpg_msg,
176 pmu, &seq, ~0); 176 pmu, &seq, ~0);
177 WARN_ON(status != 0); 177 WARN_ON(status != 0U);
178 178
179 nvgpu_log_fn(g, "done"); 179 nvgpu_log_fn(g, "done");
180 return 0; 180 return 0;
@@ -368,7 +368,7 @@ static void pmu_handle_pg_stat_msg(struct gk20a *g, struct pmu_msg *msg,
368 368
369 nvgpu_log_fn(g, " "); 369 nvgpu_log_fn(g, " ");
370 370
371 if (status != 0) { 371 if (status != 0U) {
372 nvgpu_err(g, "ELPG cmd aborted"); 372 nvgpu_err(g, "ELPG cmd aborted");
373 /* TBD: disable ELPG */ 373 /* TBD: disable ELPG */
374 return; 374 return;
@@ -507,7 +507,7 @@ static void pmu_handle_pg_buf_config_msg(struct gk20a *g, struct pmu_msg *msg,
507 507
508 nvgpu_pmu_dbg(g, 508 nvgpu_pmu_dbg(g,
509 "reply PMU_PG_CMD_ID_ENG_BUF_LOAD PMU_PGENG_GR_BUFFER_IDX_FECS"); 509 "reply PMU_PG_CMD_ID_ENG_BUF_LOAD PMU_PGENG_GR_BUFFER_IDX_FECS");
510 if (status != 0) { 510 if (status != 0U) {
511 nvgpu_err(g, "PGENG cmd aborted"); 511 nvgpu_err(g, "PGENG cmd aborted");
512 /* TBD: disable ELPG */ 512 /* TBD: disable ELPG */
513 return; 513 return;
@@ -549,7 +549,7 @@ int nvgpu_pmu_init_bind_fecs(struct gk20a *g)
549 g->ops.pmu_ver.pg_cmd_eng_buf_load_set_dma_base(&cmd.cmd.pg, 549 g->ops.pmu_ver.pg_cmd_eng_buf_load_set_dma_base(&cmd.cmd.pg,
550 u64_lo32(pmu->pg_buf.gpu_va)); 550 u64_lo32(pmu->pg_buf.gpu_va));
551 g->ops.pmu_ver.pg_cmd_eng_buf_load_set_dma_offset(&cmd.cmd.pg, 551 g->ops.pmu_ver.pg_cmd_eng_buf_load_set_dma_offset(&cmd.cmd.pg,
552 (u8)(pmu->pg_buf.gpu_va & 0xFF)); 552 (u8)(pmu->pg_buf.gpu_va & 0xFFU));
553 g->ops.pmu_ver.pg_cmd_eng_buf_load_set_dma_idx(&cmd.cmd.pg, 553 g->ops.pmu_ver.pg_cmd_eng_buf_load_set_dma_idx(&cmd.cmd.pg,
554 PMU_DMAIDX_VIRT); 554 PMU_DMAIDX_VIRT);
555 555
@@ -590,7 +590,7 @@ void nvgpu_pmu_setup_hw_load_zbc(struct gk20a *g)
590 g->ops.pmu_ver.pg_cmd_eng_buf_load_set_dma_base(&cmd.cmd.pg, 590 g->ops.pmu_ver.pg_cmd_eng_buf_load_set_dma_base(&cmd.cmd.pg,
591 u64_lo32(pmu->seq_buf.gpu_va)); 591 u64_lo32(pmu->seq_buf.gpu_va));
592 g->ops.pmu_ver.pg_cmd_eng_buf_load_set_dma_offset(&cmd.cmd.pg, 592 g->ops.pmu_ver.pg_cmd_eng_buf_load_set_dma_offset(&cmd.cmd.pg,
593 (u8)(pmu->seq_buf.gpu_va & 0xFF)); 593 (u8)(pmu->seq_buf.gpu_va & 0xFFU));
594 g->ops.pmu_ver.pg_cmd_eng_buf_load_set_dma_idx(&cmd.cmd.pg, 594 g->ops.pmu_ver.pg_cmd_eng_buf_load_set_dma_idx(&cmd.cmd.pg,
595 PMU_DMAIDX_VIRT); 595 PMU_DMAIDX_VIRT);
596 596