mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 10:08:59 +00:00
1343acc8cd
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 Manually reverted: generic/pending-5.10/860-Revert-ASoC-mediatek-Check-for-error-clk-pointer.patch [3] [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 [3] https://lore.kernel.org/all/trinity-2a727d96-0335-4d03-8f30-e22a0e10112d-1643363480085@3c-app-gmx-bap33/ Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
64 lines
2.2 KiB
Diff
64 lines
2.2 KiB
Diff
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
|
|
@@ -364,7 +364,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;
|
|
@@ -372,6 +373,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);
|
|
}
|
|
@@ -400,7 +404,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;
|
|
@@ -1284,7 +1288,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);
|
|
|