summaryrefslogtreecommitdiffstats
path: root/0001-kms-Fix-regression-by-audio-component-transition.patch
diff options
context:
space:
mode:
authorJustin M. Forbes <jforbes@fedoraproject.org>2020-05-28 10:35:15 -0500
committerJustin M. Forbes <jforbes@fedoraproject.org>2020-05-28 10:35:15 -0500
commitc1d5388741c67796c728a41e28949b05ed72e52c (patch)
tree9271475cb907db2eb4a9fa111df997c1a461620e /0001-kms-Fix-regression-by-audio-component-transition.patch
parenta79d8affb70a95069c35a0ccf7085e230c22a98d (diff)
downloadkernel-c1d5388741c67796c728a41e28949b05ed72e52c.tar.gz
kernel-c1d5388741c67796c728a41e28949b05ed72e52c.tar.xz
kernel-c1d5388741c67796c728a41e28949b05ed72e52c.zip
kernel-5.7.0-0.rc7.20200528gitb0c3ba31be3e.1
* Thu May 28 2020 CKI@GitLab <cki-project@redhat.com> [5.7.0-0.rc7.20200528gitb0c3ba31be3e.1] - b0c3ba31be3e rebase - Updated changelog for the release based on 444fc5cde643 ("CKI@GitLab") Resolves: rhbz# Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
Diffstat (limited to '0001-kms-Fix-regression-by-audio-component-transition.patch')
-rw-r--r--0001-kms-Fix-regression-by-audio-component-transition.patch82
1 files changed, 82 insertions, 0 deletions
diff --git a/0001-kms-Fix-regression-by-audio-component-transition.patch b/0001-kms-Fix-regression-by-audio-component-transition.patch
new file mode 100644
index 000000000..198e0be9e
--- /dev/null
+++ b/0001-kms-Fix-regression-by-audio-component-transition.patch
@@ -0,0 +1,82 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Thu, 16 Apr 2020 09:54:28 +0200
+Subject: [PATCH] kms: Fix regression by audio component transition
+
+Since the commit 742db30c4ee6 ("drm/nouveau: Add HD-audio component
+notifier support"), the nouveau driver notifies and pokes the HD-audio
+HPD and ELD via audio component, but this seems broken. The culprit
+is the naive assumption that crtc->index corresponds to the HDA pin.
+Actually this rather corresponds to the MST dev_id (alias "pipe" in
+the audio component framework) while the actual port number is given
+from the output ior id number.
+
+This patch corrects the assignment of port and dev_id arguments in the
+audio component ops to recover from the HDMI/DP audio regression.
+
+Fixes: 742db30c4ee6 ("drm/nouveau: Add HD-audio component notifier support")
+BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207223
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+---
+ drivers/gpu/drm/nouveau/dispnv50/disp.c | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
+index 6be9df1820c5..2625ed84fc44 100644
+--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
++++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
+@@ -482,15 +482,16 @@ nv50_dac_create(struct drm_connector *connector, struct dcb_output *dcbe)
+ * audio component binding for ELD notification
+ */
+ static void
+-nv50_audio_component_eld_notify(struct drm_audio_component *acomp, int port)
++nv50_audio_component_eld_notify(struct drm_audio_component *acomp, int port,
++ int dev_id)
+ {
+ if (acomp && acomp->audio_ops && acomp->audio_ops->pin_eld_notify)
+ acomp->audio_ops->pin_eld_notify(acomp->audio_ops->audio_ptr,
+- port, -1);
++ port, dev_id);
+ }
+
+ static int
+-nv50_audio_component_get_eld(struct device *kdev, int port, int pipe,
++nv50_audio_component_get_eld(struct device *kdev, int port, int dev_id,
+ bool *enabled, unsigned char *buf, int max_bytes)
+ {
+ struct drm_device *drm_dev = dev_get_drvdata(kdev);
+@@ -506,7 +507,8 @@ nv50_audio_component_get_eld(struct device *kdev, int port, int pipe,
+ nv_encoder = nouveau_encoder(encoder);
+ nv_connector = nouveau_encoder_connector_get(nv_encoder);
+ nv_crtc = nouveau_crtc(encoder->crtc);
+- if (!nv_connector || !nv_crtc || nv_crtc->index != port)
++ if (!nv_connector || !nv_crtc || nv_encoder->or != port ||
++ nv_crtc->index != dev_id)
+ continue;
+ *enabled = drm_detect_monitor_audio(nv_connector->edid);
+ if (*enabled) {
+@@ -600,7 +602,8 @@ nv50_audio_disable(struct drm_encoder *encoder, struct nouveau_crtc *nv_crtc)
+
+ nvif_mthd(&disp->disp->object, 0, &args, sizeof(args));
+
+- nv50_audio_component_eld_notify(drm->audio.component, nv_crtc->index);
++ nv50_audio_component_eld_notify(drm->audio.component, nv_encoder->or,
++ nv_crtc->index);
+ }
+
+ static void
+@@ -634,7 +637,8 @@ nv50_audio_enable(struct drm_encoder *encoder, struct drm_display_mode *mode)
+ nvif_mthd(&disp->disp->object, 0, &args,
+ sizeof(args.base) + drm_eld_size(args.data));
+
+- nv50_audio_component_eld_notify(drm->audio.component, nv_crtc->index);
++ nv50_audio_component_eld_notify(drm->audio.component, nv_encoder->or,
++ nv_crtc->index);
+ }
+
+ /******************************************************************************
+--
+2.26.2
+