Lines Matching +full:rockchip +full:- +full:vop

2  * (C) Copyright 2008-2017 Fuzhou Rockchip Electronics Co., Ltd
4 * SPDX-License-Identifier: GPL-2.0+
13 #define VOP_REG_SUPPORT(vop, reg) \ argument
16 (reg.major == VOP_MAJOR(vop->version) && \
17 reg.begin_minor <= VOP_MINOR(vop->version) && \
18 reg.end_minor >= VOP_MINOR(vop->version))))
20 #define VOP_WIN_SUPPORT(vop, win, name) \ argument
21 VOP_REG_SUPPORT(vop, win->name)
23 #define VOP_CTRL_SUPPORT(vop, name) \ argument
24 VOP_REG_SUPPORT(vop, vop->ctrl->name)
29 #define _REG_SET(vop, name, off, reg, mask, v) \ argument
31 if (VOP_REG_SUPPORT(vop, reg)) \
32 __REG_SET(vop, off + reg.offset, mask, reg.shift, \
44 REG_SET(x, name, x->win_offset, x->win->name, v)
46 REG_SET(x, name, x->win_offset, x->win->ext->name, v)
48 REG_SET(x, name, x->win_offset, x->win->scl->name, v)
50 REG_SET(x, name, x->win_offset, x->win->scl->ext->name, v)
53 REG_SET(x, name, 0, (x)->ctrl->name, v)
55 REG_SET(x, name, 0, (x)->line_flag->name, v)
57 REG_SET(x, name, 0, (x)->win_csc->name, v)
60 vop_read_reg(x, 0, &vop->ctrl->name)
63 vop_read_reg(x, vop->win->offset, &vop->win->name)
65 #define VOP_GRF_SET(vop, name, v) \ argument
67 if (vop->grf_ctrl) { \
68 vop_grf_writel(vop, vop->grf_ctrl->name, v); \
164 return ((src * 2 - 3) << (shift - 1)) / (dst - 1); in scl_cal_scale()
169 return ((src - 1) << 12) / (dst - 1); in scl_cal_scale2()
181 act_height = (src_h + vskiplines - 1) / vskiplines; in scl_get_bili_dn_vskip()
473 struct vop { struct
490 static inline void vop_writel(struct vop *vop, uint32_t offset, uint32_t v) in vop_writel() argument
492 writel(v, vop->regs + offset); in vop_writel()
493 vop->regsbak[offset >> 2] = v; in vop_writel()
496 static inline uint32_t vop_readl(struct vop *vop, uint32_t offset) in vop_readl() argument
498 return readl(vop->regs + offset); in vop_readl()
501 static inline uint32_t vop_read_reg(struct vop *vop, uint32_t base, in vop_read_reg() argument
504 return (vop_readl(vop, base + reg->offset) >> reg->shift) & reg->mask; in vop_read_reg()
507 static inline void vop_mask_write(struct vop *vop, uint32_t offset, in vop_mask_write() argument
517 uint32_t cached_val = vop->regsbak[offset >> 2]; in vop_mask_write()
520 vop->regsbak[offset >> 2] = v; in vop_mask_write()
523 writel(v, vop->regs + offset); in vop_mask_write()
526 static inline void vop_cfg_done(struct vop *vop) in vop_cfg_done() argument
528 VOP_CTRL_SET(vop, cfg_done, 1); in vop_cfg_done()
531 static inline void vop_grf_writel(struct vop *vop, struct vop_reg reg, u32 v) in vop_grf_writel() argument
535 if (VOP_REG_SUPPORT(vop, reg)) { in vop_grf_writel()
537 writel(val, vop->grf + reg.offset); in vop_grf_writel()
542 * drm_format_horz_chroma_subsampling - get the horizontal chroma subsampling factor
556 * drm_format_vert_chroma_subsampling - get the vertical chroma subsampling factor