drm/amd: Reduce code duplication in runtime PM
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 15 May 2026 20:30:57 +0000 (15:30 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 18 May 2026 22:19:39 +0000 (18:19 -0400)
commitbdb423fd3943873c1e1fb45c14ec93481c45681a
tree4ab759d385df4e8ab43fa33d9a5771f2326c3379
parentbfe9a7545b2a7be1c543f1741e16f2d5ec4116ae
drm/amd: Reduce code duplication in runtime PM

[Why]
amdgpu_pmops_runtime_suspend() runs almost the same code  that
amdgpu_pmops_runtime_idle() runs. That is there is pointless code
duplication.

[How]
Move amdgpu_pmops_runtime_idle() up, extract common code and then
call from both functions.  No intended functional changes.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c