amdgpu/pm/legacy: fix suspend/resume issues
authorchr[] <chris@rudorff.com>
Wed, 12 Feb 2025 15:51:38 +0000 (16:51 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Feb 2025 16:43:58 +0000 (11:43 -0500)
commitee3dc9e204d271c9c7a8d4d38a0bce4745d33e71
treed8b995cce11e751d1ead94661bb8ea1af27f1845
parent7dc340540363a008cee1e160e8f2a4f034f196d4
amdgpu/pm/legacy: fix suspend/resume issues

resume and irq handler happily races in set_power_state()

* amdgpu_legacy_dpm_compute_clocks() needs lock
* protect irq work handler
* fix dpm_enabled usage

v2: fix clang build, integrate Lijo's comments (Alex)

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2524
Fixes: 3712e7a49459 ("drm/amd/pm: unified lock protections in amdgpu_dpm.c")
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Tested-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> # on Oland PRO
Signed-off-by: chr[] <chris@rudorff.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c
drivers/gpu/drm/amd/pm/legacy-dpm/legacy_dpm.c
drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c