rk3288 lcdc: set alpha default mode AB_SRC_OVER
authorhjc <hjc@rock-chips.com>
Sun, 23 Mar 2014 05:54:56 +0000 (13:54 +0800)
committerhjc <hjc@rock-chips.com>
Sun, 23 Mar 2014 08:44:17 +0000 (16:44 +0800)
drivers/video/rockchip/lcdc/rk3288_lcdc.c

index 6d955d213f1e803c66769fb8016694c880944dfe..9c2d8550e8899fa1feb435a6addc4e9843aa4143 100755 (executable)
@@ -421,6 +421,7 @@ static int rk3288_lcdc_alpha_cfg(struct rk_lcdc_driver *dev_drv,int win_id)
        ppixel_alpha = ((win->format == ARGB888)||(win->format == ABGR888)) ? 1 : 0;
        global_alpha = (win->g_alpha_val == 0) ? 0 : 1; 
        alpha_config.src_global_alpha_val = win->g_alpha_val;
+       win->alpha_mode = AB_SRC_OVER;
        /*printk("%s,alpha_mode=%d,alpha_en=%d,ppixel_a=%d,gla_a=%d\n",
                __func__,win->alpha_mode,win->alpha_en,ppixel_alpha,global_alpha);*/
        switch(win->alpha_mode){
@@ -931,7 +932,7 @@ static int rk3288_load_screen(struct rk_lcdc_driver *dev_drv, bool initscreen)
                lcdc_msk_reg(lcdc_dev, DSP_CTRL0, mask, val);
 
                mask = m_DSP_BG_BLUE | m_DSP_BG_GREEN | m_DSP_BG_RED;
-               val  = v_DSP_BG_BLUE(0x3ff) | v_DSP_BG_GREEN(0) | v_DSP_BG_RED(0);
+               val  = v_DSP_BG_BLUE(0) | v_DSP_BG_GREEN(0) | v_DSP_BG_RED(0);
                lcdc_msk_reg(lcdc_dev, DSP_BG, mask, val);
 
                mask = m_DSP_HS_PW | m_DSP_HTOTAL;
@@ -2141,10 +2142,10 @@ static int rk3288_lcdc_ovl_mgr(struct rk_lcdc_driver *dev_drv, int swap,
                if(set){
                        mask = m_DSP_LAYER0_SEL | m_DSP_LAYER1_SEL |
                                m_DSP_LAYER2_SEL | m_DSP_LAYER3_SEL;
-                       val  = v_DSP_LAYER0_SEL(layer0_sel) |
-                               v_DSP_LAYER1_SEL(layer1_sel) |
-                               v_DSP_LAYER2_SEL(layer2_sel) |
-                               v_DSP_LAYER3_SEL(layer3_sel);
+                       val  = v_DSP_LAYER0_SEL(0) |
+                               v_DSP_LAYER1_SEL(1) |
+                               v_DSP_LAYER2_SEL(2) |
+                               v_DSP_LAYER3_SEL(3);
                        lcdc_msk_reg(lcdc_dev,DSP_CTRL1,mask,val);
                }else{
                        layer0_sel = lcdc_read_bit(lcdc_dev, DSP_CTRL1, m_DSP_LAYER0_SEL);
@@ -2455,108 +2456,108 @@ static ssize_t rk3288_lcdc_get_disp_info(struct rk_lcdc_driver *dev_drv,
                        "  layer1_sel_win[%d]\n"
                        "  layer0_sel_win[%d]\n"
                        "win0:\n"
-                       "  state:%d\n"
-                       "  fmt:%s\n"
-                       "  y_vir:%d\n"
+                       "  state:%d"
+                       "  fmt:%s"
+                       "  y_vir:%d"
                        "  uv_vir:%d\n"
-                       "  xact:%d\n"
-                       "  yact:%d\n"
-                       "  dsp_x:%d\n"
-                       "  dsp_y:%d\n"
-                       "  x_st:%d\n"
+                       "  xact:%d"
+                       "  yact:%d"
+                       "  dsp_x:%d"
+                       "  dsp_y:%d"
+                       "  x_st:%d"
                        "  y_st:%d\n"
-                       "  y_h_fac:%d\n"
-                       "  y_v_fac:%d\n"
-                       "  uv_h_fac:%d\n"
-                       "  uv_v_fac:%d\n"
-                       "  y_addr: 0x%x\n"
+                       "  y_h_fac:%d"
+                       "  y_v_fac:%d"
+                       "  uv_h_fac:%d"
+                       "  uv_v_fac:%d"
+                       "  y_addr: 0x%x"
                        "  uv_addr:0x%x\n"
                        "win1:\n"
-                       "  state:%d\n"
-                       "  fmt:%s\n"
-                       "  y_vir:%d\n"
+                       "  state:%d"
+                       "  fmt:%s"
+                       "  y_vir:%d"
                        "  uv_vir:%d\n"
-                       "  xact:%d\n"
-                       "  yact:%d\n"
-                       "  dsp_x:%d\n"
-                       "  dsp_y:%d\n"
-                       "  x_st:%d\n"
+                       "  xact:%d"
+                       "  yact:%d"
+                       "  dsp_x:%d"
+                       "  dsp_y:%d"
+                       "  x_st:%d"
                        "  y_st:%d\n"
-                       "  y_h_fac:%d\n"
-                       "  y_v_fac:%d\n"
-                       "  uv_h_fac:%d\n"
-                       "  uv_v_fac:%d\n"
-                       "  y_addr: 0x%x\n"
+                       "  y_h_fac:%d"
+                       "  y_v_fac:%d"
+                       "  uv_h_fac:%d"
+                       "  uv_v_fac:%d"
+                       "  y_addr: 0x%x"
                        "  uv_addr:0x%x\n"      
                        "win2:\n"
                        "  state:%d\n"
                        "  fmt:%s\n"
                        "  area0:\n"
-                       "    state:%d\n"
-                       "    y_vir:%d\n"
-                       "    dsp_x:%d\n"
-                       "    dsp_y:%d\n"
-                       "    x_st:%d\n"
-                       "    y_st:%d\n"
+                       "    state:%d"
+                       "    y_vir:%d"
+                       "    dsp_x:%d"
+                       "    dsp_y:%d"
+                       "    x_st:%d"
+                       "    y_st:%d"
                        "    addr:0x%x\n"
                        "  area1:\n"
-                       "    state:%d\n"
-                       "    y_vir:%d\n"
-                       "    dsp_x:%d\n"
-                       "    dsp_y:%d\n"
-                       "    x_st:%d\n"
-                       "    y_st:%d\n"
+                       "    state:%d"
+                       "    y_vir:%d"
+                       "    dsp_x:%d"
+                       "    dsp_y:%d"
+                       "    x_st:%d"
+                       "    y_st:%d"
                        "    addr:0x%x\n"
                        "  area2:\n"
-                       "    state:%d\n"
-                       "    y_vir:%d\n"
-                       "    dsp_x:%d\n"
-                       "    dsp_y:%d\n"
-                       "    x_st:%d\n"
-                       "    y_st:%d\n"
+                       "    state:%d"
+                       "    y_vir:%d"
+                       "    dsp_x:%d"
+                       "    dsp_y:%d"
+                       "    x_st:%d"
+                       "    y_st:%d"
                        "    addr:0x%x\n"
                        "  area3:\n"
-                       "    state:%d\n"
-                       "    y_vir:%d\n"
-                       "    dsp_x:%d\n"
-                       "    dsp_y:%d\n"
-                       "    x_st:%d\n"
-                       "    y_st:%d\n"
+                       "    state:%d"
+                       "    y_vir:%d"
+                       "    dsp_x:%d"
+                       "    dsp_y:%d"
+                       "    x_st:%d"
+                       "    y_st:%d"
                        "    addr:0x%x\n"
                        "win3:\n"
                        "  state:%d\n"
                        "  fmt:%s\n"
                        "  area0:\n"
-                       "    state:%d\n"
-                       "    y_vir:%d\n"
-                       "    dsp_x:%d\n"
-                       "    dsp_y:%d\n"
-                       "    x_st:%d\n"
-                       "    y_st:%d\n"
+                       "    state:%d"
+                       "    y_vir:%d"
+                       "    dsp_x:%d"
+                       "    dsp_y:%d"
+                       "    x_st:%d"
+                       "    y_st:%d"
                        "    addr:0x%x\n"
                        "  area1:\n"
-                       "    state:%d\n"
-                       "    y_vir:%d\n"
-                       "    dsp_x:%d\n"
-                       "    dsp_y:%d\n"
-                       "    x_st:%d\n"
+                       "    state:%d"
+                       "    y_vir:%d"
+                       "    dsp_x:%d"
+                       "    dsp_y:%d"
+                       "    x_st:%d"
                        "    y_st:%d\n"
                        "  area2:\n"
-                       "    addr:0x%x\n"
-                       "    state:%d\n"
-                       "    y_vir:%d\n"
-                       "    dsp_x:%d\n"
-                       "    dsp_y:%d\n"
-                       "    x_st:%d\n"
-                       "    y_st:%d\n"
+                       "    addr:0x%x"
+                       "    state:%d"
+                       "    y_vir:%d"
+                       "    dsp_x:%d"
+                       "    dsp_y:%d"
+                       "    x_st:%d"
+                       "    y_st:%d"
                        "    addr:0x%x\n"
                        "  area3:\n"
-                       "    state:%d\n"
-                       "    y_vir:%d\n"
-                       "    dsp_x:%d\n"
-                       "    dsp_y:%d\n"
-                       "    x_st:%d\n"
-                       "    y_st:%d\n"
+                       "    state:%d"
+                       "    y_vir:%d"
+                       "    dsp_x:%d"
+                       "    dsp_y:%d"
+                       "    x_st:%d"
+                       "    y_st:%d"
                        "    addr:0x%x\n",
                        h_pw_bp,v_pw_bp,
                        layer3_sel,layer2_sel,layer1_sel,layer0_sel,