]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/imagination: Clear runtime PM errors while resetting the GPU
authorAlessio Belle <alessio.belle@imgtec.com>
Tue, 24 Jun 2025 15:01:31 +0000 (16:01 +0100)
committerMatt Coster <matt.coster@imgtec.com>
Fri, 4 Jul 2025 15:25:08 +0000 (16:25 +0100)
commit551507e0d0bf32ce1d7d27533c4b98307380804c
treeb7240cae1e7ffadcf5d03d943464947f86a0f43f
parentc03ea34cbf88dd778197a929b3269003567def55
drm/imagination: Clear runtime PM errors while resetting the GPU

The runtime PM might be left in error state if one of the callbacks
returned an error, e.g. if the (auto)suspend callback failed following
a firmware crash.

When that happens, any further attempt to acquire or release a power
reference will then also fail, making it impossible to do anything else
with the GPU. The driver logic will eventually reach the reset code.

In pvr_power_reset(), replace pvr_power_get() with a new API
pvr_power_get_clear() which also attempts to clear any runtime PM error
state if acquiring a power reference is not possible.

Signed-off-by: Alessio Belle <alessio.belle@imgtec.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Link: https://lore.kernel.org/r/20250624-clear-rpm-errors-gpu-reset-v1-1-b8ff2ae55aac@imgtec.com
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
drivers/gpu/drm/imagination/pvr_power.c