Commit df4d27f5 authored by Alessio Belle's avatar Alessio Belle Committed by Greg Kroah-Hartman
Browse files

drm/imagination: Clear runtime PM errors while resetting the GPU



[ Upstream commit 551507e0 ]

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: default avatarAlessio Belle <alessio.belle@imgtec.com>
Reviewed-by: default avatarMatt 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: default avatarMatt Coster <matt.coster@imgtec.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 280f6011
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment