aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.10/950-0684-drm-vc4-hdmi-Don-t-poll-for-the-infoframes-status-on.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2021-08-21 10:54:34 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2021-08-21 19:07:07 +0200
commit8299d1f057439f94c6a4412e2e5c5082b82a30c9 (patch)
tree1bf678d61f11f7394493be464c7876e496f7faed /target/linux/bcm27xx/patches-5.10/950-0684-drm-vc4-hdmi-Don-t-poll-for-the-infoframes-status-on.patch
parent33b6885975ce376ff075362b7f0890326043111b (diff)
downloadupstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.tar.gz
upstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.tar.bz2
upstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.zip
bcm27xx: add kernel 5.10 support
Rebased RPi foundation patches on linux 5.10.59, removed applied and reverted patches, wireless patches and defconfig patches. bcm2708: boot tested on RPi B+ v1.2 bcm2709: boot tested on RPi 4B v1.1 4G bcm2711: boot tested on RPi 4B v1.1 4G Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.10/950-0684-drm-vc4-hdmi-Don-t-poll-for-the-infoframes-status-on.patch')
-rw-r--r--target/linux/bcm27xx/patches-5.10/950-0684-drm-vc4-hdmi-Don-t-poll-for-the-infoframes-status-on.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.10/950-0684-drm-vc4-hdmi-Don-t-poll-for-the-infoframes-status-on.patch b/target/linux/bcm27xx/patches-5.10/950-0684-drm-vc4-hdmi-Don-t-poll-for-the-infoframes-status-on.patch
new file mode 100644
index 0000000000..baade60d69
--- /dev/null
+++ b/target/linux/bcm27xx/patches-5.10/950-0684-drm-vc4-hdmi-Don-t-poll-for-the-infoframes-status-on.patch
@@ -0,0 +1,63 @@
+From 643f9b3a9e48fb2378d3dde8cfef452f7628e295 Mon Sep 17 00:00:00 2001
+From: Maxime Ripard <maxime@cerno.tech>
+Date: Thu, 3 Dec 2020 08:46:24 +0100
+Subject: [PATCH] drm/vc4: hdmi: Don't poll for the infoframes status
+ on setup
+
+The infoframes are sent at a regular interval as a data island packet,
+so we don't need to wait for them to be sent when we're setting them up.
+
+However, we do need to poll when we're enabling since the we can't
+update the packet RAM until it has been sent.
+
+Let's add a boolean flag to tell whether we want to poll or not to
+support both cases.
+
+Suggested-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
+Signed-off-by: Maxime Ripard <maxime@cerno.tech>
+Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20201203074624.721559-1-maxime@cerno.tech
+---
+ drivers/gpu/drm/vc4/vc4_hdmi.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
+@@ -363,7 +363,8 @@ static int vc4_hdmi_connector_init(struc
+ }
+
+ static int vc4_hdmi_stop_packet(struct drm_encoder *encoder,
+- enum hdmi_infoframe_type type)
++ enum hdmi_infoframe_type type,
++ bool poll)
+ {
+ struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
+ u32 packet_id = type - 0x80;
+@@ -371,6 +372,9 @@ static int vc4_hdmi_stop_packet(struct d
+ HDMI_WRITE(HDMI_RAM_PACKET_CONFIG,
+ HDMI_READ(HDMI_RAM_PACKET_CONFIG) & ~BIT(packet_id));
+
++ if (!poll)
++ return 0;
++
+ return wait_for(!(HDMI_READ(HDMI_RAM_PACKET_STATUS) &
+ BIT(packet_id)), 100);
+ }
+@@ -399,7 +403,7 @@ static void vc4_hdmi_write_infoframe(str
+ if (len < 0)
+ return;
+
+- ret = vc4_hdmi_stop_packet(encoder, frame->any.type);
++ ret = vc4_hdmi_stop_packet(encoder, frame->any.type, true);
+ if (ret) {
+ DRM_ERROR("Failed to wait for infoframe to go idle: %d\n", ret);
+ return;
+@@ -1283,7 +1287,7 @@ static void vc4_hdmi_audio_reset(struct
+ int ret;
+
+ vc4_hdmi->audio.streaming = false;
+- ret = vc4_hdmi_stop_packet(encoder, HDMI_INFOFRAME_TYPE_AUDIO);
++ ret = vc4_hdmi_stop_packet(encoder, HDMI_INFOFRAME_TYPE_AUDIO, false);
+ if (ret)
+ dev_err(dev, "Failed to stop audio infoframe: %d\n", ret);
+