struct dcn_pg_cntl *pg_cntl_dcn = TO_DCN_PG_CNTL(pg_cntl);
uint32_t pwr_status = 0;
- if (pg_cntl->ctx->dc->debug.ignore_pg)
- return true;
-
switch (dsc_inst) {
case 0: /* DSC0 */
REG_GET(DOMAIN16_PG_STATUS, DOMAIN_PGFSM_PWR_STATUS, &pwr_status);
pg_cntl->ctx->dc->res_pool->dccg->funcs->enable_dsc(
pg_cntl->ctx->dc->res_pool->dccg, dsc_inst);
- if (pg_cntl->ctx->dc->debug.ignore_pg ||
- pg_cntl->ctx->dc->debug.disable_dsc_power_gate ||
- pg_cntl->ctx->dc->idle_optimizations_allowed)
+ bool skip_pg = pg_cntl->ctx->dc->debug.ignore_pg ||
+ pg_cntl->ctx->dc->debug.disable_dsc_power_gate ||
+ pg_cntl->ctx->dc->idle_optimizations_allowed;
+
+ if (skip_pg && !power_on)
return;
block_enabled = pg_cntl42_dsc_pg_status(pg_cntl, dsc_inst);
uint32_t power_forceon;
bool block_enabled;
- if (pg_cntl->ctx->dc->debug.ignore_pg ||
- pg_cntl->ctx->dc->debug.disable_hpo_power_gate ||
- pg_cntl->ctx->dc->idle_optimizations_allowed)
- return;
+ bool skip_pg = pg_cntl->ctx->dc->debug.ignore_pg ||
+ pg_cntl->ctx->dc->debug.disable_hpo_power_gate ||
+ pg_cntl->ctx->dc->idle_optimizations_allowed;
+ if (skip_pg && !power_on)
+ return;
block_enabled = pg_cntl42_hpo_pg_status(pg_cntl);
if (power_on) {
if (block_enabled)
uint32_t power_forceon;
bool block_enabled;
- if (pg_cntl->ctx->dc->debug.ignore_pg ||
- pg_cntl->ctx->dc->idle_optimizations_allowed ||
- pg_cntl->ctx->dc->debug.disable_io_clk_power_gate)
+ bool skip_pg = pg_cntl->ctx->dc->debug.ignore_pg ||
+ pg_cntl->ctx->dc->idle_optimizations_allowed ||
+ pg_cntl->ctx->dc->debug.disable_io_clk_power_gate;
+
+ if (skip_pg && !power_on)
return;
block_enabled = pg_cntl42_io_clk_status(pg_cntl);
uint32_t power_forceon;
bool block_enabled;
- if (pg_cntl->ctx->dc->debug.ignore_pg ||
- pg_cntl->ctx->dc->idle_optimizations_allowed ||
- pg_cntl->ctx->dc->debug.disable_mem_power_gate)
+ bool skip_pg = pg_cntl->ctx->dc->debug.ignore_pg ||
+ pg_cntl->ctx->dc->idle_optimizations_allowed ||
+ pg_cntl->ctx->dc->debug.disable_mem_power_gate;
+
+ if (skip_pg && !power_on)
return;
block_enabled = pg_cntl42_mem_status(pg_cntl);
uint32_t org_ip_request_cntl;
bool block_enabled;
- if (pg_cntl->ctx->dc->debug.ignore_pg ||
- pg_cntl->ctx->dc->idle_optimizations_allowed ||
- pg_cntl->ctx->dc->debug.disable_dio_power_gate)
+ bool skip_pg = pg_cntl->ctx->dc->debug.ignore_pg ||
+ pg_cntl->ctx->dc->idle_optimizations_allowed ||
+ pg_cntl->ctx->dc->debug.disable_dio_power_gate;
+ if (skip_pg && !power_on)
return;
block_enabled = pg_cntl42_dio_pg_status(pg_cntl);