Skip to content

Commit b5f843f

Browse files
authored
fix Hsync and Vsync polarity can't change from negatieve to positief … (#6193)
vc4/hdmi: Fix Hsync and Vsync polarity changes Polarity bits were only ever set and never cleared. Make sure they can also be cleared. Signed-off-by: Michiel Vanbiervliet <[email protected]>
1 parent dd7a154 commit b5f843f

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

drivers/gpu/drm/vc4/vc4_hdmi.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,14 +1883,15 @@ static void vc4_hdmi_encoder_post_crtc_enable(struct drm_encoder *encoder,
18831883
spin_lock_irqsave(&vc4_hdmi->hw_lock, flags);
18841884

18851885
HDMI_WRITE(HDMI_VID_CTL,
1886-
HDMI_READ(HDMI_VID_CTL) |
1887-
VC4_HD_VID_CTL_ENABLE |
1888-
VC4_HD_VID_CTL_CLRRGB |
1889-
VC4_HD_VID_CTL_UNDERFLOW_ENABLE |
1890-
VC4_HD_VID_CTL_FRAME_COUNTER_RESET |
1891-
VC4_HD_VID_CTL_BLANK_INSERT_EN |
1892-
(vsync_pos ? 0 : VC4_HD_VID_CTL_VSYNC_LOW) |
1893-
(hsync_pos ? 0 : VC4_HD_VID_CTL_HSYNC_LOW));
1886+
(HDMI_READ(HDMI_VID_CTL) &~
1887+
(VC4_HD_VID_CTL_VSYNC_LOW | VC4_HD_VID_CTL_HSYNC_LOW)) |
1888+
VC4_HD_VID_CTL_ENABLE |
1889+
VC4_HD_VID_CTL_CLRRGB |
1890+
VC4_HD_VID_CTL_UNDERFLOW_ENABLE |
1891+
VC4_HD_VID_CTL_FRAME_COUNTER_RESET |
1892+
VC4_HD_VID_CTL_BLANK_INSERT_EN |
1893+
(vsync_pos ? 0 : VC4_HD_VID_CTL_VSYNC_LOW) |
1894+
(hsync_pos ? 0 : VC4_HD_VID_CTL_HSYNC_LOW));
18941895

18951896
HDMI_WRITE(HDMI_VID_CTL,
18961897
HDMI_READ(HDMI_VID_CTL) & ~VC4_HD_VID_CTL_BLANKPIX);

0 commit comments

Comments
 (0)