From: Mark Yao Date: Mon, 14 Dec 2015 10:14:36 +0000 (+0800) Subject: drm/rockchip: vop: merge vop cfg_done into vop_data X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0cf33fe33d4e9fdbbdd0b93101b078b03d0ba9b5;p=openwrt%2Fstaging%2Fblogic.git drm/rockchip: vop: merge vop cfg_done into vop_data Move cfg_done register into vop_data, so it can use at multi-vop driver Signed-off-by: Mark Yao --- diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 6ded4cca0283..dcb1396a4133 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -164,6 +164,8 @@ struct vop_ctrl { struct vop_reg vact_st_end; struct vop_reg hpost_st_end; struct vop_reg vpost_st_end; + + struct vop_reg cfg_done; }; struct vop_scl_regs { @@ -333,6 +335,7 @@ static const struct vop_ctrl ctrl_data = { .vact_st_end = VOP_REG(DSP_VACT_ST_END, 0x1fff1fff, 0), .hpost_st_end = VOP_REG(POST_DSP_HACT_INFO, 0x1fff1fff, 0), .vpost_st_end = VOP_REG(POST_DSP_VACT_INFO, 0x1fff1fff, 0), + .cfg_done = VOP_REG(REG_CFG_DONE, 0x1, 0), }; static const struct vop_reg_data vop_init_reg_table[] = { @@ -393,11 +396,6 @@ static inline uint32_t vop_read_reg(struct vop *vop, uint32_t base, return (vop_readl(vop, base + reg->offset) >> reg->shift) & reg->mask; } -static inline void vop_cfg_done(struct vop *vop) -{ - writel(0x01, vop->regs + REG_CFG_DONE); -} - static inline void vop_mask_write(struct vop *vop, uint32_t offset, uint32_t mask, uint32_t v) { @@ -422,6 +420,11 @@ static inline void vop_mask_write_relaxed(struct vop *vop, uint32_t offset, } } +static inline void vop_cfg_done(struct vop *vop) +{ + VOP_CTRL_SET(vop, cfg_done, 1); +} + static bool has_rb_swapped(uint32_t format) { switch (format) {