]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amd/pm: Revert state if force level fails
authorLijo Lazar <lijo.lazar@amd.com>
Fri, 6 Dec 2024 12:54:06 +0000 (18:24 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 Dec 2024 15:29:55 +0000 (10:29 -0500)
commit58893392989786eefd89aba48823dc3e27d37fd6
tree9c8f50c52445e47616ba39311682a4ffab1addb5
parent178ad3a9d1502439e750cca90dbbbf7478d29e63
drm/amd/pm: Revert state if force level fails

Before forcing level, CG/PG is disabled or enabled depending on the new
level. However if the force level operation fails, CG/PG state remains
modified. Revert the state change on failure. Also, move invalid
operation checks to the beginning before any logic that could change SOC
state.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/amdgpu_dpm.c