]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu/ctx: only reset stable pstate if the user changed it (v2)
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 10 May 2022 14:32:26 +0000 (10:32 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 11 May 2022 15:50:43 +0000 (11:50 -0400)
commitc00e285a087a51ee6bf04861a97c0a6b1b3011b3
tree3f0ec564702113f2a49d9ecc298861de453d69be
parent2352113b0d8b9003d479bf3ce876fc3211cd36a4
drm/amdgpu/ctx: only reset stable pstate if the user changed it (v2)

Check if the requested stable pstate matches the current one before
changing it.  This avoids changing the stable pstate on context
destroy if the user never changed it in the first place via the
IOCTL.

v2: compare the current and requested rather than setting a flag (Lijo)

Fixes: fbe47822deda33 ("drm/amdgpu/UAPI: add new CTX OP to get/set stable pstates")
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c