Skip to content

Commit e70a758

Browse files
Michiielpelwell
authored andcommitted
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 89c8e56 commit e70a758

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
@@ -1893,14 +1893,15 @@ static void vc4_hdmi_encoder_post_crtc_enable(struct drm_encoder *encoder,
18931893
spin_lock_irqsave(&vc4_hdmi->hw_lock, flags);
18941894

18951895
HDMI_WRITE(HDMI_VID_CTL,
1896-
HDMI_READ(HDMI_VID_CTL) |
1897-
VC4_HD_VID_CTL_ENABLE |
1898-
VC4_HD_VID_CTL_CLRRGB |
1899-
VC4_HD_VID_CTL_UNDERFLOW_ENABLE |
1900-
VC4_HD_VID_CTL_FRAME_COUNTER_RESET |
1901-
VC4_HD_VID_CTL_BLANK_INSERT_EN |
1902-
(vsync_pos ? 0 : VC4_HD_VID_CTL_VSYNC_LOW) |
1903-
(hsync_pos ? 0 : VC4_HD_VID_CTL_HSYNC_LOW));
1896+
(HDMI_READ(HDMI_VID_CTL) &~
1897+
(VC4_HD_VID_CTL_VSYNC_LOW | VC4_HD_VID_CTL_HSYNC_LOW)) |
1898+
VC4_HD_VID_CTL_ENABLE |
1899+
VC4_HD_VID_CTL_CLRRGB |
1900+
VC4_HD_VID_CTL_UNDERFLOW_ENABLE |
1901+
VC4_HD_VID_CTL_FRAME_COUNTER_RESET |
1902+
VC4_HD_VID_CTL_BLANK_INSERT_EN |
1903+
(vsync_pos ? 0 : VC4_HD_VID_CTL_VSYNC_LOW) |
1904+
(hsync_pos ? 0 : VC4_HD_VID_CTL_HSYNC_LOW));
19041905

19051906
HDMI_WRITE(HDMI_VID_CTL,
19061907
HDMI_READ(HDMI_VID_CTL) & ~VC4_HD_VID_CTL_BLANKPIX);

0 commit comments

Comments
 (0)