summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/video/fbdev/msm/mdss_fb.c2
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_ctl.c32
2 files changed, 19 insertions, 15 deletions
diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c
index f07ba01d5d56..2cc566981a20 100644
--- a/drivers/video/fbdev/msm/mdss_fb.c
+++ b/drivers/video/fbdev/msm/mdss_fb.c
@@ -405,7 +405,7 @@ static void mdss_fb_get_split(struct msm_fb_data_type *mfd)
mdss_fb_parse_dt_split(mfd);
if ((mfd->split_mode == MDP_SPLIT_MODE_NONE) &&
- (mfd->split_fb_left || mfd->split_fb_right))
+ (mfd->split_fb_left && mfd->split_fb_right))
mfd->split_mode = MDP_DUAL_LM_SINGLE_DISPLAY;
pr_debug("split framebuffer left=%d right=%d mode=%d\n",
diff --git a/drivers/video/fbdev/msm/mdss_mdp_ctl.c b/drivers/video/fbdev/msm/mdss_mdp_ctl.c
index 74038e522b47..4b49b14af517 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_ctl.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_ctl.c
@@ -1949,19 +1949,21 @@ struct mdss_mdp_mixer *mdss_mdp_mixer_alloc(
for (i = 0; i < nmixers; i++) {
mixer = mixer_pool + i;
- if (mixer->ref_cnt == 0) {
- mixer->ref_cnt++;
- mixer->params_changed++;
- mixer->ctl = ctl;
- pr_debug("alloc mixer num %d for ctl=%d\n",
- mixer->num, ctl->num);
+ if (mixer->ref_cnt == 0)
break;
- }
mixer = NULL;
}
if (!mixer && alt_mixer && (alt_mixer->ref_cnt == 0))
mixer = alt_mixer;
+
+ if (mixer) {
+ mixer->ref_cnt++;
+ mixer->params_changed++;
+ mixer->ctl = ctl;
+ pr_debug("alloc mixer num %d for ctl=%d\n",
+ mixer->num, ctl->num);
+ }
mutex_unlock(&mdss_mdp_ctl_lock);
return mixer;
@@ -2407,8 +2409,7 @@ int mdss_mdp_ctl_setup(struct mdss_mdp_ctl *ctl)
max_mixer_width = ctl->mdata->max_mixer_width;
- split_fb = (ctl->mfd->split_fb_left &&
- ctl->mfd->split_fb_right &&
+ split_fb = (ctl->mfd->split_mode == MDP_DUAL_LM_SINGLE_DISPLAY &&
(ctl->mfd->split_fb_left <= max_mixer_width) &&
(ctl->mfd->split_fb_right <= max_mixer_width)) ? 1 : 0;
pr_debug("max=%d xres=%d left=%d right=%d\n", max_mixer_width,
@@ -2697,12 +2698,15 @@ int mdss_mdp_ctl_split_display_setup(struct mdss_mdp_ctl *ctl,
sctl->roi = (struct mdss_rect){0, 0, sctl->width, sctl->height};
- ctl->mixer_left = mdss_mdp_mixer_alloc(ctl, MDSS_MDP_MIXER_TYPE_INTF,
- false, 0);
if (!ctl->mixer_left) {
- pr_err("unable to allocate layer mixer\n");
- mdss_mdp_ctl_destroy(sctl);
- return -ENOMEM;
+ ctl->mixer_left = mdss_mdp_mixer_alloc(ctl,
+ MDSS_MDP_MIXER_TYPE_INTF,
+ false, 0);
+ if (!ctl->mixer_left) {
+ pr_err("unable to allocate layer mixer\n");
+ mdss_mdp_ctl_destroy(sctl);
+ return -ENOMEM;
+ }
}
mixer = mdss_mdp_mixer_alloc(sctl, MDSS_MDP_MIXER_TYPE_INTF, false, 0);