Skip to content

Commit 1afe4a2

Browse files
Timur KristófUlrich Hecht
authored andcommitted
drm/amd/pm: Workaround SI powertune issue on Radeon 430 (v2)
[ Upstream commit 764a90eb02268a23b1bb98be5f4a13671346804a ] Radeon 430 and 520 are OEM GPUs from 2016~2017 They have the same device id: 0x6611 and revision: 0x87 On the Radeon 430, powertune is buggy and throttles the GPU, never allowing it to reach its maximum SCLK. Work around this bug by raising the TDP limits we program to the SMC from 24W (specified by the VBIOS on Radeon 430) to 32W. Disabling powertune entirely is not a viable workaround, because it causes the Radeon 520 to heat up above 100 C, which I prefer to avoid. Additionally, revise the maximum SCLK limit. Considering the above issue, these GPUs never reached a high SCLK on Linux, and the workarounds were added before the GPUs were released, so the workaround likely didn't target these specifically. Use 780 MHz (the maximum SCLK according to the VBIOS on the Radeon 430). Note that the Radeon 520 VBIOS has a higher maximum SCLK: 905 MHz, but in practice it doesn't seem to perform better with the higher clock, only heats up more. v2: Move the workaround to si_populate_smc_tdp_limits. Fixes: 841686d ("drm/amdgpu: add SI DPM support (v4)") Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 966d70f1e160bdfdecaf7ff2b3f22ad088516e9f) Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Ulrich Hecht <uli@kernel.org>
1 parent 83e020d commit 1afe4a2

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

drivers/gpu/drm/amd/amdgpu/si_dpm.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2268,6 +2268,12 @@ static int si_populate_smc_tdp_limits(struct amdgpu_device *adev,
22682268
if (ret)
22692269
return ret;
22702270

2271+
if (adev->pdev->device == 0x6611 && adev->pdev->revision == 0x87) {
2272+
/* Workaround buggy powertune on Radeon 430 and 520. */
2273+
tdp_limit = 32;
2274+
near_tdp_limit = 28;
2275+
}
2276+
22712277
smc_table->dpm2Params.TDPLimit =
22722278
cpu_to_be32(si_scale_power_for_smc(tdp_limit, scaling_factor) * 1000);
22732279
smc_table->dpm2Params.NearTDPLimit =
@@ -3444,10 +3450,15 @@ static void si_apply_state_adjust_rules(struct amdgpu_device *adev,
34443450
(adev->pdev->revision == 0x80) ||
34453451
(adev->pdev->revision == 0x81) ||
34463452
(adev->pdev->revision == 0x83) ||
3447-
(adev->pdev->revision == 0x87) ||
3453+
(adev->pdev->revision == 0x87 &&
3454+
adev->pdev->device != 0x6611) ||
34483455
(adev->pdev->device == 0x6604) ||
34493456
(adev->pdev->device == 0x6605)) {
34503457
max_sclk = 75000;
3458+
} else if (adev->pdev->revision == 0x87 &&
3459+
adev->pdev->device == 0x6611) {
3460+
/* Radeon 430 and 520 */
3461+
max_sclk = 78000;
34513462
}
34523463
}
34533464

0 commit comments

Comments
 (0)