From patchwork Thu Dec 17 03:37:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yao mark X-Patchwork-Id: 7869061 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2B4C4BEEE5 for ; Thu, 17 Dec 2015 03:38:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A35D5203EC for ; Thu, 17 Dec 2015 03:38:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D51EE203E9 for ; Thu, 17 Dec 2015 03:38:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D5B296E93C; Wed, 16 Dec 2015 19:38:20 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from regular1.263xmail.com (regular1.263xmail.com [211.150.99.138]) by gabe.freedesktop.org (Postfix) with ESMTPS id 697F86E93A for ; Wed, 16 Dec 2015 19:38:19 -0800 (PST) Received: from mark.yao?rock-chips.com (unknown [192.168.167.87]) by regular1.263xmail.com (Postfix) with SMTP id 0A22D51BB; Thu, 17 Dec 2015 11:38:15 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id 0137F4550; Thu, 17 Dec 2015 11:38:14 +0800 (CST) X-RL-SENDER: mark.yao@rock-chips.com X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: mark.yao@rock-chips.com X-UNIQUE-TAG: <13003d9bae9c45694b7aec97e87c2916> X-ATTACHMENT-NUM: 0 X-SENDER: yzq@rock-chips.com X-DNS-TYPE: 0 Received: from unknown (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith SMTP id 65025LXQEN; Thu, 17 Dec 2015 11:38:15 +0800 (CST) From: Mark Yao To: David Airlie , Heiko Stuebner , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/6] drm/rockchip: vop: merge vop cfg_done into vop_data Date: Thu, 17 Dec 2015 11:37:01 +0800 Message-Id: <1450323426-32109-2-git-send-email-mark.yao@rock-chips.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1450323426-32109-1-git-send-email-mark.yao@rock-chips.com> References: <1450323426-32109-1-git-send-email-mark.yao@rock-chips.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Move cfg_done register into vop_data, so it can use at multi-vop driver Signed-off-by: Mark Yao --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 6ded4cc..dcb1396 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) {