From: Greg Kroah-Hartman Date: Mon, 21 Aug 2023 16:46:35 +0000 (+0200) Subject: 6.4-stable patches X-Git-Tag: v6.4.12~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c883f25c41203a12c812a78ee89080dde190b201;p=thirdparty%2Fkernel%2Fstable-queue.git 6.4-stable patches added patches: asoc-sof-intel-hda-clean-up-link-dma-for-ipc3-during-stop.patch drm-amd-pm-skip-the-rlc-stop-when-s0i3-suspend-for-smu-v13.0.4-11.patch drm-amdgpu-keep-irq-count-in-amdgpu_irq_disable_all.patch revert-perf-report-append-inlines-to-non-dwarf-callchains.patch --- diff --git a/queue-6.4/asoc-sof-intel-hda-clean-up-link-dma-for-ipc3-during-stop.patch b/queue-6.4/asoc-sof-intel-hda-clean-up-link-dma-for-ipc3-during-stop.patch new file mode 100644 index 00000000000..d95a46ee5cf --- /dev/null +++ b/queue-6.4/asoc-sof-intel-hda-clean-up-link-dma-for-ipc3-during-stop.patch @@ -0,0 +1,94 @@ +From 90219f1bd273055f1dc1d7bdc0965755b992c045 Mon Sep 17 00:00:00 2001 +From: Ranjani Sridharan +Date: Tue, 8 Aug 2023 14:06:27 +0300 +Subject: ASoC: SOF: intel: hda: Clean up link DMA for IPC3 during stop +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Ranjani Sridharan + +commit 90219f1bd273055f1dc1d7bdc0965755b992c045 upstream. + +With IPC3, we reset hw_params during the stop trigger, so we should also +clean up the link DMA during the stop trigger. + +Fixes: 1bf83fa6654c ("ASoC: SOF: Intel: hda-dai: Do not perform DMA cleanup during stop") +Closes: https://github.com/thesofproject/linux/issues/4455 +Closes: https://github.com/thesofproject/linux/issues/4482 +Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217673 +Signed-off-by: Ranjani Sridharan +Reviewed-by: Pierre-Louis Bossart +Reviewed-by: Rander Wang +Reviewed-by: Péter Ujfalusi +Reviewed-by: Guennadi Liakhovetski +Reviewed-by: Bard Liao +Signed-off-by: Peter Ujfalusi +Link: https://lore.kernel.org/r/20230808110627.32375-1-peter.ujfalusi@linux.intel.com +Signed-off-by: Mark Brown +Signed-off-by: Jaroslav Kysela +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/sof/intel/hda-dai-ops.c | 13 ++++++++++++- + sound/soc/sof/intel/hda-dai.c | 8 ++++---- + sound/soc/sof/intel/hda.h | 2 ++ + 3 files changed, 18 insertions(+), 5 deletions(-) + +--- a/sound/soc/sof/intel/hda-dai-ops.c ++++ b/sound/soc/sof/intel/hda-dai-ops.c +@@ -289,16 +289,27 @@ static const struct hda_dai_widget_dma_o + static int hda_ipc3_post_trigger(struct snd_sof_dev *sdev, struct snd_soc_dai *cpu_dai, + struct snd_pcm_substream *substream, int cmd) + { ++ struct hdac_ext_stream *hext_stream = hda_get_hext_stream(sdev, cpu_dai, substream); + struct snd_soc_dapm_widget *w = snd_soc_dai_get_widget(cpu_dai, substream->stream); ++ struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); ++ struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); + + switch (cmd) { + case SNDRV_PCM_TRIGGER_SUSPEND: + case SNDRV_PCM_TRIGGER_STOP: + { + struct snd_sof_dai_config_data data = { 0 }; ++ int ret; + + data.dai_data = DMA_CHAN_INVALID; +- return hda_dai_config(w, SOF_DAI_CONFIG_FLAGS_HW_FREE, &data); ++ ret = hda_dai_config(w, SOF_DAI_CONFIG_FLAGS_HW_FREE, &data); ++ if (ret < 0) ++ return ret; ++ ++ if (cmd == SNDRV_PCM_TRIGGER_STOP) ++ return hda_link_dma_cleanup(substream, hext_stream, cpu_dai, codec_dai); ++ ++ break; + } + case SNDRV_PCM_TRIGGER_PAUSE_PUSH: + return hda_dai_config(w, SOF_DAI_CONFIG_FLAGS_PAUSE, NULL); +--- a/sound/soc/sof/intel/hda-dai.c ++++ b/sound/soc/sof/intel/hda-dai.c +@@ -91,10 +91,10 @@ hda_dai_get_ops(struct snd_pcm_substream + return sdai->platform_private; + } + +-static int hda_link_dma_cleanup(struct snd_pcm_substream *substream, +- struct hdac_ext_stream *hext_stream, +- struct snd_soc_dai *cpu_dai, +- struct snd_soc_dai *codec_dai) ++int hda_link_dma_cleanup(struct snd_pcm_substream *substream, ++ struct hdac_ext_stream *hext_stream, ++ struct snd_soc_dai *cpu_dai, ++ struct snd_soc_dai *codec_dai) + { + struct snd_sof_dev *sdev = snd_soc_component_get_drvdata(cpu_dai->component); + const struct hda_dai_widget_dma_ops *ops = hda_dai_get_ops(substream, cpu_dai); +--- a/sound/soc/sof/intel/hda.h ++++ b/sound/soc/sof/intel/hda.h +@@ -942,5 +942,7 @@ const struct hda_dai_widget_dma_ops * + hda_select_dai_widget_ops(struct snd_sof_dev *sdev, struct snd_sof_widget *swidget); + int hda_dai_config(struct snd_soc_dapm_widget *w, unsigned int flags, + struct snd_sof_dai_config_data *data); ++int hda_link_dma_cleanup(struct snd_pcm_substream *substream, struct hdac_ext_stream *hext_stream, ++ struct snd_soc_dai *cpu_dai, struct snd_soc_dai *codec_dai); + + #endif diff --git a/queue-6.4/drm-amd-pm-skip-the-rlc-stop-when-s0i3-suspend-for-smu-v13.0.4-11.patch b/queue-6.4/drm-amd-pm-skip-the-rlc-stop-when-s0i3-suspend-for-smu-v13.0.4-11.patch new file mode 100644 index 00000000000..0f866758980 --- /dev/null +++ b/queue-6.4/drm-amd-pm-skip-the-rlc-stop-when-s0i3-suspend-for-smu-v13.0.4-11.patch @@ -0,0 +1,34 @@ +From 730d44e1fa306a20746ad4a85da550662aed9daa Mon Sep 17 00:00:00 2001 +From: Tim Huang +Date: Thu, 27 Jul 2023 09:59:45 +0800 +Subject: drm/amd/pm: skip the RLC stop when S0i3 suspend for SMU v13.0.4/11 + +From: Tim Huang + +commit 730d44e1fa306a20746ad4a85da550662aed9daa upstream. + +For SMU v13.0.4/11, driver does not need to stop RLC for S0i3, +the firmwares will handle that properly. + +Signed-off-by: Tim Huang +Reviewed-by: Mario Limonciello +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c ++++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +@@ -1573,9 +1573,9 @@ static int smu_disable_dpms(struct smu_c + + /* + * For SMU 13.0.4/11, PMFW will handle the features disablement properly +- * for gpu reset case. Driver involvement is unnecessary. ++ * for gpu reset and S0i3 cases. Driver involvement is unnecessary. + */ +- if (amdgpu_in_reset(adev)) { ++ if (amdgpu_in_reset(adev) || adev->in_s0ix) { + switch (adev->ip_versions[MP1_HWIP][0]) { + case IP_VERSION(13, 0, 4): + case IP_VERSION(13, 0, 11): diff --git a/queue-6.4/drm-amdgpu-keep-irq-count-in-amdgpu_irq_disable_all.patch b/queue-6.4/drm-amdgpu-keep-irq-count-in-amdgpu_irq_disable_all.patch new file mode 100644 index 00000000000..774b689fe50 --- /dev/null +++ b/queue-6.4/drm-amdgpu-keep-irq-count-in-amdgpu_irq_disable_all.patch @@ -0,0 +1,34 @@ +From 8ffd6f0442674f32c048ec8dffdbc5ec67829beb Mon Sep 17 00:00:00 2001 +From: Guchun Chen +Date: Thu, 25 May 2023 17:24:31 +0800 +Subject: drm/amdgpu: keep irq count in amdgpu_irq_disable_all +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Guchun Chen + +commit 8ffd6f0442674f32c048ec8dffdbc5ec67829beb upstream. + +This can clean up all irq warnings because of unbalanced +amdgpu_irq_get/put when unplugging/unbinding device, and leave +irq count decrease in each ip fini function. + +Signed-off-by: Guchun Chen +Reviewed-by: Christian König +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +@@ -124,7 +124,6 @@ void amdgpu_irq_disable_all(struct amdgp + continue; + + for (k = 0; k < src->num_types; ++k) { +- atomic_set(&src->enabled_types[k], 0); + r = src->funcs->set(adev, src, k, + AMDGPU_IRQ_STATE_DISABLE); + if (r) diff --git a/queue-6.4/revert-perf-report-append-inlines-to-non-dwarf-callchains.patch b/queue-6.4/revert-perf-report-append-inlines-to-non-dwarf-callchains.patch new file mode 100644 index 00000000000..1e9d2d0aeee --- /dev/null +++ b/queue-6.4/revert-perf-report-append-inlines-to-non-dwarf-callchains.patch @@ -0,0 +1,59 @@ +From c0b067588a4836b762cfc6a4c83f122ca1dbb93a Mon Sep 17 00:00:00 2001 +From: Arnaldo Carvalho de Melo +Date: Tue, 1 Aug 2023 18:42:47 -0300 +Subject: Revert "perf report: Append inlines to non-DWARF callchains" + +From: Arnaldo Carvalho de Melo + +commit c0b067588a4836b762cfc6a4c83f122ca1dbb93a upstream. + +This reverts commit 46d21ec067490ab9cdcc89b9de5aae28786a8b8e. + +The tests were made with a specific workload, further tests on a +recently updated fedora 38 system with a system wide perf.data file +shows 'perf report' taking excessive time resolving inlines in vmlinux, +so lets revert this until a full investigation and improvement on the +addr2line support code is made. + +Reported-by: Jesper Dangaard Brouer +Acked-by: Artem Savkov +Tested-by: Jesper Dangaard Brouer +Cc: Andrii Nakryiko +Cc: Namhyung Kim +Cc: Adrian Hunter +Cc: Alexander Shishkin +Cc: Ian Rogers +Cc: Ingo Molnar +Cc: Jiri Olsa +Cc: Mark Rutland +Cc: Masami Hiramatsu +Cc: Milian Wolff +Cc: Peter Zijlstra +Link: https://lore.kernel.org/r/ZMl8VyhdwhClTM5g@kernel.org +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Greg Kroah-Hartman +--- + tools/perf/util/machine.c | 5 ----- + 1 file changed, 5 deletions(-) + +--- a/tools/perf/util/machine.c ++++ b/tools/perf/util/machine.c +@@ -44,7 +44,6 @@ + #include + + static void __machine__remove_thread(struct machine *machine, struct thread *th, bool lock); +-static int append_inlines(struct callchain_cursor *cursor, struct map_symbol *ms, u64 ip); + + static struct dso *machine__kernel_dso(struct machine *machine) + { +@@ -2371,10 +2370,6 @@ static int add_callchain_ip(struct threa + ms.maps = al.maps; + ms.map = al.map; + ms.sym = al.sym; +- +- if (!branch && append_inlines(cursor, &ms, ip) == 0) +- return 0; +- + srcline = callchain_srcline(&ms, al.addr); + err = callchain_cursor_append(cursor, ip, &ms, + branch, flags, nr_loop_iter, diff --git a/queue-6.4/series b/queue-6.4/series index 1d050d1c0f6..0bcaedb2a40 100644 --- a/queue-6.4/series +++ b/queue-6.4/series @@ -226,3 +226,7 @@ drm-amdgpu-skip-fence-gfx-interrupts-disable-enable-for-s0ix.patch drm-amdgpu-pm-fix-throttle_status-for-other-than-mp1-11.0.7.patch asoc-amd-vangogh-select-config_snd_amd_acp_config.patch drm-amd-display-disable-rco-for-dcn314.patch +drm-amd-pm-skip-the-rlc-stop-when-s0i3-suspend-for-smu-v13.0.4-11.patch +drm-amdgpu-keep-irq-count-in-amdgpu_irq_disable_all.patch +revert-perf-report-append-inlines-to-non-dwarf-callchains.patch +asoc-sof-intel-hda-clean-up-link-dma-for-ipc3-during-stop.patch