From fabde894b7ae3049c6bf0277d0024c5b1e09662a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 6 Nov 2024 09:12:56 +0100 Subject: [PATCH] 6.11-stable patches added patches: drm-amdgpu-swsmu-default-to-fullscreen-3d-profile-for-dgpus.patch drm-amdgpu-swsmu-fix-ordering-for-setting-workload_mask.patch --- ...t-to-fullscreen-3d-profile-for-dgpus.patch | 40 +++++++++++++++++++ ...x-ordering-for-setting-workload_mask.patch | 38 ++++++++++++++++++ queue-6.11/series | 2 + 3 files changed, 80 insertions(+) create mode 100644 queue-6.11/drm-amdgpu-swsmu-default-to-fullscreen-3d-profile-for-dgpus.patch create mode 100644 queue-6.11/drm-amdgpu-swsmu-fix-ordering-for-setting-workload_mask.patch 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 index 00000000000..2275c2913de --- /dev/null +++ b/queue-6.11/drm-amdgpu-swsmu-default-to-fullscreen-3d-profile-for-dgpus.patch @@ -0,0 +1,40 @@ +From ec1aab7816b06c32f42935e34ce3a3040c778afb Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Thu, 3 Oct 2024 09:57:38 -0400 +Subject: drm/amdgpu/swsmu: default to fullscreen 3D profile for dGPUs + +From: Alex Deucher + +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 +Signed-off-by: Alex Deucher +(cherry picked from commit 336568de918e08c825b3b1cbe2ec809f2fc26d94) +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..6a092eb6731 --- /dev/null +++ b/queue-6.11/drm-amdgpu-swsmu-fix-ordering-for-setting-workload_mask.patch @@ -0,0 +1,38 @@ +From b932d5ad9257f262a0bfd1bd7146120b0adc11a7 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Thu, 22 Aug 2024 15:16:11 -0400 +Subject: drm/amdgpu/swsmu: fix ordering for setting workload_mask + +From: Alex Deucher + +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 +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + 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; diff --git a/queue-6.11/series b/queue-6.11/series index 5cc1c22321f..524cc8ab1aa 100644 --- a/queue-6.11/series +++ b/queue-6.11/series @@ -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 -- 2.47.3