lcdc_writel(lcdc_dev, WIN0_DSP_INFO,v_DSP_WIDTH(win->area[0].xsize) |
v_DSP_HEIGHT(win->area[0].ysize));
lcdc_msk_reg(lcdc_dev, WIN_VIR, m_WIN0_VIR, v_WIN0_VIR_VAL(win->area[0].y_vir_stride));
- lcdc_msk_reg(lcdc_dev, SYS_CTRL, m_WIN0_RB_SWAP, v_WIN0_RB_SWAP(win->swap_rb));
+ lcdc_msk_reg(lcdc_dev, SYS_CTRL, m_WIN0_EN | m_WIN0_RB_SWAP,
+ v_WIN0_EN(win->state) | v_WIN0_RB_SWAP(win->swap_rb));
lcdc_msk_reg(lcdc_dev, WIN0_COLOR_KEY, m_COLOR_KEY_EN, v_COLOR_KEY_EN(0));
}
spin_unlock(&lcdc_dev->reg_lock);
win->fmt_cfg = fmt_cfg;
if (likely(lcdc_dev->clk_on)) {
lcdc_writel(lcdc_dev, WIN1_DSP_INFO,v_DSP_WIDTH(win->area[0].xsize) |
- v_DSP_HEIGHT(win->area[1].ysize));
+ v_DSP_HEIGHT(win->area[0].ysize));
lcdc_writel(lcdc_dev, WIN1_DSP_ST,v_DSP_STX(xpos) | v_DSP_STY(ypos));
- lcdc_msk_reg(lcdc_dev, SYS_CTRL,m_WIN1_RB_SWAP, v_WIN1_RB_SWAP(win->swap_rb));
+ lcdc_msk_reg(lcdc_dev, SYS_CTRL, m_WIN1_EN | m_WIN1_RB_SWAP,
+ v_WIN1_EN(win->state) | v_WIN1_RB_SWAP(win->swap_rb));
lcdc_msk_reg(lcdc_dev, SYS_CTRL,m_WIN1_FORMAT, v_WIN1_FORMAT(fmt_cfg));
lcdc_msk_reg(lcdc_dev, WIN_VIR, m_WIN1_VIR, ((win->area[0].y_vir_stride)&0x1fff)<<16);
}
return -EINVAL;
}
+ if (lcdc_dev->clk_on) {
+ rk3188_lcdc_alpha_cfg(lcdc_dev);
+ }
return 0;
}
screen->screen_id = 0;
screen->lcdc_id = dev_drv->id;
- rk_fb_set_prmry_screen(screen);
dev_drv->screen0 = screen;
dev_drv->cur_screen = screen;
/* devie use one lcdc + rk61x scaler for dual display*/
dev_drv->ops->fb_win_remap(dev_drv, FB_DEFAULT_ORDER);
dev_drv->first_frame = 1;
rk_disp_pwr_ctr_parse_dt(dev_drv);
- if (dev_drv->prop == PRMRY)
+ if (dev_drv->prop == PRMRY) {
+ rk_fb_set_prmry_screen(screen);
rk_fb_get_prmry_screen(screen);
+ }
dev_drv->trsm_ops = rk_fb_trsm_ops_get(screen->type);
return 0;