]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.11-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Nov 2024 08:12:56 +0000 (09:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Nov 2024 08:12:56 +0000 (09:12 +0100)
added patches:
drm-amdgpu-swsmu-default-to-fullscreen-3d-profile-for-dgpus.patch
drm-amdgpu-swsmu-fix-ordering-for-setting-workload_mask.patch

queue-6.11/drm-amdgpu-swsmu-default-to-fullscreen-3d-profile-for-dgpus.patch [new file with mode: 0644]
queue-6.11/drm-amdgpu-swsmu-fix-ordering-for-setting-workload_mask.patch [new file with mode: 0644]
queue-6.11/series

diff --git a/queue-6.11/drm-amdgpu-swsmu-default-to-fullscreen-3d-profile-for-dgpus.patch b/queue-6.11/drm-amdgpu-swsmu-default-to-fullscreen-3d-profile-for-dgpus.patch
new file mode 100644 (file)
index 0000000..2275c29
--- /dev/null
@@ -0,0 +1,40 @@
+From ec1aab7816b06c32f42935e34ce3a3040c778afb Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Thu, 3 Oct 2024 09:57:38 -0400
+Subject: drm/amdgpu/swsmu: default to fullscreen 3D profile for dGPUs
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit ec1aab7816b06c32f42935e34ce3a3040c778afb upstream.
+
+This uses more aggressive hueristics than the the bootup default
+profile.  On windows the OS has a special fullscreen 3D mode
+where this is used.  Since we don't have the equivalent on Linux
+default to this profile for dGPUs.
+
+Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3618
+Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/1500
+Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3131
+Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+(cherry picked from commit 336568de918e08c825b3b1cbe2ec809f2fc26d94)
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c |    6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
++++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+@@ -1264,7 +1264,11 @@ static int smu_sw_init(void *handle)
+       smu->workload_prority[PP_SMC_POWER_PROFILE_VR] = 4;
+       smu->workload_prority[PP_SMC_POWER_PROFILE_COMPUTE] = 5;
+       smu->workload_prority[PP_SMC_POWER_PROFILE_CUSTOM] = 6;
+-      smu->workload_mask = 1 << smu->workload_prority[PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT];
++
++      if (smu->is_apu)
++              smu->workload_mask = 1 << smu->workload_prority[PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT];
++      else
++              smu->workload_mask = 1 << smu->workload_prority[PP_SMC_POWER_PROFILE_FULLSCREEN3D];
+       smu->workload_setting[0] = PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT;
+       smu->workload_setting[1] = PP_SMC_POWER_PROFILE_FULLSCREEN3D;
diff --git a/queue-6.11/drm-amdgpu-swsmu-fix-ordering-for-setting-workload_mask.patch b/queue-6.11/drm-amdgpu-swsmu-fix-ordering-for-setting-workload_mask.patch
new file mode 100644 (file)
index 0000000..6a092eb
--- /dev/null
@@ -0,0 +1,38 @@
+From b932d5ad9257f262a0bfd1bd7146120b0adc11a7 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Thu, 22 Aug 2024 15:16:11 -0400
+Subject: drm/amdgpu/swsmu: fix ordering for setting workload_mask
+
+From: Alex Deucher <alexander.deucher@amd.com>
+
+commit b932d5ad9257f262a0bfd1bd7146120b0adc11a7 upstream.
+
+No change in functionality for the current code, but we
+need to set the index properly before changing it if we
+ever use a non-0 index.
+
+Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
++++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+@@ -1257,7 +1257,6 @@ static int smu_sw_init(void *handle)
+       atomic_set(&smu->smu_power.power_gate.vpe_gated, 1);
+       atomic_set(&smu->smu_power.power_gate.umsch_mm_gated, 1);
+-      smu->workload_mask = 1 << smu->workload_prority[PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT];
+       smu->workload_prority[PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT] = 0;
+       smu->workload_prority[PP_SMC_POWER_PROFILE_FULLSCREEN3D] = 1;
+       smu->workload_prority[PP_SMC_POWER_PROFILE_POWERSAVING] = 2;
+@@ -1265,6 +1264,7 @@ static int smu_sw_init(void *handle)
+       smu->workload_prority[PP_SMC_POWER_PROFILE_VR] = 4;
+       smu->workload_prority[PP_SMC_POWER_PROFILE_COMPUTE] = 5;
+       smu->workload_prority[PP_SMC_POWER_PROFILE_CUSTOM] = 6;
++      smu->workload_mask = 1 << smu->workload_prority[PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT];
+       smu->workload_setting[0] = PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT;
+       smu->workload_setting[1] = PP_SMC_POWER_PROFILE_FULLSCREEN3D;
index 5cc1c22321f7041aceec9da32260a15bb071f045..524cc8ab1aa55a132c1ccbdb04e6c7719a99f806 100644 (file)
@@ -239,3 +239,5 @@ drm-xe-xe2-introduce-performance-changes.patch
 drm-xe-xe2-add-performance-turning-changes.patch
 drm-xe-define-stateless_compression_ctrl-as-mcr-register.patch
 drm-xe-write-all-slices-if-its-mcr-register.patch
+drm-amdgpu-swsmu-fix-ordering-for-setting-workload_mask.patch
+drm-amdgpu-swsmu-default-to-fullscreen-3d-profile-for-dgpus.patch