msm: mdss: fix split_lm flag setting for HDMI usecases
HDMI 4k uses dual layer mixer controlled by a single controller, but fails to set the split_lm flag appropriately. This leads to false comparisons in few usecases. Set the split_lm flag, and the associated structures appropriately for different HDMI configurations. Change-Id: I7a294bc0ad7a45b92b6aceebbd6efa9d5f09a8ca Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
This commit is contained in:
parent
63e88a36a2
commit
0eeed3ad08
2 changed files with 32 additions and 10 deletions
|
@ -3999,22 +3999,15 @@ int mdss_mdp_async_ctl_flush(struct msm_fb_data_type *mfd,
|
|||
{
|
||||
struct mdss_overlay_private *mdp5_data = mfd_to_mdp5_data(mfd);
|
||||
struct mdss_mdp_ctl *ctl = mdp5_data->ctl;
|
||||
struct mdss_mdp_ctl *sctl = NULL;
|
||||
struct mdss_mdp_ctl *sctl = mdss_mdp_get_split_ctl(ctl);
|
||||
int ret = 0;
|
||||
|
||||
mutex_lock(&ctl->flush_lock);
|
||||
|
||||
mdss_mdp_ctl_write(ctl, MDSS_MDP_REG_CTL_FLUSH, flush_bits);
|
||||
if ((!ctl->split_flush_en) && is_split_lm(mfd)) {
|
||||
sctl = mdss_mdp_get_split_ctl(ctl);
|
||||
if (!sctl) {
|
||||
pr_err("not able to get the other ctl\n");
|
||||
ret = -EINVAL;
|
||||
goto end;
|
||||
}
|
||||
if ((!ctl->split_flush_en) && sctl)
|
||||
mdss_mdp_ctl_write(sctl, MDSS_MDP_REG_CTL_FLUSH, flush_bits);
|
||||
}
|
||||
end:
|
||||
|
||||
mutex_unlock(&ctl->flush_lock);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -4367,6 +4367,33 @@ error:
|
|||
return ctl;
|
||||
}
|
||||
|
||||
static void mdss_mdp_set_lm_flag(struct msm_fb_data_type *mfd)
|
||||
{
|
||||
u32 width;
|
||||
struct mdss_data_type *mdata;
|
||||
|
||||
/* if lm_widths are set, the split_mode would have been set */
|
||||
if (mfd->panel_info->lm_widths[0] && mfd->panel_info->lm_widths[1])
|
||||
return;
|
||||
|
||||
mdata = mdss_mdp_get_mdata();
|
||||
width = mfd->fbi->var.xres;
|
||||
|
||||
/* setting the appropriate split_mode for HDMI usecases */
|
||||
if (mfd->split_mode == MDP_SPLIT_MODE_NONE &&
|
||||
width > mdata->max_mixer_width) {
|
||||
width /= 2;
|
||||
mfd->split_mode = MDP_DUAL_LM_SINGLE_DISPLAY;
|
||||
mfd->split_fb_left = width;
|
||||
mfd->split_fb_right = width;
|
||||
} else if (mfd->split_mode == MDP_DUAL_LM_SINGLE_DISPLAY &&
|
||||
width <= mdata->max_mixer_width) {
|
||||
mfd->split_mode = MDP_SPLIT_MODE_NONE;
|
||||
mfd->split_fb_left = 0;
|
||||
mfd->split_fb_right = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static int mdss_mdp_overlay_on(struct msm_fb_data_type *mfd)
|
||||
{
|
||||
int rc;
|
||||
|
@ -4383,6 +4410,8 @@ static int mdss_mdp_overlay_on(struct msm_fb_data_type *mfd)
|
|||
if (!mdp5_data)
|
||||
return -EINVAL;
|
||||
|
||||
mdss_mdp_set_lm_flag(mfd);
|
||||
|
||||
if (!mdp5_data->ctl) {
|
||||
ctl = __mdss_mdp_overlay_ctl_init(mfd);
|
||||
if (IS_ERR_OR_NULL(ctl))
|
||||
|
|
Loading…
Add table
Reference in a new issue