{
struct dcn_dccg *dccg_dcn = TO_DCN_DCCG(dccg);
- if (dccg->ctx->dc->debug.root_clock_optimization.bits.hdmistream)
- REG_UPDATE(DCCG_GATE_DISABLE_CNTL6, HDMISTREAMCLK0_ROOT_GATE_DISABLE, enable ? 1 : 0);
+ if (!dccg->ctx->dc->debug.root_clock_optimization.bits.hdmistream && !enable) {
+ DC_LOG_DEBUG("%s: HDMISTREAMCLK0_ROOT_GATE DISABLE = 0 bypassed", __func__);
+ return;
+ }
+ REG_UPDATE(DCCG_GATE_DISABLE_CNTL6, HDMISTREAMCLK0_ROOT_GATE_DISABLE, enable ? 1 : 0);
DC_LOG_DEBUG("%s: HDMISTREAMCLK0_ROOT_GATE_DISABLE = %d\n", __func__, enable ? 1 : 0);
}
void dcn35_dpp_root_clock_control(struct dce_hwseq *hws, unsigned int dpp_inst, bool clock_on)
{
- if (!hws->ctx->dc->debug.root_clock_optimization.bits.dpp)
+ if (!hws->ctx->dc->debug.root_clock_optimization.bits.dpp && !clock_on)
return;
if (hws->ctx->dc->res_pool->dccg->funcs->dpp_root_clock_control) {
void dcn35_dpstream_root_clock_control(struct dce_hwseq *hws, unsigned int dp_hpo_inst, bool clock_on)
{
- if (!hws->ctx->dc->debug.root_clock_optimization.bits.dpstream)
+ if (!hws->ctx->dc->debug.root_clock_optimization.bits.dpstream && !clock_on)
return;
if (hws->ctx->dc->res_pool->dccg->funcs->set_dpstreamclk_root_clock_gating) {
void dcn35_hdmistream_root_clock_control(struct dce_hwseq *hws, bool clock_on)
{
- if (!hws->ctx->dc->debug.root_clock_optimization.bits.hdmistream)
+ if (!hws->ctx->dc->debug.root_clock_optimization.bits.hdmistream && !clock_on)
return;
if (hws->ctx->dc->res_pool->dccg->funcs->set_hdmistreamclk_root_clock_gating) {
void dcn35_physymclk_root_clock_control(struct dce_hwseq *hws, unsigned int phy_inst, bool clock_on)
{
- if (!hws->ctx->dc->debug.root_clock_optimization.bits.physymclk)
+ if (!hws->ctx->dc->debug.root_clock_optimization.bits.physymclk && !clock_on)
return;
if (hws->ctx->dc->res_pool->dccg->funcs->set_physymclk_root_clock_gating) {