]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amd/pm: use pm_runtime_get_if_active for debugfs getters
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 16 Sep 2024 14:49:15 +0000 (16:49 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Oct 2024 18:08:45 +0000 (14:08 -0400)
commit6e796cb4a972b385aac369718156aa71220c3c4f
treeceb26aed93352b9c375eea2afbbfdfb7a73f6a91
parent7e6487ab2152afdb158ca4e85b2f76aece55b585
drm/amd/pm: use pm_runtime_get_if_active for debugfs getters

Don't wake up the GPU for reading pm values. Instead, take a runtime
powermanagement ref when trying to read it if and only if the GPU is
already awake.

This avoids spurious wake ups (eg: from applets).

We use pm_runtime_get_if_in_active because we care about "is the GPU awake?"
not about "is the GPU awake and something else prevents suspend?".

Tested-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/amdgpu_pm.c