]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Dec 2024 12:46:26 +0000 (13:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Dec 2024 12:46:26 +0000 (13:46 +0100)
added patches:
asoc-intel-avs-fix-return-status-of-avs_pcm_hw_constraints_init.patch
drm-amdgpu-rework-resume-handling-for-display-v2.patch

queue-6.6/asoc-intel-avs-fix-return-status-of-avs_pcm_hw_constraints_init.patch [new file with mode: 0644]
queue-6.6/drm-amdgpu-rework-resume-handling-for-display-v2.patch [new file with mode: 0644]
queue-6.6/series

diff --git a/queue-6.6/asoc-intel-avs-fix-return-status-of-avs_pcm_hw_constraints_init.patch b/queue-6.6/asoc-intel-avs-fix-return-status-of-avs_pcm_hw_constraints_init.patch
new file mode 100644 (file)
index 0000000..43cac12
--- /dev/null
@@ -0,0 +1,48 @@
+From a0aae96be5ffc5b456ca07bfe1385b721c20e184 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?=
+ <amadeuszx.slawinski@linux.intel.com>
+Date: Thu, 10 Oct 2024 13:20:08 +0200
+Subject: ASoC: Intel: avs: Fix return status of avs_pcm_hw_constraints_init()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
+
+commit a0aae96be5ffc5b456ca07bfe1385b721c20e184 upstream.
+
+Check for return code from avs_pcm_hw_constraints_init() in
+avs_dai_fe_startup() only checks if value is different from 0. Currently
+function can return positive value, change it to return 0 on success.
+
+Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
+Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
+I've observed KASAN on our setups and while patch itself is correct
+regardless. Problem seems to be caused by recent changes to rates, as
+this started happening after recent patchsets and doesn't reproduce with
+those reverted
+https://lore.kernel.org/linux-sound/20240905-alsa-12-24-128-v1-0-8371948d3921@baylibre.com/
+https://lore.kernel.org/linux-sound/20240911135756.24434-1-tiwai@suse.de/
+I've tested using Mark tree, where they are both applied and for some
+reason snd_pcm_hw_constraint_minmax() started returning positive value,
+while previously it returned 0. I'm bit worried if it signals some
+potential deeper problem regarding constraints with above changes.
+
+Link: https://patch.msgid.link/20241010112008.545526-1-amadeuszx.slawinski@linux.intel.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ sound/soc/intel/avs/pcm.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/soc/intel/avs/pcm.c
++++ b/sound/soc/intel/avs/pcm.c
+@@ -424,7 +424,7 @@ static int avs_dai_hda_be_trigger(struct
+               break;
+       }
+-      return ret;
++      return 0;
+ }
+ static const struct snd_soc_dai_ops avs_dai_hda_be_ops = {
diff --git a/queue-6.6/drm-amdgpu-rework-resume-handling-for-display-v2.patch b/queue-6.6/drm-amdgpu-rework-resume-handling-for-display-v2.patch
new file mode 100644 (file)
index 0000000..0a27bd7
--- /dev/null
@@ -0,0 +1,116 @@
+From 73dae652dcac776296890da215ee7dec357a1032 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Mon, 25 Nov 2024 13:59:09 -0500
+Subject: drm/amdgpu: rework resume handling for display (v2)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit 73dae652dcac776296890da215ee7dec357a1032 upstream.
+
+Split resume into a 3rd step to handle displays when DCC is
+enabled on DCN 4.0.1.  Move display after the buffer funcs
+have been re-enabled so that the GPU will do the move and
+properly set the DCC metadata for DCN.
+
+v2: fix fence irq resume ordering
+
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org # 6.11.x
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |   45 +++++++++++++++++++++++++++--
+ 1 file changed, 43 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+@@ -3172,7 +3172,7 @@ static int amdgpu_device_ip_resume_phase
+  *
+  * @adev: amdgpu_device pointer
+  *
+- * First resume function for hardware IPs.  The list of all the hardware
++ * Second resume function for hardware IPs.  The list of all the hardware
+  * IPs that make up the asic is walked and the resume callbacks are run for
+  * all blocks except COMMON, GMC, and IH.  resume puts the hardware into a
+  * functional state after a suspend and updates the software state as
+@@ -3190,6 +3190,7 @@ static int amdgpu_device_ip_resume_phase
+               if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON ||
+                   adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GMC ||
+                   adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_IH ||
++                  adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_DCE ||
+                   adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP)
+                       continue;
+               r = adev->ip_blocks[i].version->funcs->resume(adev);
+@@ -3205,6 +3206,36 @@ static int amdgpu_device_ip_resume_phase
+ }
+ /**
++ * amdgpu_device_ip_resume_phase3 - run resume for hardware IPs
++ *
++ * @adev: amdgpu_device pointer
++ *
++ * Third resume function for hardware IPs.  The list of all the hardware
++ * IPs that make up the asic is walked and the resume callbacks are run for
++ * all DCE.  resume puts the hardware into a functional state after a suspend
++ * and updates the software state as necessary.  This function is also used
++ * for restoring the GPU after a GPU reset.
++ *
++ * Returns 0 on success, negative error code on failure.
++ */
++static int amdgpu_device_ip_resume_phase3(struct amdgpu_device *adev)
++{
++      int i, r;
++
++      for (i = 0; i < adev->num_ip_blocks; i++) {
++              if (!adev->ip_blocks[i].status.valid || adev->ip_blocks[i].status.hw)
++                      continue;
++              if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_DCE) {
++                      r = adev->ip_blocks[i].version->funcs->resume(adev);
++                      if (r)
++                              return r;
++              }
++      }
++
++      return 0;
++}
++
++/**
+  * amdgpu_device_ip_resume - run resume for hardware IPs
+  *
+  * @adev: amdgpu_device pointer
+@@ -3230,6 +3261,13 @@ static int amdgpu_device_ip_resume(struc
+       r = amdgpu_device_ip_resume_phase2(adev);
++      if (r)
++              return r;
++
++      amdgpu_fence_driver_hw_init(adev);
++
++      r = amdgpu_device_ip_resume_phase3(adev);
++
+       return r;
+ }
+@@ -4229,7 +4267,6 @@ int amdgpu_device_resume(struct drm_devi
+               dev_err(adev->dev, "amdgpu_device_ip_resume failed (%d).\n", r);
+               goto exit;
+       }
+-      amdgpu_fence_driver_hw_init(adev);
+       r = amdgpu_device_ip_late_init(adev);
+       if (r)
+@@ -4999,6 +5036,10 @@ int amdgpu_do_asic_reset(struct list_hea
+                               if (r)
+                                       goto out;
++                              r = amdgpu_device_ip_resume_phase3(tmp_adev);
++                              if (r)
++                                      goto out;
++
+                               if (vram_lost)
+                                       amdgpu_device_fill_reset_magic(tmp_adev);
index e575d5344e93a78015ddc3bedce72d8e3dfe9f60..710ac5c6d26379a287ec4dae39d2cea719d19fd0 100644 (file)
@@ -346,3 +346,5 @@ xhci-dbc-fix-stall-transfer-event-handling.patch
 iio-invensense-fix-multiple-odr-switch-when-fifo-is-off.patch
 btrfs-add-cancellation-points-to-trim-loops.patch
 ocfs2-revert-ocfs2-fix-the-la-space-leak-when-unmounting-an-ocfs2-volume.patch
+asoc-intel-avs-fix-return-status-of-avs_pcm_hw_constraints_init.patch
+drm-amdgpu-rework-resume-handling-for-display-v2.patch