]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdgpu: restore original stable pstate on ctx fini
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Jul 2022 15:10:15 +0000 (11:10 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:41:07 +0000 (14:41 +0200)
commitf1ff2c4108b938574fade791d6bd6b129c311b78
treef3fe3e496b241ea7a227b10723201ad05e99df7a
parentbf0e57d761a637f1e5b62358c1e8cd79c177acb5
drm/amdgpu: restore original stable pstate on ctx fini

[ Upstream commit 958afce98c2c86732483458c03540d3c6ef45254 ]

Save the original stable pstate on ctx init and restore
it on ctx fini so that we restore a manually selected
stable pstate on ctx exit.

v2: fix init order (Alex)
v3: don't add new variable to ctx struct (Evan)

Fixes: c65b364c52ba ("drm/amdgpu/ctx: only reset stable pstate if the user changed it (v2)")
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c