mirror_ubuntu-kernels/drivers/gpu/drm/amd
Chengming Gui 79610d3041 drm/amdgpu: fix pstate setting issue
[WHY]
0, original pstate X
1, ctx_A_create -> ctx_A->stable_pstate = X
2, ctx_A_set_pstate (Y) -> current pstate is Y (PEAK or STANDARD)
3, ctx_B_create -> ctx_B->stable_pstate =  Y
4, ctx_A_destroy -> restore pstate to X
5, ctx_B_destroy -> restore pstate to Y
Above sequence will cause final pstate is wrong (Y), should be original X.

[HOW]
When ctx_B create,
if  ctx_A touched pstate setting
(not auto, stable_pstate_ctx != NULL),
set ctx_B->stable_pstate the same value as ctx_A saved,
if stable_pstate_ctx == NULL,
fetch current pstate to fill
ctx_B->stable_pstate.

Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2022-10-21 16:12:09 -04:00
..
acp
amdgpu drm/amdgpu: fix pstate setting issue 2022-10-21 16:12:09 -04:00
amdkfd - Alistair Popple has a series which addresses a race which causes page 2022-10-14 12:28:43 -07:00
display drm/amd/display: Increase frame size limit for display_mode_vba_util_32.o 2022-10-18 22:13:03 -04:00
include drm/amdkfd: Fix type of reset_type parameter in hqd_destroy() callback 2022-10-18 22:13:12 -04:00
pm drm/amd/pm: enable thermal alert on smu_v13_0_10 2022-10-18 22:13:34 -04:00