msm: mdss: clean up ctl during cont splash resolution change
During boot-up, if continuous splash screen is enabled, handoff will populate the controller and other structures after reading hardware info. If there is a resolution switch, clear the handoff data so that the data can be reconfigured with new resolution info. Change-Id: Ia524136283711e95879936603bb53c5e8f263ea6 Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org> Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
This commit is contained in:
parent
5fa6ce79b2
commit
bf1475554b
3 changed files with 57 additions and 2 deletions
|
@ -2417,6 +2417,7 @@ int mdss_mdp_ctl_splash_finish(struct mdss_mdp_ctl *ctl, bool handoff)
|
|||
switch (ctl->panel_data->panel_info.type) {
|
||||
case MIPI_VIDEO_PANEL:
|
||||
case EDP_PANEL:
|
||||
case DTV_PANEL:
|
||||
return mdss_mdp_video_reconfigure_splash_done(ctl, handoff);
|
||||
case MIPI_CMD_PANEL:
|
||||
return mdss_mdp_cmd_reconfigure_splash_done(ctl, handoff);
|
||||
|
@ -3765,7 +3766,7 @@ int mdss_mdp_ctl_stop(struct mdss_mdp_ctl *ctl, int power_state)
|
|||
|
||||
pr_debug("ctl_num=%d, power_state=%d\n", ctl->num, ctl->power_state);
|
||||
|
||||
if (!mdss_mdp_ctl_is_power_on(ctl)) {
|
||||
if (!ctl->mfd->panel_reconfig && !mdss_mdp_ctl_is_power_on(ctl)) {
|
||||
pr_debug("%s %d already off!\n", __func__, __LINE__);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1172,7 +1172,12 @@ int mdss_mdp_video_reconfigure_splash_done(struct mdss_mdp_ctl *ctl,
|
|||
int i, ret = 0, off;
|
||||
u32 data, flush;
|
||||
struct mdss_mdp_video_ctx *ctx;
|
||||
struct mdss_mdp_ctl *sctl = mdss_mdp_get_split_ctl(ctl);
|
||||
struct mdss_mdp_ctl *sctl;
|
||||
|
||||
if (!ctl) {
|
||||
pr_err("invalid ctl\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
off = 0;
|
||||
ctx = (struct mdss_mdp_video_ctx *) ctl->intf_ctx[MASTER_CTX];
|
||||
|
@ -1182,8 +1187,14 @@ int mdss_mdp_video_reconfigure_splash_done(struct mdss_mdp_ctl *ctl,
|
|||
}
|
||||
|
||||
pdata = ctl->panel_data;
|
||||
if (!pdata) {
|
||||
pr_err("invalid pdata\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
pdata->panel_info.cont_splash_enabled = 0;
|
||||
sctl = mdss_mdp_get_split_ctl(ctl);
|
||||
|
||||
if (sctl)
|
||||
sctl->panel_data->panel_info.cont_splash_enabled = 0;
|
||||
else if (ctl->panel_data->next && is_pingpong_split(ctl->mfd))
|
||||
|
|
|
@ -4605,6 +4605,46 @@ end:
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int mdss_mdp_handoff_cleanup_ctl(struct msm_fb_data_type *mfd)
|
||||
{
|
||||
int rc;
|
||||
int need_cleanup;
|
||||
struct mdss_overlay_private *mdp5_data;
|
||||
|
||||
if (!mfd)
|
||||
return -ENODEV;
|
||||
|
||||
if (mfd->key != MFD_KEY)
|
||||
return -EINVAL;
|
||||
|
||||
mdp5_data = mfd_to_mdp5_data(mfd);
|
||||
|
||||
mdss_mdp_overlay_free_fb_pipe(mfd);
|
||||
|
||||
mutex_lock(&mdp5_data->list_lock);
|
||||
need_cleanup = !list_empty(&mdp5_data->pipes_cleanup) ||
|
||||
!list_empty(&mdp5_data->pipes_used);
|
||||
mutex_unlock(&mdp5_data->list_lock);
|
||||
|
||||
if (need_cleanup)
|
||||
mdss_mdp_overlay_kickoff(mfd, NULL);
|
||||
|
||||
rc = mdss_mdp_ctl_stop(mdp5_data->ctl, mfd->panel_power_state);
|
||||
if (!rc) {
|
||||
if (mdss_fb_is_power_off(mfd)) {
|
||||
mutex_lock(&mdp5_data->list_lock);
|
||||
__mdss_mdp_overlay_free_list_purge(mfd);
|
||||
mutex_unlock(&mdp5_data->list_lock);
|
||||
}
|
||||
}
|
||||
|
||||
rc = mdss_mdp_splash_cleanup(mfd, false);
|
||||
if (rc)
|
||||
pr_err("%s: failed splash clean up %d\n", __func__, rc);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int mdss_mdp_overlay_off(struct msm_fb_data_type *mfd)
|
||||
{
|
||||
int rc;
|
||||
|
@ -4627,6 +4667,9 @@ static int mdss_mdp_overlay_off(struct msm_fb_data_type *mfd)
|
|||
|
||||
if (!mdss_mdp_ctl_is_power_on(mdp5_data->ctl)) {
|
||||
if (mfd->panel_reconfig) {
|
||||
if (mfd->panel_info->cont_splash_enabled)
|
||||
mdss_mdp_handoff_cleanup_ctl(mfd);
|
||||
|
||||
mdp5_data->borderfill_enable = false;
|
||||
mdss_mdp_ctl_destroy(mdp5_data->ctl);
|
||||
mdp5_data->ctl = NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue