Lines Matching refs:win
43 #define VOP_WIN_SET(vop, win, name, v) \ argument
44 vop_reg_set(vop, &win->phy->name, win->base, ~0, v, #name)
45 #define VOP_SCL_SET(vop, win, name, v) \ argument
46 vop_reg_set(vop, &win->phy->scl->name, win->base, ~0, v, #name)
47 #define VOP_SCL_SET_EXT(vop, win, name, v) \ argument
48 vop_reg_set(vop, &win->phy->scl->ext->name, \
49 win->base, ~0, v, #name)
83 #define VOP_WIN_GET(vop, win, name) \ argument
84 vop_read_reg(vop, win->base, &win->phy->name)
86 #define VOP_WIN_HAS_REG(win, name) \ argument
87 (!!(win->phy->name.mask))
89 #define VOP_WIN_GET_YRGBADDR(vop, win) \ argument
90 vop_readl(vop, win->base + win->phy->yrgb_mst.offset)
93 ((vop_win) - (vop_win)->vop->win)
183 struct vop_win win[]; member
348 static void scl_vop_cal_scl_fac(struct vop *vop, const struct vop_win_data *win, in scl_vop_cal_scl_fac() argument
371 if (!win->phy->scl->ext) { in scl_vop_cal_scl_fac()
372 VOP_SCL_SET(vop, win, scale_yrgb_x, in scl_vop_cal_scl_fac()
374 VOP_SCL_SET(vop, win, scale_yrgb_y, in scl_vop_cal_scl_fac()
377 VOP_SCL_SET(vop, win, scale_cbcr_x, in scl_vop_cal_scl_fac()
379 VOP_SCL_SET(vop, win, scale_cbcr_y, in scl_vop_cal_scl_fac()
402 VOP_SCL_SET_EXT(vop, win, lb_mode, lb_mode); in scl_vop_cal_scl_fac()
421 VOP_SCL_SET(vop, win, scale_yrgb_x, val); in scl_vop_cal_scl_fac()
424 VOP_SCL_SET(vop, win, scale_yrgb_y, val); in scl_vop_cal_scl_fac()
426 VOP_SCL_SET_EXT(vop, win, vsd_yrgb_gt4, vskiplines == 4); in scl_vop_cal_scl_fac()
427 VOP_SCL_SET_EXT(vop, win, vsd_yrgb_gt2, vskiplines == 2); in scl_vop_cal_scl_fac()
429 VOP_SCL_SET_EXT(vop, win, yrgb_hor_scl_mode, yrgb_hor_scl_mode); in scl_vop_cal_scl_fac()
430 VOP_SCL_SET_EXT(vop, win, yrgb_ver_scl_mode, yrgb_ver_scl_mode); in scl_vop_cal_scl_fac()
431 VOP_SCL_SET_EXT(vop, win, yrgb_hsd_mode, SCALE_DOWN_BIL); in scl_vop_cal_scl_fac()
432 VOP_SCL_SET_EXT(vop, win, yrgb_vsd_mode, SCALE_DOWN_BIL); in scl_vop_cal_scl_fac()
433 VOP_SCL_SET_EXT(vop, win, yrgb_vsu_mode, vsu_mode); in scl_vop_cal_scl_fac()
437 VOP_SCL_SET(vop, win, scale_cbcr_x, val); in scl_vop_cal_scl_fac()
440 VOP_SCL_SET(vop, win, scale_cbcr_y, val); in scl_vop_cal_scl_fac()
442 VOP_SCL_SET_EXT(vop, win, vsd_cbcr_gt4, vskiplines == 4); in scl_vop_cal_scl_fac()
443 VOP_SCL_SET_EXT(vop, win, vsd_cbcr_gt2, vskiplines == 2); in scl_vop_cal_scl_fac()
444 VOP_SCL_SET_EXT(vop, win, cbcr_hor_scl_mode, cbcr_hor_scl_mode); in scl_vop_cal_scl_fac()
445 VOP_SCL_SET_EXT(vop, win, cbcr_ver_scl_mode, cbcr_ver_scl_mode); in scl_vop_cal_scl_fac()
446 VOP_SCL_SET_EXT(vop, win, cbcr_hsd_mode, SCALE_DOWN_BIL); in scl_vop_cal_scl_fac()
447 VOP_SCL_SET_EXT(vop, win, cbcr_vsd_mode, SCALE_DOWN_BIL); in scl_vop_cal_scl_fac()
448 VOP_SCL_SET_EXT(vop, win, cbcr_vsu_mode, vsu_mode); in scl_vop_cal_scl_fac()
573 const struct vop_win_data *win = vop_win->data; in vop_win_disable() local
575 if (win->phy->scl && win->phy->scl->ext) { in vop_win_disable()
576 VOP_SCL_SET_EXT(vop, win, yrgb_hor_scl_mode, SCALE_NONE); in vop_win_disable()
577 VOP_SCL_SET_EXT(vop, win, yrgb_ver_scl_mode, SCALE_NONE); in vop_win_disable()
578 VOP_SCL_SET_EXT(vop, win, cbcr_hor_scl_mode, SCALE_NONE); in vop_win_disable()
579 VOP_SCL_SET_EXT(vop, win, cbcr_ver_scl_mode, SCALE_NONE); in vop_win_disable()
582 VOP_WIN_SET(vop, win, enable, 0); in vop_win_disable()
633 struct vop_win *vop_win = &vop->win[i]; in vop_enable()
685 struct vop_win *vop_win = &vop->win[i]; in rockchip_drm_set_win_enabled()
686 const struct vop_win_data *win = vop_win->data; in rockchip_drm_set_win_enabled() local
688 VOP_WIN_SET(vop, win, enable, in rockchip_drm_set_win_enabled()
790 const struct vop_win_data *win = vop_win->data; in vop_plane_atomic_check() local
792 int min_scale = win->phy->scl ? FRAC_16_16(1, 8) : in vop_plane_atomic_check()
794 int max_scale = win->phy->scl ? FRAC_16_16(8, 1) : in vop_plane_atomic_check()
886 const struct vop_win_data *win = vop_win->data; in vop_plane_atomic_update() local
959 VOP_WIN_SET(vop, win, format, format); in vop_plane_atomic_update()
960 VOP_WIN_SET(vop, win, yrgb_vir, DIV_ROUND_UP(fb->pitches[0], 4)); in vop_plane_atomic_update()
961 VOP_WIN_SET(vop, win, yrgb_mst, dma_addr); in vop_plane_atomic_update()
963 VOP_WIN_SET(vop, win, y_mir_en, in vop_plane_atomic_update()
965 VOP_WIN_SET(vop, win, x_mir_en, in vop_plane_atomic_update()
980 VOP_WIN_SET(vop, win, uv_vir, DIV_ROUND_UP(fb->pitches[1], 4)); in vop_plane_atomic_update()
981 VOP_WIN_SET(vop, win, uv_mst, dma_addr); in vop_plane_atomic_update()
991 if (win->phy->scl) in vop_plane_atomic_update()
992 scl_vop_cal_scl_fac(vop, win, actual_w, actual_h, in vop_plane_atomic_update()
996 VOP_WIN_SET(vop, win, act_info, act_info); in vop_plane_atomic_update()
997 VOP_WIN_SET(vop, win, dsp_info, dsp_info); in vop_plane_atomic_update()
998 VOP_WIN_SET(vop, win, dsp_st, dsp_st); in vop_plane_atomic_update()
1001 VOP_WIN_SET(vop, win, rb_swap, rb_swap); in vop_plane_atomic_update()
1011 VOP_WIN_SET(vop, win, dst_alpha_ctl, in vop_plane_atomic_update()
1018 VOP_WIN_SET(vop, win, src_alpha_ctl, val); in vop_plane_atomic_update()
1020 VOP_WIN_SET(vop, win, alpha_pre_mul, ALPHA_SRC_PRE_MUL); in vop_plane_atomic_update()
1021 VOP_WIN_SET(vop, win, alpha_mode, ALPHA_PER_PIX); in vop_plane_atomic_update()
1022 VOP_WIN_SET(vop, win, alpha_en, 1); in vop_plane_atomic_update()
1024 VOP_WIN_SET(vop, win, src_alpha_ctl, SRC_ALPHA_EN(0)); in vop_plane_atomic_update()
1025 VOP_WIN_SET(vop, win, alpha_en, 0); in vop_plane_atomic_update()
1028 VOP_WIN_SET(vop, win, enable, 1); in vop_plane_atomic_update()
1039 const struct vop_win_data *win = vop_win->data; in vop_plane_atomic_async_check() local
1040 int min_scale = win->phy->scl ? FRAC_16_16(1, 8) : in vop_plane_atomic_async_check()
1042 int max_scale = win->phy->scl ? FRAC_16_16(8, 1) : in vop_plane_atomic_async_check()
1781 struct vop_win *vop_win = &vop->win[i]; in vop_create_crtc()
1825 struct vop_win *vop_win = &vop->win[i]; in vop_create_crtc()
1979 struct vop_win *vop_win = &vop->win[i]; in vop_initial()
1980 const struct vop_win_data *win = vop_win->data; in vop_initial() local
1983 VOP_WIN_SET(vop, win, channel, (channel + 1) << 4 | channel); in vop_initial()
1985 VOP_WIN_SET(vop, win, gate, 1); in vop_initial()
2032 struct vop_win *vop_win = &vop->win[i]; in vop_win_init()
2033 const struct vop_win_data *win_data = &vop_data->win[i]; in vop_win_init()
2106 vop = devm_kzalloc(dev, struct_size(vop, win, vop_data->win_size), in vop_bind()