diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2020-05-28 19:08:55 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2020-05-28 19:12:43 +0200 |
commit | 77e97abf129c5028385dd72587eabab68db0d954 (patch) | |
tree | fc52a8c2ba346da77281f00538a1eb6de49deb5d /target/linux/bcm27xx/patches-5.4/950-0605-drm-vc4-Reset-audio-infoframe-on-encoder_enable-if-p.patch | |
parent | 5d3a0c6b26144eb5d62515b99613b5ad8dbdc717 (diff) | |
download | upstream-77e97abf129c5028385dd72587eabab68db0d954.tar.gz upstream-77e97abf129c5028385dd72587eabab68db0d954.tar.bz2 upstream-77e97abf129c5028385dd72587eabab68db0d954.zip |
bcm27xx: update to latest patches from RPi foundation
Also removes random module and switches to new bcm2711 thermal driver.
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.4/950-0605-drm-vc4-Reset-audio-infoframe-on-encoder_enable-if-p.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.4/950-0605-drm-vc4-Reset-audio-infoframe-on-encoder_enable-if-p.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.4/950-0605-drm-vc4-Reset-audio-infoframe-on-encoder_enable-if-p.patch b/target/linux/bcm27xx/patches-5.4/950-0605-drm-vc4-Reset-audio-infoframe-on-encoder_enable-if-p.patch new file mode 100644 index 0000000000..56106a4274 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0605-drm-vc4-Reset-audio-infoframe-on-encoder_enable-if-p.patch @@ -0,0 +1,72 @@ +From 3e45488069e20b07b83d8cbba88c7fa2b205e559 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson <dave.stevenson@raspberrypi.com> +Date: Wed, 25 Mar 2020 18:01:04 +0000 +Subject: [PATCH] drm/vc4: Reset audio infoframe on encoder_enable if + previously streaming + +If the encoder is disabled and re-enabled (eg mode change) all infoframes +are reset, whilst the audio subsystem know nothing about this change. +The driver therefore needs to reinstate the audio infoframe for +itself. + +Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 12 ++++++++++++ + drivers/gpu/drm/vc4/vc4_hdmi.h | 2 ++ + 2 files changed, 14 insertions(+) + +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -344,8 +344,16 @@ static void vc4_hdmi_set_audio_infoframe + + static void vc4_hdmi_set_infoframes(struct drm_encoder *encoder) + { ++ struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); ++ + vc4_hdmi_set_avi_infoframe(encoder); + vc4_hdmi_set_spd_infoframe(encoder); ++ /* ++ * If audio was streaming, then we need to reenabled the audio ++ * infoframe here during encoder_enable. ++ */ ++ if (vc4_hdmi->audio.streaming) ++ vc4_hdmi_set_audio_infoframe(encoder); + } + + static void vc4_hdmi_encoder_disable(struct drm_encoder *encoder) +@@ -825,6 +833,7 @@ static void vc4_hdmi_audio_reset(struct + struct device *dev = &vc4_hdmi->pdev->dev; + int ret; + ++ vc4_hdmi->audio.streaming = false; + ret = vc4_hdmi_stop_packet(encoder, HDMI_INFOFRAME_TYPE_AUDIO); + if (ret) + dev_err(dev, "Failed to stop audio infoframe: %d\n", ret); +@@ -928,6 +937,7 @@ static int vc4_hdmi_audio_trigger(struct + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + vc4_hdmi_set_audio_infoframe(encoder); ++ vc4_hdmi->audio.streaming = true; + + if (vc4_hdmi->variant->phy_rng_enable) + vc4_hdmi->variant->phy_rng_enable(vc4_hdmi); +@@ -946,6 +956,8 @@ static int vc4_hdmi_audio_trigger(struct + if (vc4_hdmi->variant->phy_rng_disable) + vc4_hdmi->variant->phy_rng_disable(vc4_hdmi); + ++ vc4_hdmi->audio.streaming = false; ++ + break; + default: + break; +--- a/drivers/gpu/drm/vc4/vc4_hdmi.h ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.h +@@ -101,6 +101,8 @@ struct vc4_hdmi_audio { + int channels; + struct snd_dmaengine_dai_dma_data dma_data; + struct snd_pcm_substream *substream; ++ ++ bool streaming; + }; + + /* General HDMI hardware state. */ |