public inbox for linux-rockchip@lists.infradead.org
 help / color / mirror / Atom feed
From: Sandy Huang <hjc@rock-chips.com>
To: hjc@rock-chips.com, heiko@sntech.de, David Airlie <airlied@linux.ie>
Cc: linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH] drm/rockchip: vop: fix some register define error for px30
Date: Tue, 28 Aug 2018 16:32:30 +0800	[thread overview]
Message-ID: <1535445150-40296-1-git-send-email-hjc@rock-chips.com> (raw)

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 <hjc@rock-chips.com>
---
 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),
-- 
2.7.4


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2018-08-28  8:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-28  8:32 Sandy Huang [this message]
2018-08-29 12:03 ` [PATCH] drm/rockchip: vop: fix some register define error for px30 Heiko Stuebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1535445150-40296-1-git-send-email-hjc@rock-chips.com \
    --to=hjc@rock-chips.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox