From 8299d1f057439f94c6a4412e2e5c5082b82a30c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sat, 21 Aug 2021 10:54:34 +0200 Subject: bcm27xx: add kernel 5.10 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- ...i-Don-t-poll-for-the-infoframes-status-on.patch | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 target/linux/bcm27xx/patches-5.10/950-0684-drm-vc4-hdmi-Don-t-poll-for-the-infoframes-status-on.patch (limited to 'target/linux/bcm27xx/patches-5.10/950-0684-drm-vc4-hdmi-Don-t-poll-for-the-infoframes-status-on.patch') 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 +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 +Signed-off-by: Maxime Ripard +Reviewed-by: Dave Stevenson +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); + -- cgit v1.2.3