From cd83ee23ff2777ca6ce6c0f6a3f5628a554b756f Mon Sep 17 00:00:00 2001 From: Naseer Ahmed Date: Fri, 9 Nov 2012 18:57:33 -0500 Subject: [PATCH] msm_fb: display: Enable scaling bit while setting x-flip bit To enable left-right flip x-scaling bit should be set for MDP 4.2 and above versions. This fixes the issue when RGB layer pipes are not properly rotated. Change-Id: I0afae4aecde39ce3ac4dcbefc0bda93510e7d18a Signed-off-by: Siddhartha Agrawal Signed-off-by: Naseer Ahmed --- drivers/video/msm/mdp4_overlay.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/video/msm/mdp4_overlay.c b/drivers/video/msm/mdp4_overlay.c index ee70e1fa9d20..1730e9edd78c 100644 --- a/drivers/video/msm/mdp4_overlay.c +++ b/drivers/video/msm/mdp4_overlay.c @@ -697,8 +697,14 @@ void mdp4_overlay_rgb_setup(struct mdp4_overlay_pipe *pipe) op_mode &= ~(MDP4_OP_FLIP_LR + MDP4_OP_SCALEX_EN); op_mode &= ~(MDP4_OP_FLIP_UD + MDP4_OP_SCALEY_EN); outpdw(rgb_base + 0x0058, op_mode);/* MDP_RGB_OP_MODE */ - } else + } else { + if (pipe->op_mode & MDP4_OP_FLIP_LR && mdp_rev >= MDP_REV_42) { + /* Enable x-scaling bit to enable LR flip */ + /* for MDP > 4.2 targets */ + pipe->op_mode |= 0x01; + } outpdw(rgb_base + 0x0058, pipe->op_mode);/* MDP_RGB_OP_MODE */ + } outpdw(rgb_base + 0x005c, pipe->phasex_step); outpdw(rgb_base + 0x0060, pipe->phasey_step);