From: Greg Kroah-Hartman Date: Mon, 22 May 2023 18:46:11 +0000 (+0100) Subject: 6.1-stable patches X-Git-Tag: v6.3.4~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=127aaaa49814a82ce6cb8a7a135b7e633c1ae1e5;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: drm-amd-amdgpu-introduce-gc_-_mes_2.bin-v2.patch drm-amdgpu-declare-firmware-for-new-mes-11.0.4.patch drm-amdgpu-reserve-the-old-gc_11_0_-_mes.bin.patch --- diff --git a/queue-6.1/drm-amd-amdgpu-introduce-gc_-_mes_2.bin-v2.patch b/queue-6.1/drm-amd-amdgpu-introduce-gc_-_mes_2.bin-v2.patch new file mode 100644 index 00000000000..500bfbd6a3e --- /dev/null +++ b/queue-6.1/drm-amd-amdgpu-introduce-gc_-_mes_2.bin-v2.patch @@ -0,0 +1,85 @@ +From 97998b893c3000b27a780a4982e16cfc8f4ea555 Mon Sep 17 00:00:00 2001 +From: Jack Xiao +Date: Fri, 24 Mar 2023 16:55:15 +0800 +Subject: drm/amd/amdgpu: introduce gc_*_mes_2.bin v2 + +From: Jack Xiao + +commit 97998b893c3000b27a780a4982e16cfc8f4ea555 upstream. + +To avoid new mes fw running with old driver, rename +mes schq fw to gc_*_mes_2.bin. + +v2: add MODULE_FIRMWARE declaration +v3: squash in fixup patch + +Signed-off-by: Jack Xiao +Reviewed-by: Alex Deucher +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 26 ++++++++++++++++++++++---- + drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 10 +++++----- + 2 files changed, 27 insertions(+), 9 deletions(-) + +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +@@ -1432,13 +1432,31 @@ int amdgpu_mes_init_microcode(struct amd + struct amdgpu_firmware_info *info; + char ucode_prefix[30]; + char fw_name[40]; ++ bool need_retry = false; + int r; + +- amdgpu_ucode_ip_version_decode(adev, GC_HWIP, ucode_prefix, sizeof(ucode_prefix)); +- snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mes%s.bin", +- ucode_prefix, +- pipe == AMDGPU_MES_SCHED_PIPE ? "" : "1"); ++ amdgpu_ucode_ip_version_decode(adev, GC_HWIP, ucode_prefix, ++ sizeof(ucode_prefix)); ++ if (adev->ip_versions[GC_HWIP][0] >= IP_VERSION(11, 0, 0)) { ++ snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mes%s.bin", ++ ucode_prefix, ++ pipe == AMDGPU_MES_SCHED_PIPE ? "_2" : "1"); ++ need_retry = true; ++ } else { ++ snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mes%s.bin", ++ ucode_prefix, ++ pipe == AMDGPU_MES_SCHED_PIPE ? "" : "1"); ++ } ++ + r = amdgpu_ucode_request(adev, &adev->mes.fw[pipe], fw_name); ++ if (r && need_retry && pipe == AMDGPU_MES_SCHED_PIPE) { ++ snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mes.bin", ++ ucode_prefix); ++ DRM_INFO("try to fall back to %s\n", fw_name); ++ r = amdgpu_ucode_request(adev, &adev->mes.fw[pipe], ++ fw_name); ++ } ++ + if (r) + goto out; + +--- a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +@@ -32,15 +32,15 @@ + #include "v11_structs.h" + #include "mes_v11_api_def.h" + +-MODULE_FIRMWARE("amdgpu/gc_11_0_0_mes.bin"); ++MODULE_FIRMWARE("amdgpu/gc_11_0_0_mes_2.bin"); + MODULE_FIRMWARE("amdgpu/gc_11_0_0_mes1.bin"); +-MODULE_FIRMWARE("amdgpu/gc_11_0_1_mes.bin"); ++MODULE_FIRMWARE("amdgpu/gc_11_0_1_mes_2.bin"); + MODULE_FIRMWARE("amdgpu/gc_11_0_1_mes1.bin"); +-MODULE_FIRMWARE("amdgpu/gc_11_0_2_mes.bin"); ++MODULE_FIRMWARE("amdgpu/gc_11_0_2_mes_2.bin"); + MODULE_FIRMWARE("amdgpu/gc_11_0_2_mes1.bin"); +-MODULE_FIRMWARE("amdgpu/gc_11_0_3_mes.bin"); ++MODULE_FIRMWARE("amdgpu/gc_11_0_3_mes_2.bin"); + MODULE_FIRMWARE("amdgpu/gc_11_0_3_mes1.bin"); +-MODULE_FIRMWARE("amdgpu/gc_11_0_4_mes.bin"); ++MODULE_FIRMWARE("amdgpu/gc_11_0_4_mes_2.bin"); + MODULE_FIRMWARE("amdgpu/gc_11_0_4_mes1.bin"); + + static int mes_v11_0_hw_fini(void *handle); diff --git a/queue-6.1/drm-amdgpu-declare-firmware-for-new-mes-11.0.4.patch b/queue-6.1/drm-amdgpu-declare-firmware-for-new-mes-11.0.4.patch new file mode 100644 index 00000000000..8b3ac4f2b3e --- /dev/null +++ b/queue-6.1/drm-amdgpu-declare-firmware-for-new-mes-11.0.4.patch @@ -0,0 +1,30 @@ +From a462ef872fd1e83ebd075cf82d91f111acaa629e Mon Sep 17 00:00:00 2001 +From: Li Ma +Date: Fri, 20 Jan 2023 15:41:22 +0800 +Subject: drm/amdgpu: declare firmware for new MES 11.0.4 + +From: Li Ma + +commit a462ef872fd1e83ebd075cf82d91f111acaa629e upstream. + +To support new mes ip block + +Signed-off-by: Li Ma +Reviewed-by: Yifan Zhang +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +@@ -40,6 +40,8 @@ MODULE_FIRMWARE("amdgpu/gc_11_0_2_mes.bi + MODULE_FIRMWARE("amdgpu/gc_11_0_2_mes1.bin"); + MODULE_FIRMWARE("amdgpu/gc_11_0_3_mes.bin"); + MODULE_FIRMWARE("amdgpu/gc_11_0_3_mes1.bin"); ++MODULE_FIRMWARE("amdgpu/gc_11_0_4_mes.bin"); ++MODULE_FIRMWARE("amdgpu/gc_11_0_4_mes1.bin"); + + static int mes_v11_0_hw_fini(void *handle); + static int mes_v11_0_kiq_hw_init(struct amdgpu_device *adev); diff --git a/queue-6.1/drm-amdgpu-reserve-the-old-gc_11_0_-_mes.bin.patch b/queue-6.1/drm-amdgpu-reserve-the-old-gc_11_0_-_mes.bin.patch new file mode 100644 index 00000000000..fe5d5da3fed --- /dev/null +++ b/queue-6.1/drm-amdgpu-reserve-the-old-gc_11_0_-_mes.bin.patch @@ -0,0 +1,44 @@ +From 8855818ce7554fb7420200187fac9c3b69500da0 Mon Sep 17 00:00:00 2001 +From: Li Ma +Date: Wed, 12 Apr 2023 22:06:34 +0800 +Subject: drm/amdgpu: reserve the old gc_11_0_*_mes.bin + +From: Li Ma + +commit 8855818ce7554fb7420200187fac9c3b69500da0 upstream. + +Reserve the MOUDLE_FIRMWARE declaration of gc_11_0_*_mes.bin +to fix falling back to old mes bin on failure via autoload. + +Fixes: 97998b893c30 ("drm/amd/amdgpu: introduce gc_*_mes_2.bin v2") +Signed-off-by: Li Ma +Reviewed-by: Yifan Zhang +Reviewed-by: Alex Deucher +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +@@ -32,14 +32,19 @@ + #include "v11_structs.h" + #include "mes_v11_api_def.h" + ++MODULE_FIRMWARE("amdgpu/gc_11_0_0_mes.bin"); + MODULE_FIRMWARE("amdgpu/gc_11_0_0_mes_2.bin"); + MODULE_FIRMWARE("amdgpu/gc_11_0_0_mes1.bin"); ++MODULE_FIRMWARE("amdgpu/gc_11_0_1_mes.bin"); + MODULE_FIRMWARE("amdgpu/gc_11_0_1_mes_2.bin"); + MODULE_FIRMWARE("amdgpu/gc_11_0_1_mes1.bin"); ++MODULE_FIRMWARE("amdgpu/gc_11_0_2_mes.bin"); + MODULE_FIRMWARE("amdgpu/gc_11_0_2_mes_2.bin"); + MODULE_FIRMWARE("amdgpu/gc_11_0_2_mes1.bin"); ++MODULE_FIRMWARE("amdgpu/gc_11_0_3_mes.bin"); + MODULE_FIRMWARE("amdgpu/gc_11_0_3_mes_2.bin"); + MODULE_FIRMWARE("amdgpu/gc_11_0_3_mes1.bin"); ++MODULE_FIRMWARE("amdgpu/gc_11_0_4_mes.bin"); + MODULE_FIRMWARE("amdgpu/gc_11_0_4_mes_2.bin"); + MODULE_FIRMWARE("amdgpu/gc_11_0_4_mes1.bin"); + diff --git a/queue-6.1/series b/queue-6.1/series index 636c107e428..496bcd1e8c2 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -287,3 +287,6 @@ rethook-use-preempt_-disable-enable-_notrace-in-rethook_trampoline_handler.patch rethook-fprobe-do-not-trace-rethook-related-functions.patch remoteproc-imx_dsp_rproc-fix-kernel-test-robot-spars.patch crypto-testmgr-fix-rng-performance-in-fuzz-tests.patch +drm-amdgpu-declare-firmware-for-new-mes-11.0.4.patch +drm-amd-amdgpu-introduce-gc_-_mes_2.bin-v2.patch +drm-amdgpu-reserve-the-old-gc_11_0_-_mes.bin.patch