Merge "disp: msm: dsi: avoid seamless request for cwb transitions"
このコミットが含まれているのは:

committed by
Gerrit - the friendly Code Review server

コミット
9794834cc5
@@ -660,7 +660,7 @@ static int dsi_display_read_status(struct dsi_display_ctrl *ctrl,
|
||||
cmds[i].msg.flags |= MIPI_DSI_MSG_USE_LPM;
|
||||
cmds[i].msg.rx_buf = config->status_buf;
|
||||
cmds[i].msg.rx_len = config->status_cmds_rlen[i];
|
||||
rc = dsi_ctrl_cmd_transfer(ctrl->ctrl, &cmds[i].msg, flags);
|
||||
rc = dsi_ctrl_cmd_transfer(ctrl->ctrl, &cmds[i].msg, &flags);
|
||||
if (rc <= 0) {
|
||||
DSI_ERR("rx cmd transfer failed rc=%d\n", rc);
|
||||
return rc;
|
||||
@@ -2734,7 +2734,8 @@ static int dsi_display_broadcast_cmd(struct dsi_display *display,
|
||||
m_flags |= DSI_CTRL_CMD_LAST_COMMAND;
|
||||
}
|
||||
|
||||
if (display->queue_cmd_waits) {
|
||||
if (display->queue_cmd_waits ||
|
||||
msg->flags & MIPI_DSI_MSG_ASYNC_OVERRIDE) {
|
||||
flags |= DSI_CTRL_CMD_ASYNC_WAIT;
|
||||
m_flags |= DSI_CTRL_CMD_ASYNC_WAIT;
|
||||
}
|
||||
@@ -2744,7 +2745,7 @@ static int dsi_display_broadcast_cmd(struct dsi_display *display,
|
||||
* 2. Trigger commands
|
||||
*/
|
||||
m_ctrl = &display->ctrl[display->cmd_master_idx];
|
||||
rc = dsi_ctrl_cmd_transfer(m_ctrl->ctrl, msg, m_flags);
|
||||
rc = dsi_ctrl_cmd_transfer(m_ctrl->ctrl, msg, &m_flags);
|
||||
if (rc) {
|
||||
DSI_ERR("[%s] cmd transfer failed on master,rc=%d\n",
|
||||
display->name, rc);
|
||||
@@ -2756,7 +2757,7 @@ static int dsi_display_broadcast_cmd(struct dsi_display *display,
|
||||
if (ctrl == m_ctrl)
|
||||
continue;
|
||||
|
||||
rc = dsi_ctrl_cmd_transfer(ctrl->ctrl, msg, flags);
|
||||
rc = dsi_ctrl_cmd_transfer(ctrl->ctrl, msg, &flags);
|
||||
if (rc) {
|
||||
DSI_ERR("[%s] cmd transfer failed, rc=%d\n",
|
||||
display->name, rc);
|
||||
@@ -2894,11 +2895,12 @@ static ssize_t dsi_host_transfer(struct mipi_dsi_host *host,
|
||||
msg->ctrl : 0;
|
||||
u32 cmd_flags = DSI_CTRL_CMD_FETCH_MEMORY;
|
||||
|
||||
if (display->queue_cmd_waits)
|
||||
if (display->queue_cmd_waits ||
|
||||
msg->flags & MIPI_DSI_MSG_ASYNC_OVERRIDE)
|
||||
cmd_flags |= DSI_CTRL_CMD_ASYNC_WAIT;
|
||||
|
||||
rc = dsi_ctrl_cmd_transfer(display->ctrl[ctrl_idx].ctrl, msg,
|
||||
cmd_flags);
|
||||
&cmd_flags);
|
||||
if (rc) {
|
||||
DSI_ERR("[%s] cmd transfer failed, rc=%d\n",
|
||||
display->name, rc);
|
||||
@@ -7536,14 +7538,44 @@ int dsi_display_pre_disable(struct dsi_display *display)
|
||||
if (display->config.panel_mode == DSI_OP_CMD_MODE)
|
||||
dsi_panel_pre_mode_switch_to_video(display->panel);
|
||||
|
||||
if (display->config.panel_mode == DSI_OP_VIDEO_MODE)
|
||||
if (display->config.panel_mode == DSI_OP_VIDEO_MODE) {
|
||||
/*
|
||||
* Add unbalanced vote for clock & cmd engine to enable
|
||||
* async trigger of pre video to cmd mode switch.
|
||||
*/
|
||||
rc = dsi_display_clk_ctrl(display->dsi_clk_handle,
|
||||
DSI_ALL_CLKS, DSI_CLK_ON);
|
||||
if (rc) {
|
||||
DSI_ERR("[%s]failed to enable all clocks,rc=%d",
|
||||
display->name, rc);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
rc = dsi_display_cmd_engine_enable(display);
|
||||
if (rc) {
|
||||
DSI_ERR("[%s]failed to enable cmd engine,rc=%d",
|
||||
display->name, rc);
|
||||
goto error_disable_clks;
|
||||
}
|
||||
|
||||
dsi_panel_pre_mode_switch_to_cmd(display->panel);
|
||||
}
|
||||
} else {
|
||||
rc = dsi_panel_pre_disable(display->panel);
|
||||
if (rc)
|
||||
DSI_ERR("[%s] panel pre-disable failed, rc=%d\n",
|
||||
display->name, rc);
|
||||
}
|
||||
goto exit;
|
||||
|
||||
error_disable_clks:
|
||||
rc = dsi_display_clk_ctrl(display->dsi_clk_handle,
|
||||
DSI_ALL_CLKS, DSI_CLK_OFF);
|
||||
if (rc)
|
||||
DSI_ERR("[%s] failed to disable all DSI clocks, rc=%d\n",
|
||||
display->name, rc);
|
||||
|
||||
exit:
|
||||
mutex_unlock(&display->display_lock);
|
||||
return rc;
|
||||
}
|
||||
@@ -7646,7 +7678,8 @@ int dsi_display_update_pps(char *pps_cmd, void *disp)
|
||||
|
||||
int dsi_display_unprepare(struct dsi_display *display)
|
||||
{
|
||||
int rc = 0;
|
||||
int rc = 0, i;
|
||||
struct dsi_display_ctrl *ctrl;
|
||||
|
||||
if (!display) {
|
||||
DSI_ERR("Invalid params\n");
|
||||
@@ -7666,6 +7699,24 @@ int dsi_display_unprepare(struct dsi_display *display)
|
||||
DSI_ERR("[%s] panel unprepare failed, rc=%d\n",
|
||||
display->name, rc);
|
||||
}
|
||||
|
||||
/* Remove additional vote added for pre_mode_switch_to_cmd */
|
||||
if (display->poms_pending &&
|
||||
display->config.panel_mode == DSI_OP_VIDEO_MODE) {
|
||||
display_for_each_ctrl(i, display) {
|
||||
ctrl = &display->ctrl[i];
|
||||
if (!ctrl->ctrl || !ctrl->ctrl->dma_wait_queued)
|
||||
continue;
|
||||
flush_workqueue(display->dma_cmd_workq);
|
||||
cancel_work_sync(&ctrl->ctrl->dma_cmd_wait);
|
||||
ctrl->ctrl->dma_wait_queued = false;
|
||||
}
|
||||
|
||||
dsi_display_cmd_engine_disable(display);
|
||||
dsi_display_clk_ctrl(display->dsi_clk_handle,
|
||||
DSI_ALL_CLKS, DSI_CLK_OFF);
|
||||
}
|
||||
|
||||
rc = dsi_display_ctrl_host_disable(display);
|
||||
if (rc)
|
||||
DSI_ERR("[%s] failed to disable DSI host, rc=%d\n",
|
||||
|
新しいイシューから参照
ユーザーをブロックする