disp: msm: dp: skip crc read if pclk is not on

The DP debugfs node for CRC read currently does not check
if the panel is enabled before attempting the read. This
could cause unclocked access of DP registers. This change
adds the necessary protection and bails out if the clocks
are not turned on.

Change-Id: Ia555e2473fc9f0f7434ee3665eb4fb7cfb4f97cf
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
This commit is contained in:
Rajkumar Subbiah
2023-03-03 12:01:33 -05:00
parent c3622fa326
commit da304b72c6
3 changed files with 6 additions and 0 deletions

View File

@@ -1286,6 +1286,7 @@ static int dp_ctrl_stream_on(struct dp_ctrl *dp_ctrl, struct dp_panel *panel)
return rc;
}
panel->pclk_on = true;
rc = panel->hw_cfg(panel, true);
if (rc)
return rc;
@@ -1376,6 +1377,7 @@ static void dp_ctrl_stream_off(struct dp_ctrl *dp_ctrl, struct dp_panel *panel)
panel->hw_cfg(panel, false);
panel->pclk_on = false;
dp_ctrl_disable_stream_clocks(ctrl, panel);
ctrl->stream_count--;
}