mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 09:12:39 +00:00
2e715fb4fc
Add support for BCM2712 (Raspberry Pi 5).
3bb5880ab3
Patches were generated from the diff between linux kernel branch linux-6.1.y
and rpi-6.1.y from raspberry pi kernel source:
- git format-patch linux-6.1.y...rpi-6.1.y
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2710/RPi3B, bcm2711/RPi4B
Signed-off-by: Marty Jones <mj8263788@gmail.com>
[Remove applied and reverted patches, squash patches and config commits]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
53 lines
1.9 KiB
Diff
53 lines
1.9 KiB
Diff
From 6e9f68bba01b9c36a77b68c4b3167c317da986da Mon Sep 17 00:00:00 2001
|
|
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
Date: Thu, 26 Oct 2023 17:46:13 +0100
|
|
Subject: [PATCH] drm/vc4: Correct logic on stopping an HVS channel
|
|
|
|
When factoring out __vc4_hvs_stop_channel, the logic got inverted from
|
|
if (condition)
|
|
// stop channel
|
|
to
|
|
if (condition)
|
|
goto out
|
|
//stop channel
|
|
out:
|
|
and also changed the exact register writes used to stop the channel.
|
|
|
|
Correct the logic so that the channel is actually stopped, and revert
|
|
to the original register writes.
|
|
|
|
Fixes: 6d01a106b4c8 ("drm/vc4: crtc: Move HVS init and close to a function")
|
|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_hvs.c | 10 ++++------
|
|
1 file changed, 4 insertions(+), 6 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_hvs.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_hvs.c
|
|
@@ -992,13 +992,11 @@ static void __vc4_hvs_stop_channel(struc
|
|
if (!drm_dev_enter(drm, &idx))
|
|
return;
|
|
|
|
- if (HVS_READ(SCALER_DISPCTRLX(chan)) & SCALER_DISPCTRLX_ENABLE)
|
|
+ if (!(HVS_READ(SCALER_DISPCTRLX(chan)) & SCALER_DISPCTRLX_ENABLE))
|
|
goto out;
|
|
|
|
- HVS_WRITE(SCALER_DISPCTRLX(chan),
|
|
- HVS_READ(SCALER_DISPCTRLX(chan)) | SCALER_DISPCTRLX_RESET);
|
|
- HVS_WRITE(SCALER_DISPCTRLX(chan),
|
|
- HVS_READ(SCALER_DISPCTRLX(chan)) & ~SCALER_DISPCTRLX_ENABLE);
|
|
+ HVS_WRITE(SCALER_DISPCTRLX(chan), SCALER_DISPCTRLX_RESET);
|
|
+ HVS_WRITE(SCALER_DISPCTRLX(chan), 0);
|
|
|
|
/* Once we leave, the scaler should be disabled and its fifo empty. */
|
|
WARN_ON_ONCE(HVS_READ(SCALER_DISPCTRLX(chan)) & SCALER_DISPCTRLX_RESET);
|
|
@@ -1026,7 +1024,7 @@ static void __vc6_hvs_stop_channel(struc
|
|
if (!drm_dev_enter(drm, &idx))
|
|
return;
|
|
|
|
- if (HVS_READ(SCALER6_DISPX_CTRL0(chan)) & SCALER6_DISPX_CTRL0_ENB)
|
|
+ if (!(HVS_READ(SCALER6_DISPX_CTRL0(chan)) & SCALER6_DISPX_CTRL0_ENB))
|
|
goto out;
|
|
|
|
HVS_WRITE(SCALER6_DISPX_CTRL0(chan),
|