summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorNaseer Ahmed <naseer@codeaurora.org>2017-01-25 10:48:29 -0500
committerNaseer Ahmed <naseer@codeaurora.org>2017-01-31 15:20:31 -0500
commitd64ba05ed6be7b7900b68f91b8882955cca5758c (patch)
treeae8fb6e7324630d73c0a05e122595762f0e781e1 /drivers/video/fbdev
parent314869eb56763d34f91d5483b0d510267894fadd (diff)
msm: mdss: Fix 3D Mux when restoring from DSC on/off
If a resolution switch with DSC on/off is executed during suspend, it is possible that both 3D mux & DSC merge are enabled after restore. This change fixes it. Change-Id: I60cead6fea0023ea402f98f207d57099c2287be6 Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_ctl.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_ctl.c b/drivers/video/fbdev/msm/mdss_mdp_ctl.c
index f397aca8ad3a..12f269b69c39 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_ctl.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_ctl.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -3614,6 +3614,7 @@ int mdss_mdp_ctl_setup(struct mdss_mdp_ctl *ctl)
u32 width, height;
int split_fb, rc = 0;
u32 max_mixer_width;
+ bool dsc_merge_enabled = 0;
struct mdss_panel_info *pinfo;
if (!ctl || !ctl->panel_data) {
@@ -3738,15 +3739,15 @@ int mdss_mdp_ctl_setup(struct mdss_mdp_ctl *ctl)
ctl->mixer_right = NULL;
}
- if (ctl->mixer_right) {
- if (!is_dsc_compression(pinfo) ||
- (pinfo->dsc_enc_total == 1))
- ctl->opmode |= MDSS_MDP_CTL_OP_PACK_3D_ENABLE |
- MDSS_MDP_CTL_OP_PACK_3D_H_ROW_INT;
- } else {
+ dsc_merge_enabled = is_dsc_compression(pinfo) &&
+ (pinfo->dsc_enc_total == 2);
+
+ if (ctl->mixer_right && (!dsc_merge_enabled))
+ ctl->opmode |= MDSS_MDP_CTL_OP_PACK_3D_ENABLE |
+ MDSS_MDP_CTL_OP_PACK_3D_H_ROW_INT;
+ else
ctl->opmode &= ~(MDSS_MDP_CTL_OP_PACK_3D_ENABLE |
MDSS_MDP_CTL_OP_PACK_3D_H_ROW_INT);
- }
return 0;
}