mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00

Deleted (upstreamed): bcm27xx/patches-5.10/950-0669-drm-vc4-hdmi-Make-sure-the-device-is-powered-with-CE.patch [1] bcm27xx/patches-5.10/950-0672-drm-vc4-hdmi-Move-initial-register-read-after-pm_run.patch [1] gemini/patches-5.10/0003-ARM-dts-gemini-NAS4220-B-fis-index-block-with-128-Ki.patch [2] Manually rebased: bcm27xx/patches-5.10/950-0675-drm-vc4-hdmi-Drop-devm-interrupt-handler-for-CEC-int.patch [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.94&id=55b10b88ac8654fc2f31518aa349a2e643b37f18 [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.94&id=958a8819d41420d7a74ed922a09cacc0ba3a4218 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> Co-authored-by: Rui Salvaterra <rsalvaterra@gmail.com>
46 lines
1.6 KiB
Diff
46 lines
1.6 KiB
Diff
From cd097b7d08cef3c0e79f5d2ab2776c6c6b00a869 Mon Sep 17 00:00:00 2001
|
|
From: Dom Cobley <popcornmix@gmail.com>
|
|
Date: Tue, 10 Nov 2020 20:04:08 +0000
|
|
Subject: [PATCH] vc4: Clear unused infoframe packet RAM registers
|
|
|
|
Using a hdmi analyser the bytes in packet ram
|
|
registers beyond the length were visible in the
|
|
infoframes and it flagged the checksum as invalid.
|
|
|
|
Zeroing unused words of packet RAM avoids this
|
|
|
|
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_hdmi.c | 11 ++++++++++-
|
|
1 file changed, 10 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
|
@@ -285,9 +285,11 @@ static void vc4_hdmi_write_infoframe(str
|
|
const struct vc4_hdmi_register *ram_packet_start =
|
|
&vc4_hdmi->variant->registers[HDMI_RAM_PACKET_START];
|
|
u32 packet_reg = ram_packet_start->offset + VC4_HDMI_PACKET_STRIDE * packet_id;
|
|
+ u32 packet_reg_next = ram_packet_start->offset +
|
|
+ VC4_HDMI_PACKET_STRIDE * (packet_id + 1);
|
|
void __iomem *base = __vc4_hdmi_get_field_base(vc4_hdmi,
|
|
ram_packet_start->reg);
|
|
- uint8_t buffer[VC4_HDMI_PACKET_STRIDE];
|
|
+ uint8_t buffer[VC4_HDMI_PACKET_STRIDE] = {};
|
|
ssize_t len, i;
|
|
int ret;
|
|
|
|
@@ -320,6 +322,13 @@ static void vc4_hdmi_write_infoframe(str
|
|
packet_reg += 4;
|
|
}
|
|
|
|
+ /*
|
|
+ * clear remainder of packet ram as it's included in the
|
|
+ * infoframe and triggers a checksum error on hdmi analyser
|
|
+ */
|
|
+ for (; packet_reg < packet_reg_next; packet_reg += 4)
|
|
+ writel(0, base + packet_reg);
|
|
+
|
|
HDMI_WRITE(HDMI_RAM_PACKET_CONFIG,
|
|
HDMI_READ(HDMI_RAM_PACKET_CONFIG) | BIT(packet_id));
|
|
ret = wait_for((HDMI_READ(HDMI_RAM_PACKET_STATUS) &
|