From 0a442945ee9f55968ece2afa12267931a78cc92e Mon Sep 17 00:00:00 2001 From: James Sullins Date: Wed, 1 Feb 2012 15:54:50 -0600 Subject: [PATCH] fix color/rotation for lcdc_lg_xga --- arch/arm/configs/tenderloin_defconfig | 4 ++-- drivers/video/msm/mdp4_overlay.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/arch/arm/configs/tenderloin_defconfig b/arch/arm/configs/tenderloin_defconfig index 9b0b24a19f1..6b06963aea5 100644 --- a/arch/arm/configs/tenderloin_defconfig +++ b/arch/arm/configs/tenderloin_defconfig @@ -1884,8 +1884,8 @@ CONFIG_FB_MSM_LCDC_LG_XGA_PANEL=y # CONFIG_FB_MSM_TVOUT_PAL_N is not set CONFIG_FB_MSM_TVOUT_NONE=y # CONFIG_FB_MSM_DEFAULT_DEPTH_RGB565 is not set -CONFIG_FB_MSM_DEFAULT_DEPTH_ARGB8888=y -# CONFIG_FB_MSM_DEFAULT_DEPTH_RGBA8888 is not ste +# CONFIG_FB_MSM_DEFAULT_DEPTH_ARGB8888 is not set +CONFIG_FB_MSM_DEFAULT_DEPTH_RGBA8888=y CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_LCD_CLASS_DEVICE=m # CONFIG_LCD_L4F00242T03 is not set diff --git a/drivers/video/msm/mdp4_overlay.c b/drivers/video/msm/mdp4_overlay.c index 77416cb9a80..f04c0ce65c7 100644 --- a/drivers/video/msm/mdp4_overlay.c +++ b/drivers/video/msm/mdp4_overlay.c @@ -303,7 +303,7 @@ void mdp4_overlay_dmap_cfg(struct msm_fb_data_type *mfd, int lcdc) mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE); -#ifndef CONFIG_FB_MSM_LCDC_CHIMEI_WXGA_PANEL +#if !defined(CONFIG_FB_MSM_LCDC_CHIMEI_WXGA_PANEL) && !defined(CONFIG_FB_MSM_LCDC_LG_XGA) if (lcdc) dma2_cfg_reg |= DMA_PACK_ALIGN_MSB; #endif @@ -470,6 +470,11 @@ void mdp4_overlay_rgb_setup(struct mdp4_overlay_pipe *pipe) pipe->op_mode |= MDP4_OP_IGC_LUT_EN; #endif +#ifdef CONFIG_FB_MSM_LCDC_LG_XGA + pipe->op_mode |= MDP4_OP_FLIP_LR; + pipe->op_mode |= MDP4_OP_FLIP_UD; +#endif + mdp4_scale_setup(pipe); mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE); @@ -1839,6 +1844,11 @@ static int mdp4_overlay_req2pipe(struct mdp_overlay *req, int mixer, pipe->op_mode = 0; +#ifdef CONFIG_FB_MSM_LCDC_LG_XGA + pipe->op_mode |= MDP4_OP_FLIP_LR; + pipe->op_mode |= MDP4_OP_FLIP_UD; +#endif + if (req->flags & MDP_FLIP_LR) pipe->op_mode |= MDP4_OP_FLIP_LR;