]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 6.5
authorSasha Levin <sashal@kernel.org>
Thu, 28 Sep 2023 11:58:59 +0000 (07:58 -0400)
committerSasha Levin <sashal@kernel.org>
Thu, 28 Sep 2023 11:58:59 +0000 (07:58 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-6.5/asoc-cs35l56-disable-low-power-hibernation-mode.patch [new file with mode: 0644]
queue-6.5/drm-amdgpu-set-completion-status-as-preempted-for-th.patch [new file with mode: 0644]
queue-6.5/series

diff --git a/queue-6.5/asoc-cs35l56-disable-low-power-hibernation-mode.patch b/queue-6.5/asoc-cs35l56-disable-low-power-hibernation-mode.patch
new file mode 100644 (file)
index 0000000..8048144
--- /dev/null
@@ -0,0 +1,44 @@
+From 6ea91ea3c0199d71855328e30ab49689f04ff191 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 25 Sep 2023 16:14:43 +0100
+Subject: ASoC: cs35l56: Disable low-power hibernation mode
+
+From: Richard Fitzgerald <rf@opensource.cirrus.com>
+
+commit 18789be8e0d9fbb78b2290dcf93f500726ed19f0 upstream.
+
+Do not allow the CS35L56 to be put into its lowest power
+"hibernation" mode. This only affects I2C because "hibernation"
+is already disabled on SPI and SoundWire.
+
+Recent firmwares need a different wake-up sequence. Until
+that sequence has been specified, the chip "hibernation" mode
+must be disabled otherwise it can intermittently fail to wake.
+
+Backport note: This is the same change as upstream commit, to delete
+one line, but the upstream commit would not apply cleanly on older
+branches because of minor differences to the surrounding code.
+
+Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
+Link: https://lore.kernel.org/r/20230912133841.3480466-1-rf@opensource.cirrus.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/codecs/cs35l56-i2c.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/sound/soc/codecs/cs35l56-i2c.c b/sound/soc/codecs/cs35l56-i2c.c
+index 40666e6698ba9..b69441ec8d99f 100644
+--- a/sound/soc/codecs/cs35l56-i2c.c
++++ b/sound/soc/codecs/cs35l56-i2c.c
+@@ -27,7 +27,6 @@ static int cs35l56_i2c_probe(struct i2c_client *client)
+               return -ENOMEM;
+       cs35l56->dev = dev;
+-      cs35l56->can_hibernate = true;
+       i2c_set_clientdata(client, cs35l56);
+       cs35l56->regmap = devm_regmap_init_i2c(client, regmap_config);
+-- 
+2.40.1
+
diff --git a/queue-6.5/drm-amdgpu-set-completion-status-as-preempted-for-th.patch b/queue-6.5/drm-amdgpu-set-completion-status-as-preempted-for-th.patch
new file mode 100644 (file)
index 0000000..818404e
--- /dev/null
@@ -0,0 +1,66 @@
+From c0721278e19c9fb9716fb8ccd102cf5a0807b531 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 26 Jul 2023 15:21:48 +0800
+Subject: drm/amdgpu: set completion status as preempted for the resubmission
+
+From: Jiadong Zhu <Jiadong.Zhu@amd.com>
+
+[ Upstream commit 8cbbd11547f61b90b33a4ef70c4614eb2e789c49 ]
+
+The driver's CSA buffer is shared by all the ibs. When the high priority ib
+is submitted after the preempted ib, CP overrides the ib_completion_status
+as completed in the csa buffer. After that the preempted ib is resubmitted,
+CP would clear some locals stored for ib resume when reading the completed
+status, which causes gpu hang in some cases.
+
+Always set status as preempted for those resubmitted ib instead of reading
+everything from the CSA buffer.
+
+Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2535
+Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2717
+Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com>
+Acked-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.h | 9 +++++++++
+ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c        | 3 +++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.h
+index b22d4fb2a8470..d3186b570b82e 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.h
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.h
+@@ -56,6 +56,15 @@ enum amdgpu_ring_mux_offset_type {
+       AMDGPU_MUX_OFFSET_TYPE_CE,
+ };
++enum ib_complete_status {
++      /* IB not started/reset value, default value. */
++      IB_COMPLETION_STATUS_DEFAULT = 0,
++      /* IB preempted, started but not completed. */
++      IB_COMPLETION_STATUS_PREEMPTED = 1,
++      /* IB completed. */
++      IB_COMPLETION_STATUS_COMPLETED = 2,
++};
++
+ struct amdgpu_ring_mux {
+       struct amdgpu_ring      *real_ring;
+diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+index 65577eca58f1c..372ae2fc42e0c 100644
+--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+@@ -5230,6 +5230,9 @@ static void gfx_v9_0_ring_patch_de_meta(struct amdgpu_ring *ring,
+               de_payload_cpu_addr = adev->virt.csa_cpu_addr + payload_offset;
+       }
++      ((struct v9_de_ib_state *)de_payload_cpu_addr)->ib_completion_status =
++              IB_COMPLETION_STATUS_PREEMPTED;
++
+       if (offset + (payload_size >> 2) <= ring->buf_mask + 1) {
+               memcpy((void *)&ring->ring[offset], de_payload_cpu_addr, payload_size);
+       } else {
+-- 
+2.40.1
+
index c10fce2d874fb46735e04ef05479b8777fb79b19..287cf5446fa1903c5a6f203f2e17e4c1c10f5797 100644 (file)
@@ -108,3 +108,5 @@ gpio-tb10x-fix-an-error-handling-path-in-tb10x_gpio_.patch
 i2c-mux-demux-pinctrl-check-the-return-value-of-devm.patch
 i2c-mux-gpio-add-missing-fwnode_handle_put.patch
 i2c-xiic-correct-return-value-check-for-xiic_reinit.patch
+drm-amdgpu-set-completion-status-as-preempted-for-th.patch
+asoc-cs35l56-disable-low-power-hibernation-mode.patch