Merge "disp: msm: dsi: invoke DSI soft reset when video engine is stuck"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
a27dce97f8
@@ -63,6 +63,7 @@ static void dsi_catalog_cmn_init(struct dsi_ctrl_hw *ctrl,
|
|||||||
ctrl->ops.wait4dynamic_refresh_done =
|
ctrl->ops.wait4dynamic_refresh_done =
|
||||||
dsi_ctrl_hw_cmn_wait4dynamic_refresh_done;
|
dsi_ctrl_hw_cmn_wait4dynamic_refresh_done;
|
||||||
ctrl->ops.hs_req_sel = dsi_ctrl_hw_cmn_hs_req_sel;
|
ctrl->ops.hs_req_sel = dsi_ctrl_hw_cmn_hs_req_sel;
|
||||||
|
ctrl->ops.vid_engine_busy = dsi_ctrl_hw_cmn_vid_engine_busy;
|
||||||
|
|
||||||
switch (version) {
|
switch (version) {
|
||||||
case DSI_CTRL_VERSION_1_4:
|
case DSI_CTRL_VERSION_1_4:
|
||||||
|
@@ -263,6 +263,7 @@ void dsi_phy_hw_v3_0_dyn_refresh_pipe_delay(struct dsi_phy_hw *phy,
|
|||||||
struct dsi_dyn_clk_delay *delay);
|
struct dsi_dyn_clk_delay *delay);
|
||||||
|
|
||||||
int dsi_ctrl_hw_cmn_wait4dynamic_refresh_done(struct dsi_ctrl_hw *ctrl);
|
int dsi_ctrl_hw_cmn_wait4dynamic_refresh_done(struct dsi_ctrl_hw *ctrl);
|
||||||
|
bool dsi_ctrl_hw_cmn_vid_engine_busy(struct dsi_ctrl_hw *ctrl);
|
||||||
int dsi_phy_hw_v3_0_cache_phy_timings(struct dsi_phy_per_lane_cfgs *timings,
|
int dsi_phy_hw_v3_0_cache_phy_timings(struct dsi_phy_per_lane_cfgs *timings,
|
||||||
u32 *dst, u32 size);
|
u32 *dst, u32 size);
|
||||||
|
|
||||||
|
@@ -3703,6 +3703,7 @@ int dsi_ctrl_set_vid_engine_state(struct dsi_ctrl *dsi_ctrl,
|
|||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
bool on;
|
bool on;
|
||||||
|
bool vid_eng_busy;
|
||||||
|
|
||||||
if (!dsi_ctrl || (state >= DSI_CTRL_ENGINE_MAX)) {
|
if (!dsi_ctrl || (state >= DSI_CTRL_ENGINE_MAX)) {
|
||||||
DSI_CTRL_ERR(dsi_ctrl, "Invalid params\n");
|
DSI_CTRL_ERR(dsi_ctrl, "Invalid params\n");
|
||||||
@@ -3722,9 +3723,17 @@ int dsi_ctrl_set_vid_engine_state(struct dsi_ctrl *dsi_ctrl,
|
|||||||
if (!skip_op) {
|
if (!skip_op) {
|
||||||
on = (state == DSI_CTRL_ENGINE_ON) ? true : false;
|
on = (state == DSI_CTRL_ENGINE_ON) ? true : false;
|
||||||
dsi_ctrl->hw.ops.video_engine_en(&dsi_ctrl->hw, on);
|
dsi_ctrl->hw.ops.video_engine_en(&dsi_ctrl->hw, on);
|
||||||
|
vid_eng_busy = dsi_ctrl->hw.ops.vid_engine_busy(&dsi_ctrl->hw);
|
||||||
|
|
||||||
/* perform a reset when turning off video engine */
|
/*
|
||||||
if (!on && dsi_ctrl->version < DSI_CTRL_VERSION_1_3)
|
* During ESD check failure, DSI video engine can get stuck
|
||||||
|
* sending data from display engine. In use cases where GDSC
|
||||||
|
* toggle does not happen like DP MST connected or secure video
|
||||||
|
* playback, display does not recover back after ESD failure.
|
||||||
|
* Perform a reset if video engine is stuck.
|
||||||
|
*/
|
||||||
|
if (!on && (dsi_ctrl->version < DSI_CTRL_VERSION_1_3 ||
|
||||||
|
vid_eng_busy))
|
||||||
dsi_ctrl->hw.ops.soft_reset(&dsi_ctrl->hw);
|
dsi_ctrl->hw.ops.soft_reset(&dsi_ctrl->hw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -827,6 +827,13 @@ struct dsi_ctrl_hw_ops {
|
|||||||
* @ctrl: Pointer to the controller host hardware.
|
* @ctrl: Pointer to the controller host hardware.
|
||||||
*/
|
*/
|
||||||
int (*wait4dynamic_refresh_done)(struct dsi_ctrl_hw *ctrl);
|
int (*wait4dynamic_refresh_done)(struct dsi_ctrl_hw *ctrl);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hw.ops.vid_engine_busy() - Returns true if vid engine is busy
|
||||||
|
* @ctrl: Pointer to the controller host hardware.
|
||||||
|
*/
|
||||||
|
bool (*vid_engine_busy)(struct dsi_ctrl_hw *ctrl);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hw.ops.hs_req_sel() - enable continuous clk support through phy
|
* hw.ops.hs_req_sel() - enable continuous clk support through phy
|
||||||
* @ctrl: Pointer to the controller host hardware.
|
* @ctrl: Pointer to the controller host hardware.
|
||||||
|
@@ -1687,3 +1687,18 @@ int dsi_ctrl_hw_cmn_wait4dynamic_refresh_done(struct dsi_ctrl_hw *ctrl)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool dsi_ctrl_hw_cmn_vid_engine_busy(struct dsi_ctrl_hw *ctrl)
|
||||||
|
{
|
||||||
|
u32 reg = 0, video_engine_busy = BIT(3);
|
||||||
|
int rc;
|
||||||
|
u32 const sleep_us = 1000;
|
||||||
|
u32 const timeout_us = 50000;
|
||||||
|
|
||||||
|
rc = readl_poll_timeout(ctrl->base + DSI_STATUS, reg,
|
||||||
|
!(reg & video_engine_busy), sleep_us, timeout_us);
|
||||||
|
if (rc)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user