aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
diff options
context:
space:
mode:
authorLijo Lazar <lijo.lazar@amd.com>2025-02-04 11:53:26 +0530
committerAlex Deucher <alexander.deucher@amd.com>2025-02-12 21:04:06 -0500
commit543f6e7163d781eb989db0c32331e5d5ade68fdd (patch)
treeb3309dea78ac3e9caf6b21388ac2013d26f6d612 /drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
parentdrm/amd/pm: Add APIs for device access checks (diff)
downloadlinux-543f6e7163d781eb989db0c32331e5d5ade68fdd.tar.gz
linux-543f6e7163d781eb989db0c32331e5d5ade68fdd.zip
drm/amd/pm: Fix get_if_active usage
If a device supports runtime pm, then pm_runtime_get_if_active returns 0 if a device is not active and 1 if already active. However, if a device doesn't support runtime pm, the API returns -EINVAL. A device not supporting runtime pm implies it's not affected by runtime pm and it's active. Hence no need to get() to increment usage count. Remove < 0 return value check. Also, ignore runpm state to determine active status. If the device is already in suspend state, disallow access. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Feifei Xu <feifei.xu@amd.com> Reviewed-by: Asad Kamal <asad.kamal@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c')
0 files changed, 0 insertions, 0 deletions