mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-28 17:48:58 +00:00
9af0e94fa6
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.64
Manually rebased:
generic/hack-6.6/780-usb-net-MeigLink_modem_support.patch
bcm27xx/patches-6.6/950-0585-drm-vc4-Introduce-generation-number-enum.patch
bcm27xx/patches-6.6/950-0610-drm-vc4-hvs-Support-BCM2712-HVS.patch
bcm27xx/patches-6.6/950-0829-vc4-hvs-Add-support-for-D0-register-changes.patch
Removed upstreamed:
bcm27xx/patches-6.6/950-0597-drm-vc4-hdmi-Avoid-hang-with-debug-registers-when-su.patch[1]
bcm27xx/patches-6.6/950-0599-drm-vc4-Fix-dlist-debug-not-resetting-the-next-entry.patch[2]
bcm27xx/patches-6.6/950-0600-drm-vc4-Remove-incorrect-limit-from-hvs_dlist-debugf.patch[3]
bcm27xx/patches-6.6/950-0708-drm-vc4-Correct-logic-on-stopping-an-HVS-channel.patch[4]
ramips/patches-6.6/002-01-v6.13-clk-ralink-mtmips-fix-clock-plan-for-Ralink-SoC-RT38.patch[5]
ramips/patches-6.6/002-02-v6.13-clk-ralink-mtmips-fix-clocks-probe-order-in-oldest-r.patch[6]
All other patches automatically rebased.
1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.64&id=223ee2567a55e4f80315c768d2969e6a3b9fb23d
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.64&id=8182b5ca19c6f173b6498d1c6d3e4b034b76bbde
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.64&id=52c1716f65a558174e381360bd88f18dae4be85c
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.64&id=9728b508b01a5eeeac79ceb676364c674dd951ac
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.64&id=f85a1d06afbcc57ac44176db8f9d7a934979952c
6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.64&id=fbb13732c6ffa9d58cedafabcd5ce8fd7ef8ae5a
Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Co-authored-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17217
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 5158e28769
)
67 lines
2.4 KiB
Diff
67 lines
2.4 KiB
Diff
From c0e4a6b67c9e9c1be98e9e83708b04ca7ed34989 Mon Sep 17 00:00:00 2001
|
|
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
Date: Mon, 8 Nov 2021 17:32:45 +0000
|
|
Subject: [PATCH 0014/1085] drm/vc4: Enable gamma block only when required.
|
|
|
|
With HVS5 the gamma block is now only reprogrammed with
|
|
a disable/enable. Loading the table from vc4_hvs_init_channel
|
|
(called from vc4_hvs_atomic_enable) appears to be at an
|
|
invalid point in time and so isn't applied.
|
|
|
|
Switch to enabling and disabling the gamma table instead. This
|
|
isn't safe if the pipeline is running, but it isn't now.
|
|
For HVS4 it is safe to enable and disable dynamically, so
|
|
adopt that approach there too.
|
|
|
|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_hvs.c | 22 ++++++++++++++++------
|
|
1 file changed, 16 insertions(+), 6 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_hvs.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_hvs.c
|
|
@@ -553,8 +553,11 @@ static int vc4_hvs_init_channel(struct v
|
|
dispbkgndx &= ~SCALER_DISPBKGND_GAMMA;
|
|
dispbkgndx &= ~SCALER_DISPBKGND_INTERLACE;
|
|
|
|
+ if (crtc->state->gamma_lut)
|
|
+ /* Enable gamma on if required */
|
|
+ dispbkgndx |= SCALER_DISPBKGND_GAMMA;
|
|
+
|
|
HVS_WRITE(SCALER_DISPBKGNDX(chan), dispbkgndx |
|
|
- ((!vc4->is_vc5) ? SCALER_DISPBKGND_GAMMA : 0) |
|
|
(interlace ? SCALER_DISPBKGND_INTERLACE : 0));
|
|
|
|
/* Reload the LUT, since the SRAMs would have been disabled if
|
|
@@ -837,18 +840,25 @@ void vc4_hvs_atomic_flush(struct drm_crt
|
|
u32 dispbkgndx = HVS_READ(SCALER_DISPBKGNDX(channel));
|
|
|
|
if (crtc->state->gamma_lut) {
|
|
- if (!vc4->is_vc5)
|
|
+ if (!vc4->is_vc5) {
|
|
vc4_hvs_update_gamma_lut(hvs, vc4_crtc);
|
|
- else
|
|
+ dispbkgndx |= SCALER_DISPBKGND_GAMMA;
|
|
+ } else {
|
|
vc5_hvs_update_gamma_lut(hvs, vc4_crtc);
|
|
-
|
|
- dispbkgndx |= SCALER_DISPBKGND_GAMMA;
|
|
+ }
|
|
} else {
|
|
/* Unsetting DISPBKGND_GAMMA skips the gamma lut step
|
|
* in hardware, which is the same as a linear lut that
|
|
* DRM expects us to use in absence of a user lut.
|
|
+ *
|
|
+ * Do NOT change state dynamically for hvs5 as it
|
|
+ * inserts a delay in the pipeline that will cause
|
|
+ * stalls if enabled/disabled whilst running. The other
|
|
+ * should already be disabling/enabling the pipeline
|
|
+ * when gamma changes.
|
|
*/
|
|
- dispbkgndx &= ~SCALER_DISPBKGND_GAMMA;
|
|
+ if (!vc4->is_vc5)
|
|
+ dispbkgndx &= ~SCALER_DISPBKGND_GAMMA;
|
|
}
|
|
HVS_WRITE(SCALER_DISPBKGNDX(channel), dispbkgndx);
|
|
}
|