From patchwork Tue Aug 28 08:32:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?6buE5a626ZKX?= X-Patchwork-Id: 10578043 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5F5AD920 for ; Tue, 28 Aug 2018 08:33:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4CB78274A3 for ; Tue, 28 Aug 2018 08:33:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F97029B1D; Tue, 28 Aug 2018 08:33:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: * X-Spam-Status: No, score=1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_SBL_CSS, RCVD_IN_SORBS_WEB autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EA8A8274A3 for ; Tue, 28 Aug 2018 08:33:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=EqKHZE7pOc3lHhtF3eUcYR8fZ3aiZgMEsb7VC9EHkKU=; b=atw 9+kFKh/INPGo7gUI3CGUyNXkUzb97GfB6FSRu91UW8GtRYzSgqJhaedHbC3A/f0j0ACrGMGaVy98Y Q+J2IdOPjcIO1CTvk4M5KSfmPMLNE+Tus4vg5zCyccoRav0/RlR1Hi0hCSBkOj/IAv4ujXUBEGjYr V+k8xrR3w1xzTYsw4BslG6kYoz02CNd6j8h4szckzp01UzLkKQupfYe2DmpvxT/IzEdJe5CNquWro mBno4VKaPHb/B0OZ7VaW8T98VT+OmE7T72NfcIxLaxqv4/9DKxSgyr8dtyi6tcnqS4iPOmQOjo4+A bPk0S2QtK9UEjQ5KTxaUDqi8/dRZ2Hw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuZRB-0003ih-SI; Tue, 28 Aug 2018 08:33:21 +0000 Received: from regular1.263xmail.com ([211.150.99.139]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fuZQj-0003RC-Qn; Tue, 28 Aug 2018 08:33:17 +0000 Received: from hjc?rock-chips.com (unknown [192.168.167.8]) by regular1.263xmail.com (Postfix) with ESMTP id 62AB843D; Tue, 28 Aug 2018 16:32:41 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id 89AC93F8; Tue, 28 Aug 2018 16:32:39 +0800 (CST) X-IP-DOMAINF: 1 X-RL-SENDER: hjc@rock-chips.com X-FST-TO: hjc@rock-chips.com X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: hjc@rock-chips.com X-UNIQUE-TAG: <6bd076a808940d035c6e904059178093> X-ATTACHMENT-NUM: 0 X-SENDER: hjc@rock-chips.com X-DNS-TYPE: 0 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith ESMTP id 31698GND4NZ; Tue, 28 Aug 2018 16:32:40 +0800 (CST) From: Sandy Huang To: hjc@rock-chips.com, heiko@sntech.de, David Airlie Subject: [PATCH] drm/rockchip: vop: fix some register define error for px30 Date: Tue, 28 Aug 2018 16:32:30 +0800 Message-Id: <1535445150-40296-1-git-send-email-hjc@rock-chips.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180828_013254_154717_F9F6480F X-CRM114-Status: GOOD ( 11.88 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 1. interrupt register define error lead to enable interrupt failed; 2. px30 unsupport hdmi output; 3. there are some hardware designed bug, we must swap win2 gate and enable offset, otherwise will appear vop iommu pagefault. Signed-off-by: Sandy Huang --- drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c index d824ca6..7f29913 100644 --- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c +++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c @@ -190,10 +190,10 @@ static const int px30_vop_intrs[] = { static const struct vop_intr px30_intr = { .intrs = px30_vop_intrs, .nintrs = ARRAY_SIZE(px30_vop_intrs), - .line_flag_num[0] = VOP_REG(PX30_LINE_FLAG, 0xfff, 12), - .status = VOP_REG_SYNC(PX30_INTR_STATUS, 0xf, 0), - .enable = VOP_REG_SYNC(PX30_INTR_EN, 0xf, 4), - .clear = VOP_REG_SYNC(PX30_INTR_CLEAR, 0xf, 8), + .line_flag_num[0] = VOP_REG(PX30_LINE_FLAG, 0xfff, 0), + .status = VOP_REG_MASK_SYNC(PX30_INTR_STATUS, 0xffff, 0), + .enable = VOP_REG_MASK_SYNC(PX30_INTR_EN, 0xffff, 0), + .clear = VOP_REG_MASK_SYNC(PX30_INTR_CLEAR, 0xffff, 0), }; static const struct vop_common px30_common = { @@ -212,10 +212,8 @@ static const struct vop_modeset px30_modeset = { static const struct vop_output px30_output = { .rgb_pin_pol = VOP_REG(PX30_DSP_CTRL0, 0xf, 1), - .hdmi_pin_pol = VOP_REG(PX30_DSP_CTRL0, 0xf, 9), .mipi_pin_pol = VOP_REG(PX30_DSP_CTRL0, 0xf, 25), .rgb_en = VOP_REG(PX30_DSP_CTRL0, 0x1, 0), - .hdmi_en = VOP_REG(PX30_DSP_CTRL0, 0x1, 8), .mipi_en = VOP_REG(PX30_DSP_CTRL0, 0x1, 24), }; @@ -257,8 +255,8 @@ static const struct vop_win_phy px30_win1_data = { static const struct vop_win_phy px30_win2_data = { .data_formats = formats_win_lite, .nformats = ARRAY_SIZE(formats_win_lite), - .gate = VOP_REG(PX30_WIN2_CTRL0, 0x1, 0), - .enable = VOP_REG(PX30_WIN2_CTRL0, 0x1, 4), + .gate = VOP_REG(PX30_WIN2_CTRL0, 0x1, 4), + .enable = VOP_REG(PX30_WIN2_CTRL0, 0x1, 0), .format = VOP_REG(PX30_WIN2_CTRL0, 0x3, 5), .rb_swap = VOP_REG(PX30_WIN2_CTRL0, 0x1, 20), .dsp_info = VOP_REG(PX30_WIN2_DSP_INFO0, 0x0fff0fff, 0),