openwrt/target/linux/bcm27xx/patches-6.6/950-1109-fix-Hsync-and-Vsync-polarity-can-t-change-from-negat.patch
Álvaro Fernández Rojas 8c405cdccc bcm27xx: add 6.6 kernel patches
The patches were generated from the RPi repo with the following command:
git format-patch v6.6.34..rpi-6.1.y

Some patches needed rebasing and, as usual, the applied and reverted, wireless
drivers, Github workflows, READMEs and defconfigs patches were removed.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-06-18 18:52:49 +02:00

47 lines
1.7 KiB
Diff

From b5f843fe7ece2b75a783fa785d6c7c6647a7a46d Mon Sep 17 00:00:00 2001
From: Michiiel <94533767+Michiiel@users.noreply.github.com>
Date: Thu, 30 May 2024 15:43:21 +0200
Subject: [PATCH 1109/1135] =?UTF-8?q?fix=20Hsync=20and=20Vsync=20polarity?=
=?UTF-8?q?=20can't=20change=20from=20negatieve=20to=20positief=20?=
=?UTF-8?q?=E2=80=A6=20(#6193)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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 <michiel.vanbiervliet@gmail.com>
---
drivers/gpu/drm/vc4/vc4_hdmi.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -1883,14 +1883,15 @@ static void vc4_hdmi_encoder_post_crtc_e
spin_lock_irqsave(&vc4_hdmi->hw_lock, flags);
HDMI_WRITE(HDMI_VID_CTL,
- HDMI_READ(HDMI_VID_CTL) |
- VC4_HD_VID_CTL_ENABLE |
- VC4_HD_VID_CTL_CLRRGB |
- VC4_HD_VID_CTL_UNDERFLOW_ENABLE |
- VC4_HD_VID_CTL_FRAME_COUNTER_RESET |
- VC4_HD_VID_CTL_BLANK_INSERT_EN |
- (vsync_pos ? 0 : VC4_HD_VID_CTL_VSYNC_LOW) |
- (hsync_pos ? 0 : VC4_HD_VID_CTL_HSYNC_LOW));
+ (HDMI_READ(HDMI_VID_CTL) &~
+ (VC4_HD_VID_CTL_VSYNC_LOW | VC4_HD_VID_CTL_HSYNC_LOW)) |
+ VC4_HD_VID_CTL_ENABLE |
+ VC4_HD_VID_CTL_CLRRGB |
+ VC4_HD_VID_CTL_UNDERFLOW_ENABLE |
+ VC4_HD_VID_CTL_FRAME_COUNTER_RESET |
+ VC4_HD_VID_CTL_BLANK_INSERT_EN |
+ (vsync_pos ? 0 : VC4_HD_VID_CTL_VSYNC_LOW) |
+ (hsync_pos ? 0 : VC4_HD_VID_CTL_HSYNC_LOW));
HDMI_WRITE(HDMI_VID_CTL,
HDMI_READ(HDMI_VID_CTL) & ~VC4_HD_VID_CTL_BLANKPIX);