mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
rk312x lcdc: open interlace read mode when in 576i/480i and y_scale_fac over 2
This commit is contained in:
@@ -291,7 +291,8 @@ static void lcdc_layer_update_regs(struct lcdc_device *lcdc_dev,
|
||||
v_WIN0_FORMAT(win->fmt_cfg) |
|
||||
v_WIN0_RB_SWAP(win->swap_rb);
|
||||
lcdc_msk_reg(lcdc_dev, SYS_CTRL, mask, val);
|
||||
|
||||
lcdc_msk_reg(lcdc_dev, DSP_CTRL0, m_WIN0_INTERLACE_EN,
|
||||
v_WIN0_INTERLACE_EN(win->interlace_read));
|
||||
lcdc_writel(lcdc_dev, WIN0_SCL_FACTOR_YRGB,
|
||||
v_X_SCL_FACTOR(win->scale_yrgb_x) |
|
||||
v_Y_SCL_FACTOR(win->scale_yrgb_y));
|
||||
@@ -323,7 +324,8 @@ static void lcdc_layer_update_regs(struct lcdc_device *lcdc_dev,
|
||||
v_WIN1_FORMAT(win->fmt_cfg) |
|
||||
v_WIN1_RB_SWAP(win->swap_rb);
|
||||
lcdc_msk_reg(lcdc_dev, SYS_CTRL, mask, val);
|
||||
|
||||
lcdc_msk_reg(lcdc_dev, DSP_CTRL0, m_WIN1_INTERLACE_EN,
|
||||
v_WIN1_INTERLACE_EN(win->interlace_read));
|
||||
/* rk312x unsupport win1 scale */
|
||||
if (lcdc_dev->soc_type == VOP_RK3036) {
|
||||
lcdc_writel(lcdc_dev, WIN1_SCL_FACTOR_YRGB,
|
||||
@@ -1143,6 +1145,22 @@ static int rk312x_lcdc_set_par(struct rk_lcdc_driver *dev_drv, int win_id)
|
||||
}
|
||||
win->scale_yrgb_x = CalScale(win->area[0].xact, win->area[0].xsize);
|
||||
win->scale_yrgb_y = CalScale(win->area[0].yact, win->area[0].ysize);
|
||||
|
||||
win->interlace_read = 0;
|
||||
if((screen->mode.xres == 720) &&
|
||||
((screen->mode.yres == 576) || (screen->mode.yres == 480))) {
|
||||
if (lcdc_dev->soc_type == VOP_RK3036) {
|
||||
if (win->scale_yrgb_y > 2*0x1000)
|
||||
win->interlace_read = 1;
|
||||
} else if (lcdc_dev->soc_type == VOP_RK312X) {
|
||||
if (win_id == 0) {
|
||||
if (win->scale_yrgb_y > 2*0x1000)
|
||||
win->interlace_read = 1;
|
||||
} else if (win_id == 0) {
|
||||
win->interlace_read = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (win->format) {
|
||||
case ARGB888:
|
||||
win->fmt_cfg = VOP_FORMAT_ARGB888;
|
||||
|
||||
Reference in New Issue
Block a user