openwrt/target/linux/bcm27xx/patches-6.6/950-0602-drm-vc4-Enable-SCALER_CONTROL-early-in-HVS-init.patch
John Audia 21549dbf7b kernel: bump 6.6 to 6.6.66
Update patch set for new release and add required kernel option
CONFIG_ZRAM_TRACK_ENTRY_ACTIME to generic config

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.66

Manually rebased:
	bcm27xx/patches-6.6/950-0092-MMC-added-alternative-MMC-driver.patch
	bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
	starfive/patches-6.6/1000-serial-8250_dw-Add-starfive-jh7100-hsuart-compatible.patch

Removed upstreamed:
	bcm27xx/patches-6.6/950-0029-vc4_hdmi-Avoid-log-spam-for-audio-start-failure.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.66&id=e0388a95736abd1f5f5a94221dd1ac24eacbd4d7

Build system: x86/64
Build-tested: bcm27xx/bcm2712, flogic/glinet_gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64
Run-tested: bcm27xx/bcm2712, flogic/glinet_gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17271
(cherry picked from commit 28f534d953)
Link: https://github.com/openwrt/openwrt/pull/17302
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-19 11:22:12 +01:00

60 lines
1.8 KiB
Diff

From 2118551cfedf4b76821987d4de72379c82fbe1be Mon Sep 17 00:00:00 2001
From: Tim Gover <tim.gover@raspberrypi.com>
Date: Thu, 13 Jul 2023 17:47:22 +0100
Subject: [PATCH 0602/1085] drm/vc4: Enable SCALER_CONTROL early in HVS init
Always enable SCALER_CONTROL before attempting other HVS
operations. It's safe to write to some parts of the HVS but
in general it's dangerous to do this because it can cause bus
lockups.
Signed-off-by: Tim Gover <tim.gover@raspberrypi.com>
---
drivers/gpu/drm/vc4/vc4_hvs.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
--- a/drivers/gpu/drm/vc4/vc4_hvs.c
+++ b/drivers/gpu/drm/vc4/vc4_hvs.c
@@ -1294,6 +1294,10 @@ static int vc4_hvs_hw_init(struct vc4_hv
struct vc4_dev *vc4 = hvs->vc4;
u32 dispctrl, reg;
+ dispctrl = HVS_READ(SCALER_DISPCTRL);
+ dispctrl |= SCALER_DISPCTRL_ENABLE;
+ HVS_WRITE(SCALER_DISPCTRL, dispctrl);
+
reg = HVS_READ(SCALER_DISPECTRL);
reg &= ~SCALER_DISPECTRL_DSP2_MUX_MASK;
HVS_WRITE(SCALER_DISPECTRL,
@@ -1315,8 +1319,6 @@ static int vc4_hvs_hw_init(struct vc4_hv
reg | VC4_SET_FIELD(3, SCALER_DISPDITHER_DSP5_MUX));
dispctrl = HVS_READ(SCALER_DISPCTRL);
-
- dispctrl |= SCALER_DISPCTRL_ENABLE;
dispctrl |= SCALER_DISPCTRL_DISPEIRQ(0) |
SCALER_DISPCTRL_DISPEIRQ(1) |
SCALER_DISPCTRL_DISPEIRQ(2);
@@ -1523,6 +1525,10 @@ static int vc4_hvs_bind(struct device *d
else
hvs->dlist = hvs->regs + SCALER5_DLIST_START;
+ ret = vc4_hvs_hw_init(hvs);
+ if (ret)
+ return ret;
+
/* Upload filter kernels. We only have the one for now, so we
* keep it around for the lifetime of the driver.
*/
@@ -1532,10 +1538,6 @@ static int vc4_hvs_bind(struct device *d
if (ret)
return ret;
- ret = vc4_hvs_hw_init(hvs);
- if (ret)
- return ret;
-
ret = vc4_hvs_cob_init(hvs);
if (ret)
return ret;