Skip to content

Commit 935abb8

Browse files
committed
drm/amdgpu/smu13: fix profile reporting
The following 3 commits landed in parallel: commit d7d2688 ("drm/amd/pm: update workload mask after the setting") commit 7a1613e ("drm/amdgpu/smu13: always apply the powersave optimization") commit 7c210ca ("drm/amdgpu: handle default profile on on devices without fullscreen 3D") While everything is set correctly, this caused the profile to be reported incorrectly because both the powersave and fullscreen3d bits were set in the mask and when the driver prints the profile, it looks for the first bit set. Fixes: d7d2688 ("drm/amd/pm: update workload mask after the setting") Reviewed-by: Kenneth Feng <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit ecfe9b2) Cc: [email protected]
1 parent 4aa923a commit 935abb8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2485,7 +2485,7 @@ static int smu_v13_0_0_set_power_profile_mode(struct smu_context *smu,
24852485
DpmActivityMonitorCoeffInt_t *activity_monitor =
24862486
&(activity_monitor_external.DpmActivityMonitorCoeffInt);
24872487
int workload_type, ret = 0;
2488-
u32 workload_mask;
2488+
u32 workload_mask, selected_workload_mask;
24892489

24902490
smu->power_profile_mode = input[size];
24912491

@@ -2552,7 +2552,7 @@ static int smu_v13_0_0_set_power_profile_mode(struct smu_context *smu,
25522552
if (workload_type < 0)
25532553
return -EINVAL;
25542554

2555-
workload_mask = 1 << workload_type;
2555+
selected_workload_mask = workload_mask = 1 << workload_type;
25562556

25572557
/* Add optimizations for SMU13.0.0/10. Reuse the power saving profile */
25582558
if ((amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(13, 0, 0) &&
@@ -2572,7 +2572,7 @@ static int smu_v13_0_0_set_power_profile_mode(struct smu_context *smu,
25722572
workload_mask,
25732573
NULL);
25742574
if (!ret)
2575-
smu->workload_mask = workload_mask;
2575+
smu->workload_mask = selected_workload_mask;
25762576

25772577
return ret;
25782578
}

0 commit comments

Comments
 (0)