Skip to contentSkip to conversation

drm/rockchip: vop: fix vop vsync/hsync polarity

PATCH In review Mark Yao 4 participants 4 messages Jan 22, 2015 – Jan 24, 2015

Subsystems (4)
lore
Share & tools
lore

Mark Yao

author
#0 lore raw

PATCH 1/1 drm/rockchip: vop: fix vop vsync/hsync polarity

Vop set wrong vsync/hsync polarity, it may cause some display problem. known problem is that caused HDMI hdcp authenticate failed, caused pixel offset with hdmi display. the polarity description at RK3288 TRM doc:
dsp_vsync_pol

    VSYNC polarity
      1'b0 : negative
      1'b1 : positive
      dsp_hsync_pol
    HSYNC polarity
      1'b0 : negative
      1'b1 : positive
---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +2 -2
index 9a5c571..2b145ba5 100644
@@ -874,8 +874,8 @@ static int vop_crtc_mode_set(struct drm_crtc *crtc,
 	VOP_CTRL_SET(vop, out_mode, vop->connector_out_mode);
 
 	val = 0x8;
-	val |= (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC) ? 1 : 0;
-	val |= (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC) ? (1 << 1) : 0;
+	val |= (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC) ? 0 : 1;
+	val |= (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC) ? 0 : (1 << 1);
 	VOP_CTRL_SET(vop, pin_pol, val);
 
 	VOP_CTRL_SET(vop, htotal_pw, (htotal << 16) | hsync_len);
Signature · 7 lines
1.7.9.5


_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Mark Yao

Vop set wrong vsync/hsync polarity, it may cause some display problem. known problem is that caused HDMI hdcp authenticate failed, caused pixel offset with hdmi display. the polarity description at RK3288 TRM doc:
dsp_vsync_pol

    VSYNC polarity
      1'b0 : negative
      1'b1 : positive
      dsp_hsync_pol
    HSYNC polarity
      1'b0 : negative
      1'b1 : positive
Quoted 1 line

Looks good!

Quoted 20 lines
---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +2 -3
index 9a5c571..2b145ba5 100644
@@ -874,8 +874,8 @@ static int vop_crtc_mode_set(struct drm_crtc *crtc,
        VOP_CTRL_SET(vop, out_mode, vop->connector_out_mode);
 
        val = 0x8;
-       val |= (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC) ? 1 : 0;
-       val |= (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC) ? (1 << 1) : 0;
+       val |= (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC) ? 0 : 1;
+       val |= (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC) ? 0 : (1 << 1);
        VOP_CTRL_SET(vop, pin_pol, val);
 
        VOP_CTRL_SET(vop, htotal_pw, (htotal << 16) | hsync_len);
--
Quoted 3 lines

1.7.9.5

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Tested-by on v1 1/1
#2 lore raw
In reply to Mark Yao

Mark,

Quoted 23 lines · Mark Yao

Vop set wrong vsync/hsync polarity, it may cause some display problem. known problem is that caused HDMI hdcp authenticate failed, caused pixel offset with hdmi display. the polarity description at RK3288 TRM doc:

   dsp_vsync_pol
     VSYNC polarity
       1'b0 : negative
       1'b1 : positive
       dsp_hsync_pol
     HSYNC polarity
       1'b0 : negative
       1'b1 : positive
---
  drivers/gpu/drm/rockchip/rockchip_drm_vop.c |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +0 -0
index 9a5c571..2b145ba5 100644

drivers/gpu/drm/rockchip/rockchip_drm_vop.c static int vop_crtc_mode_set(struct drm_crtc *crtc, · line 878

Quoted 7 lines
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +2 -2
@@ -874,8 +874,8 @@ static int vop_crtc_mode_set(struct drm_crtc *crtc,
  	VOP_CTRL_SET(vop, out_mode, vop->connector_out_mode);
 
  	val = 0x8;
-	val |= (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC) ? 1 : 0;
-	val |= (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC) ? (1 << 1) : 0;
+	val |= (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC) ? 0 : 1;
+	val |= (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC) ? 0 : (1 << 1);
Quoted 3 lines
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +0 -0
  	VOP_CTRL_SET(vop, pin_pol, val);
 
  	VOP_CTRL_SET(vop, htotal_pw, (htotal << 16) | hsync_len);
maintainer Tested-by on v1 1/1
#3 lore raw
In reply to Mark Yao

Am Donnerstag, 22. Januar 2015, 11:15:02 schrieb Mark Yao:

Quoted 13 lines

Vop set wrong vsync/hsync polarity, it may cause some display problem. known problem is that caused HDMI hdcp authenticate failed, caused pixel offset with hdmi display. the polarity description at RK3288 TRM doc:
dsp_vsync_pol

    VSYNC polarity
      1'b0 : negative
      1'b1 : positive
      dsp_hsync_pol
    HSYNC polarity
      1'b0 : negative
      1'b1 : positive
Quoted 2 lines

---

on a rk3288-firefly board with a sda7123 vga connector

Heiko
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel