rk2928 lcdc:fix bug in win1_set_par
authoryxj <yxj@rock-chips.com>
Wed, 10 Apr 2013 08:31:05 +0000 (16:31 +0800)
committeryxj <yxj@rock-chips.com>
Wed, 10 Apr 2013 08:31:27 +0000 (16:31 +0800)
drivers/video/rockchip/lcdc/rk2928_lcdc.c

index b0d1112743b920c0c90427b7d228b4dbb2fb4d15..4f40cc4acaa8c05e594b05283fd9d8d1ed68a223 100644 (file)
@@ -658,22 +658,27 @@ static int win1_set_par(struct rk2928_lcdc_device *lcdc_dev,rk_screen *screen,
                switch(par->format)
               {        
                        case XBGR888:
+                               fmt_cfg = 0;
                                LcdMskReg(lcdc_dev,WIN_VIR,m_WIN1_VIR,v_WIN1_ARGB888_VIRWIDTH(xvir));
                                LcdMskReg(lcdc_dev,SYS_CFG,m_W1_RGB_RB_SWAP,v_W1_RGB_RB_SWAP(1));
                                break;
                        case ABGR888:
+                               fmt_cfg = 0;
                                LcdMskReg(lcdc_dev,WIN_VIR,m_WIN1_VIR,v_WIN1_ARGB888_VIRWIDTH(xvir));
                                LcdMskReg(lcdc_dev,SYS_CFG,m_W1_RGB_RB_SWAP,v_W1_RGB_RB_SWAP(1));
                                break;
                        case ARGB888:
+                               fmt_cfg = 0;
                                LcdMskReg(lcdc_dev,WIN_VIR,m_WIN1_VIR,v_WIN1_ARGB888_VIRWIDTH(xvir));
                                LcdMskReg(lcdc_dev,SYS_CFG,m_W1_RGB_RB_SWAP,v_W1_RGB_RB_SWAP(0));
                                break;
                        case RGB888:  //rgb888
+                               fmt_cfg = 1;
                                LcdMskReg(lcdc_dev,WIN_VIR,m_WIN1_VIR,v_WIN1_RGB888_VIRWIDTH(xvir));
                                LcdMskReg(lcdc_dev,DSP_CTRL,m_W1_RGB_RB_SWAP,v_W1_RGB_RB_SWAP(0));
                                break;
                        case RGB565:  //rgb565
+                               fmt_cfg = 2;
                                LcdMskReg(lcdc_dev,WIN_VIR,m_WIN1_VIR,v_WIN1_RGB565_VIRWIDTH(xvir));
                                LcdMskReg(lcdc_dev,SYS_CFG,m_W1_RGB_RB_SWAP,v_W1_RGB_RB_SWAP(0));
                                break;