}
+static bool dcn35_is_ips_supported(struct clk_mgr *clk_mgr_base)
+{
+ struct clk_mgr_internal *clk_mgr = TO_CLK_MGR_INTERNAL(clk_mgr_base);
+ bool ips_supported = true;
+
+ ips_supported = dcn35_smu_get_ips_supported(clk_mgr) ? true : false;
+
+ return ips_supported;
+}
+
static void dcn35_init_clocks_fpga(struct clk_mgr *clk_mgr)
{
dcn35_init_clocks(clk_mgr);
.notify_wm_ranges = dcn35_notify_wm_ranges,
.set_low_power_state = dcn35_set_low_power_state,
.exit_low_power_state = dcn35_exit_low_power_state,
+ .is_ips_supported = dcn35_is_ips_supported,
};
struct clk_mgr_funcs dcn35_fpga_funcs = {
dm_helpers_free_gpu_mem(clk_mgr->base.base.ctx, DC_MEM_ALLOC_TYPE_FRAME_BUFFER,
smu_dpm_clks.dpm_clks);
+ if (dcn35_smu_get_ips_supported(&clk_mgr->base)) {
+ ctx->dc->debug.ignore_pg = false;
+ ctx->dc->debug.dmcub_emulation = false;
+ ctx->dc->debug.disable_dpp_power_gate = false;
+ ctx->dc->debug.disable_hubp_power_gate = false;
+ ctx->dc->debug.disable_dsc_power_gate = false;
+ }
}
void dcn35_clk_mgr_destroy(struct clk_mgr_internal *clk_mgr_int)
#define VBIOSSMC_MSG_SetDtbClk 0x17
#define VBIOSSMC_MSG_DispPsrEntry 0x18 ///< Display PSR entry, DMU
#define VBIOSSMC_MSG_DispPsrExit 0x19 ///< Display PSR exit, DMU
-#define VBIOSSMC_Message_Count 0x1A
+#define VBIOSSMC_MSG_DisableLSdma 0x1A ///< Disable LSDMA; only sent by VBIOS
+#define VBIOSSMC_MSG_DpControllerPhyStatus 0x1B ///< Inform PMFW about the pre conditions for turning SLDO2 on/off . bit[0]==1 precondition is met, bit[1-2] are for DPPHY number
+#define VBIOSSMC_MSG_QueryIPS2Support 0x1C ///< Return 1: support; else not supported
+#define VBIOSSMC_Message_Count 0x1D
#define VBIOSSMC_Status_BUSY 0x0
#define VBIOSSMC_Result_OK 0x1
VBIOSSMC_MSG_DispPsrExit,
0);
}
+
+int dcn35_smu_get_ips_supported(struct clk_mgr_internal *clk_mgr)
+{
+ return dcn35_smu_send_msg_with_param(
+ clk_mgr,
+ VBIOSSMC_MSG_QueryIPS2Support,
+ 0);
+}
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.disable_dsc_power_gate)
- return;
-
- if (pg_cntl->ctx->dc->idle_optimizations_allowed)
+ if (pg_cntl->ctx->dc->debug.ignore_pg ||
+ pg_cntl->ctx->dc->debug.disable_dsc_power_gate ||
+ pg_cntl->ctx->dc->idle_optimizations_allowed)
return;
block_enabled = pg_cntl35_dsc_pg_status(pg_cntl, dsc_inst);
if (!block_enabled)
return;
}
- if (pg_cntl->ctx->dc->debug.ignore_pg)
- return;
+
REG_GET(DC_IP_REQUEST_CNTL, IP_REQUEST_EN, &org_ip_request_cntl);
if (org_ip_request_cntl == 0)
REG_SET(DC_IP_REQUEST_CNTL, 0, IP_REQUEST_EN, 1);
uint32_t org_ip_request_cntl;
bool block_enabled;
- if (!power_on)
- return;
- if (pg_cntl->ctx->dc->debug.disable_hubp_power_gate ||
- pg_cntl->ctx->dc->debug.disable_dpp_power_gate)
- return;
-
- if (pg_cntl->ctx->dc->idle_optimizations_allowed)
+ if (pg_cntl->ctx->dc->debug.ignore_pg ||
+ pg_cntl->ctx->dc->debug.disable_hubp_power_gate ||
+ pg_cntl->ctx->dc->debug.disable_dpp_power_gate ||
+ pg_cntl->ctx->dc->idle_optimizations_allowed)
return;
block_enabled = pg_cntl35_hubp_dpp_pg_status(pg_cntl, hubp_dpp_inst);
if (!block_enabled)
return;
}
- if (pg_cntl->ctx->dc->debug.ignore_pg)
- return;
+
REG_GET(DC_IP_REQUEST_CNTL, IP_REQUEST_EN, &org_ip_request_cntl);
if (org_ip_request_cntl == 0)
REG_SET(DC_IP_REQUEST_CNTL, 0, IP_REQUEST_EN, 1);
uint32_t org_ip_request_cntl;
bool block_enabled;
- if (pg_cntl->ctx->dc->idle_optimizations_allowed)
+ if (pg_cntl->ctx->dc->debug.ignore_pg ||
+ pg_cntl->ctx->dc->idle_optimizations_allowed)
return;
block_enabled = pg_cntl35_hpo_pg_status(pg_cntl);
if (!block_enabled)
return;
}
- if (pg_cntl->ctx->dc->debug.ignore_pg)
- return;
+
REG_GET(DC_IP_REQUEST_CNTL, IP_REQUEST_EN, &org_ip_request_cntl);
if (org_ip_request_cntl == 0)
REG_SET(DC_IP_REQUEST_CNTL, 0, IP_REQUEST_EN, 1);
uint32_t org_ip_request_cntl;
bool block_enabled;
- if (!power_on)
- return;
- if (pg_cntl->ctx->dc->idle_optimizations_allowed)
+ if (pg_cntl->ctx->dc->debug.ignore_pg ||
+ pg_cntl->ctx->dc->idle_optimizations_allowed)
return;
block_enabled = pg_cntl35_io_clk_status(pg_cntl);
if (!block_enabled)
return;
}
- if (pg_cntl->ctx->dc->debug.ignore_pg)
- return;
+
REG_GET(DC_IP_REQUEST_CNTL, IP_REQUEST_EN, &org_ip_request_cntl);
if (org_ip_request_cntl == 0)
REG_SET(DC_IP_REQUEST_CNTL, 0, IP_REQUEST_EN, 1);
void pg_cntl35_mpcc_pg_control(struct pg_cntl *pg_cntl,
unsigned int mpcc_inst, bool power_on)
{
-
if (pg_cntl->ctx->dc->idle_optimizations_allowed)
return;
void pg_cntl35_opp_pg_control(struct pg_cntl *pg_cntl,
unsigned int opp_inst, bool power_on)
{
-
if (pg_cntl->ctx->dc->idle_optimizations_allowed)
return;
void pg_cntl35_optc_pg_control(struct pg_cntl *pg_cntl,
unsigned int optc_inst, bool power_on)
{
-
if (pg_cntl->ctx->dc->idle_optimizations_allowed)
return;
bool all_mpcc_disabled = true, all_opp_disabled = true;
bool all_optc_disabled = true, all_stream_disabled = true;
- if (pg_cntl->ctx->dc->debug.disable_optc_power_gate)
- return;
-
- if (!power_on)
- return;
- if (pg_cntl->ctx->dc->idle_optimizations_allowed)
+ if (pg_cntl->ctx->dc->debug.ignore_pg ||
+ pg_cntl->ctx->dc->debug.disable_optc_power_gate ||
+ pg_cntl->ctx->dc->idle_optimizations_allowed)
return;
block_enabled = pg_cntl35_plane_otg_status(pg_cntl);
|| !all_stream_disabled || pg_cntl->pg_res_enable[PG_DWB])
return;
}
- if (pg_cntl->ctx->dc->debug.ignore_pg)
- return;
+
REG_GET(DC_IP_REQUEST_CNTL, IP_REQUEST_EN, &org_ip_request_cntl);
if (org_ip_request_cntl == 0)
REG_SET(DC_IP_REQUEST_CNTL, 0, IP_REQUEST_EN, 1);