val = v_IFBDC_CTRL_FBDC_EN(win->area[0].fbdc_en) |
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->mirror_en << 1) |
+ v_IFBDC_CTRL_FBDC_ROTATION_MODE((win->xmirror &&
+ win->ymirror) << 1) |
v_IFBDC_CTRL_FBDC_FMT(win->area[0].fbdc_fmt_cfg) |
v_IFBDC_CTRL_WIDTH_RATIO(win->area[0].fbdc_dsp_width_ratio);
lcdc_msk_reg(lcdc_dev, IFBDC_CTRL, mask, val);
break;
}
*/
- if ((win->mirror_en) && ((win_id == 2) || (win_id == 3))) {
+ if (win->xmirror && win->ymirror && ((win_id == 2) || (win_id == 3))) {
fbdc_cmp_index_init =
((fbdc_mb_yst + (fbdc_mb_height - 1)) * fbdc_mb_vir_width) +
(fbdc_mb_xst + (fbdc_mb_width - 1));
v_WIN0_FMT_10(win->fmt_10) |
v_WIN0_LB_MODE(win->win_lb_mode) |
v_WIN0_RB_SWAP(win->area[0].swap_rb) |
- v_WIN0_X_MIRROR(win->mirror_en) |
- v_WIN0_Y_MIRROR(win->mirror_en) |
+ v_WIN0_X_MIRROR(win->xmirror) |
+ v_WIN0_Y_MIRROR(win->ymirror) |
v_WIN0_CSC_MODE(win->csc_mode) |
v_WIN0_UV_SWAP(win->area[0].swap_uv);
lcdc_msk_reg(lcdc_dev, WIN0_CTRL0 + off, mask, val);
lcdc_writel(lcdc_dev, WIN0_YRGB_MST, rgb_mst);
lcdc_cfg_done(lcdc_dev);
+ win->ymirror = ymirror;
win->state = 1;
win->last_state = 1;
__func__, win->win_lb_mode);
break;
}
- if (win->mirror_en == 1)
+ if (win->ymirror == 1)
win->yrgb_vsd_mode = SCALE_DOWN_BIL;
if (screen->mode.vmode & FB_VMODE_INTERLACED) {
u8 fmt_cfg = 0, swap_rb, swap_uv = 0;
char fmt[9] = "NULL";
- xpos = dsp_x_pos(win->mirror_en, screen, &win->area[0]);
- ypos = dsp_y_pos(win->mirror_en, screen, &win->area[0]);
+ xpos = dsp_x_pos(win->xmirror, screen, &win->area[0]);
+ ypos = dsp_y_pos(win->ymirror, screen, &win->area[0]);
spin_lock(&lcdc_dev->reg_lock);
if (likely(lcdc_dev->clk_on)) {
u8 fmt_cfg, swap_rb;
char fmt[9] = "NULL";
- if (win->mirror_en)
+ if (win->ymirror)
pr_err("win[%d] not support y mirror\n", win->id);
spin_lock(&lcdc_dev->reg_lock);
if (likely(lcdc_dev->clk_on)) {
win->area[i].fmt_cfg = fmt_cfg;
win->area[i].swap_rb = swap_rb;
win->area[i].dsp_stx =
- dsp_x_pos(win->mirror_en, screen,
+ dsp_x_pos(win->xmirror, screen,
&win->area[i]);
win->area[i].dsp_sty =
- dsp_y_pos(win->mirror_en, screen,
+ dsp_y_pos(win->ymirror, screen,
&win->area[i]);
if (((win->area[i].xact != win->area[i].xsize) ||
(win->area[i].yact != win->area[i].ysize)) &&
/* x y mirror ,jump line */
if ((screen->y_mirror == 1) ||
- (win->mirror_en == 1)) {
+ (win->xmirror && win->ymirror)) {
if (screen->interlace == 1) {
win->area[0].y_offset = yoffset * stride * 2 +
((win->area[0].yact - 1) * 2 + 1) * stride +
}
if (is_pic_yuv == 1) {
if ((screen->y_mirror == 1) ||
- (win->mirror_en == 1)) {
+ (win->xmirror && win->ymirror)) {
if (screen->interlace == 1) {
win->area[0].c_offset =
uv_y_off * uv_stride * 2 +
win->alpha_en = reg_win_data->alpha_en;
win->alpha_mode = reg_win_data->alpha_mode;
win->g_alpha_val = reg_win_data->g_alpha_val;
- win->mirror_en = reg_win_data->mirror_en;
+ /*
+ * reg_win_data mirror_en means that xmirror ymirror all
+ * enabled.
+ */
+ win->xmirror = reg_win_data->mirror_en ? 1 : 0;
+ win->ymirror = reg_win_data->mirror_en ? 1 : 0;
win->colorspace = reg_win_data->colorspace;
win->area[0].fbdc_en =
reg_win_data->reg_area_data[0].fbdc_en;
win->area[0].yvir = var->yres_virtual;
win->area[0].xoff = xoffset;
win->area[0].yoff = yoffset;
+ win->ymirror = 0;
win->state = 1;
win->last_state = 1;