mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 06:57:57 +00:00
8c405cdccc
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>
50 lines
1.9 KiB
Diff
50 lines
1.9 KiB
Diff
From de6a4aa502318ed5bfbf707b93fb62e786b93bea Mon Sep 17 00:00:00 2001
|
|
From: Dom Cobley <popcornmix@gmail.com>
|
|
Date: Thu, 16 Nov 2023 14:39:30 +0000
|
|
Subject: [PATCH 0831/1085] vc4/hdmi: Update MAI_THR for D0
|
|
|
|
2712D0 has increased the fifo sizes of MAI_THR blocks,
|
|
resulting in adjusted bit offsets. Handle that.
|
|
|
|
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_hdmi.c | 8 +++++++-
|
|
drivers/gpu/drm/vc4/vc4_regs.h | 9 +++++++++
|
|
2 files changed, 16 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
|
@@ -2597,7 +2597,13 @@ static int vc4_hdmi_audio_prepare(struct
|
|
VC4_HDMI_AUDIO_PACKET_CEA_MASK);
|
|
|
|
/* Set the MAI threshold */
|
|
- if (vc4->gen >= VC4_GEN_5)
|
|
+ if (vc4->gen >= VC4_GEN_5 && vc4->step_d0)
|
|
+ HDMI_WRITE(HDMI_MAI_THR,
|
|
+ VC4_SET_FIELD(0x10, VC4_D0_HD_MAI_THR_PANICHIGH) |
|
|
+ VC4_SET_FIELD(0x10, VC4_D0_HD_MAI_THR_PANICLOW) |
|
|
+ VC4_SET_FIELD(0x1c, VC4_D0_HD_MAI_THR_DREQHIGH) |
|
|
+ VC4_SET_FIELD(0x1c, VC4_D0_HD_MAI_THR_DREQLOW));
|
|
+ else if (vc4->gen >= VC4_GEN_5)
|
|
HDMI_WRITE(HDMI_MAI_THR,
|
|
VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_PANICHIGH) |
|
|
VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_PANICLOW) |
|
|
--- a/drivers/gpu/drm/vc4/vc4_regs.h
|
|
+++ b/drivers/gpu/drm/vc4/vc4_regs.h
|
|
@@ -1039,6 +1039,15 @@ enum {
|
|
# define VC4_HD_MAI_THR_DREQLOW_MASK VC4_MASK(5, 0)
|
|
# define VC4_HD_MAI_THR_DREQLOW_SHIFT 0
|
|
|
|
+# define VC4_D0_HD_MAI_THR_PANICHIGH_MASK VC4_MASK(29, 23)
|
|
+# define VC4_D0_HD_MAI_THR_PANICHIGH_SHIFT 23
|
|
+# define VC4_D0_HD_MAI_THR_PANICLOW_MASK VC4_MASK(21, 15)
|
|
+# define VC4_D0_HD_MAI_THR_PANICLOW_SHIFT 15
|
|
+# define VC4_D0_HD_MAI_THR_DREQHIGH_MASK VC4_MASK(13, 7)
|
|
+# define VC4_D0_HD_MAI_THR_DREQHIGH_SHIFT 7
|
|
+# define VC4_D0_HD_MAI_THR_DREQLOW_MASK VC4_MASK(6, 0)
|
|
+# define VC4_D0_HD_MAI_THR_DREQLOW_SHIFT 0
|
|
+
|
|
/* Divider from HDMI HSM clock to MAI serial clock. Sampling period
|
|
* converges to N / (M + 1) cycles.
|
|
*/
|