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)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 18 Jul 2022 20:42:33 +0000 (16:42 -0400)
commit958afce98c2c86732483458c03540d3c6ef45254
tree3beb32e5319354aa53f5786ad71a8db25d9c01b5
parent98a90f1f0fdd112b85b16ef6ceee69f319ab9311
drm/amdgpu: restore original stable pstate on ctx fini

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>
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c