struct rk_lcdc_win *win = dev_drv->win[win_id];
u32 mask, val;
- mask = m_IFBDC_CTRL_FBDC_EN | m_IFBDC_CTRL_FBDC_COR_EN |
+ if (lcdc_dev->soc_type != VOP_FULL_RK3368) {
+ pr_err("soc: 0x%08x not support FBDC\n", lcdc_dev->soc_type);
+ return 0;
+ }
+ mask = m_IFBDC_CTRL_FBDC_COR_EN |
m_IFBDC_CTRL_FBDC_WIN_SEL | m_IFBDC_CTRL_FBDC_ROTATION_MODE |
m_IFBDC_CTRL_FBDC_FMT | m_IFBDC_CTRL_WIDTH_RATIO;
- val = v_IFBDC_CTRL_FBDC_EN(win->area[0].fbdc_en) |
- v_IFBDC_CTRL_FBDC_COR_EN(win->area[0].fbdc_cor_en) |
+ val = v_IFBDC_CTRL_FBDC_COR_EN(win->area[0].fbdc_cor_en) |
v_IFBDC_CTRL_FBDC_WIN_SEL(win->id) |
v_IFBDC_CTRL_FBDC_ROTATION_MODE((win->xmirror &&
win->ymirror) << 1) |
return 0;
}
+ if (lcdc_dev->soc_type != VOP_FULL_RK3368) {
+ pr_err("soc: 0x%08x not support FBDC\n", lcdc_dev->soc_type);
+ return 0;
+ }
switch (win->area[0].fmt_cfg) {
case VOP_FORMAT_ARGB888:
fbdc_dsp_width_ratio = 0;
if (win->state == 1) {
rk3368_lcdc_csc_mode(lcdc_dev, win);
rk3368_lcdc_axi_gather_cfg(lcdc_dev, win);
- if (win->area[0].fbdc_en) {
+ if (win->area[0].fbdc_en)
rk3368_fbdc_reg_update(&lcdc_dev->driver, win_id);
- } else {
- mask = m_IFBDC_CTRL_FBDC_EN;
- val = v_IFBDC_CTRL_FBDC_EN(0);
- lcdc_msk_reg(lcdc_dev, IFBDC_CTRL, mask, val);
- }
mask = m_WIN0_EN | m_WIN0_DATA_FMT | m_WIN0_FMT_10 |
m_WIN0_LB_MODE | m_WIN0_RB_SWAP | m_WIN0_X_MIRROR |
m_WIN0_Y_MIRROR | m_WIN0_CSC_MODE | m_WIN0_UV_SWAP;
if (win->state == 1) {
rk3368_lcdc_csc_mode(lcdc_dev, win);
rk3368_lcdc_axi_gather_cfg(lcdc_dev, win);
- if (win->area[0].fbdc_en) {
+ if (win->area[0].fbdc_en)
rk3368_fbdc_reg_update(&lcdc_dev->driver, win_id);
- } else {
- mask = m_IFBDC_CTRL_FBDC_EN;
- val = v_IFBDC_CTRL_FBDC_EN(0);
- lcdc_msk_reg(lcdc_dev, IFBDC_CTRL, mask, val);
- }
mask = m_WIN2_EN | m_WIN2_CSC_MODE;
val = v_WIN2_EN(1) | v_WIN1_CSC_MODE(win->csc_mode);
struct lcdc_device *lcdc_dev =
container_of(dev_drv, struct lcdc_device, driver);
int i;
- unsigned int mask, val;
+ unsigned int mask, val, fbdc_en = 0;
struct rk_lcdc_win *win = NULL;
u32 line_scane_num, dsp_vs_st_f1;
v_STANDBY_EN(lcdc_dev->standby));
for (i = 0; i < 4; i++) {
win = dev_drv->win[i];
+ fbdc_en |= win->area[0].fbdc_en;
if ((win->state == 0) && (win->last_state == 1)) {
switch (win->id) {
case 0:
}
win->last_state = win->state;
}
+ if (lcdc_dev->soc_type == VOP_FULL_RK3368) {
+ mask = m_IFBDC_CTRL_FBDC_EN;
+ val = v_IFBDC_CTRL_FBDC_EN(fbdc_en);
+ lcdc_msk_reg(lcdc_dev, IFBDC_CTRL, mask, val);
+ }
lcdc_cfg_done(lcdc_dev);
spin_unlock(&lcdc_dev->reg_lock);
return 0;