msm: mdss: synchronize command mode intf stop
In dual DSI command mode case, both interfaces need to finish before the panel is turned off. In order to make sure these are synchronized, both interfaces need to be stopped before sending blank/off events to panel driver. Change-Id: Ie5bcf5ce53515a5c02696c7be1665c3330be0417 Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
This commit is contained in:
parent
a67fb9b0db
commit
1e0cb3a69b
1 changed files with 36 additions and 7 deletions
|
@ -842,11 +842,12 @@ end:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mdss_mdp_cmd_stop(struct mdss_mdp_ctl *ctl, int panel_power_state)
|
static int mdss_mdp_cmd_stop_sub(struct mdss_mdp_ctl *ctl,
|
||||||
|
int panel_power_state)
|
||||||
{
|
{
|
||||||
struct mdss_mdp_cmd_ctx *ctx;
|
struct mdss_mdp_cmd_ctx *ctx;
|
||||||
struct mdss_mdp_vsync_handler *tmp, *handle;
|
struct mdss_mdp_vsync_handler *tmp, *handle;
|
||||||
int ret, session = 0;
|
int session;
|
||||||
|
|
||||||
ctx = (struct mdss_mdp_cmd_ctx *) ctl->priv_data;
|
ctx = (struct mdss_mdp_cmd_ctx *) ctl->priv_data;
|
||||||
if (!ctx) {
|
if (!ctx) {
|
||||||
|
@ -854,6 +855,10 @@ int mdss_mdp_cmd_stop(struct mdss_mdp_ctl *ctl, int panel_power_state)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* if power state already updated, skip this */
|
||||||
|
if (ctx->panel_power_state == panel_power_state)
|
||||||
|
return 0;
|
||||||
|
|
||||||
list_for_each_entry_safe(handle, tmp, &ctx->vsync_handlers, list)
|
list_for_each_entry_safe(handle, tmp, &ctx->vsync_handlers, list)
|
||||||
mdss_mdp_cmd_remove_vsync_handler(ctl, handle);
|
mdss_mdp_cmd_remove_vsync_handler(ctl, handle);
|
||||||
MDSS_XLOG(ctl->num, atomic_read(&ctx->koff_cnt), ctx->clk_enabled,
|
MDSS_XLOG(ctl->num, atomic_read(&ctx->koff_cnt), ctx->clk_enabled,
|
||||||
|
@ -861,13 +866,37 @@ int mdss_mdp_cmd_stop(struct mdss_mdp_ctl *ctl, int panel_power_state)
|
||||||
|
|
||||||
/* Command mode is supported only starting at INTF1 */
|
/* Command mode is supported only starting at INTF1 */
|
||||||
session = ctl->intf_num - MDSS_MDP_INTF1;
|
session = ctl->intf_num - MDSS_MDP_INTF1;
|
||||||
ret = mdss_mdp_cmd_intfs_stop(ctl, session, panel_power_state);
|
return mdss_mdp_cmd_intfs_stop(ctl, session, panel_power_state);
|
||||||
if (IS_ERR_VALUE(ret)) {
|
}
|
||||||
pr_err("unable to stop cmd interface: %d\n", ret);
|
|
||||||
return ret;
|
int mdss_mdp_cmd_stop(struct mdss_mdp_ctl *ctl, int panel_power_state)
|
||||||
|
{
|
||||||
|
struct mdss_mdp_cmd_ctx *ctx = ctl->priv_data;
|
||||||
|
struct mdss_mdp_ctl *sctl = mdss_mdp_get_split_ctl(ctl);
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
if (!ctx) {
|
||||||
|
pr_err("invalid ctx\n");
|
||||||
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctl->num == 0) {
|
if (ctx->panel_power_state != panel_power_state) {
|
||||||
|
ret = mdss_mdp_cmd_stop_sub(ctl, panel_power_state);
|
||||||
|
if (IS_ERR_VALUE(ret)) {
|
||||||
|
pr_err("%s: unable to stop interface: %d\n",
|
||||||
|
__func__, ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sctl) {
|
||||||
|
mdss_mdp_cmd_stop_sub(sctl, panel_power_state);
|
||||||
|
if (IS_ERR_VALUE(ret)) {
|
||||||
|
pr_err("%s: unable to stop slave intf: %d\n",
|
||||||
|
__func__, ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ret = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_BLANK,
|
ret = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_BLANK,
|
||||||
(void *) (long int) panel_power_state);
|
(void *) (long int) panel_power_state);
|
||||||
WARN(ret, "intf %d unblank error (%d)\n", ctl->intf_num, ret);
|
WARN(ret, "intf %d unblank error (%d)\n", ctl->intf_num, ret);
|
||||||
|
|
Loading…
Add table
Reference in a new issue