A reset might have been queued while we were resuming. Make sure it's
not lost by rescheduling it.
Fixes: 5fe909cae118 ("drm/panthor: Add the device logical block")
Reported-by: [email protected]
Closes:
https://sashiko.dev/#/patchset/[email protected]?part=2
Signed-off-by: Boris Brezillon <[email protected]>
---
drivers/gpu/drm/panthor/panthor_device.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/panthor/panthor_device.c
b/drivers/gpu/drm/panthor/panthor_device.c
index 5355c4074f1f..2520158adb03 100644
--- a/drivers/gpu/drm/panthor/panthor_device.c
+++ b/drivers/gpu/drm/panthor/panthor_device.c
@@ -570,6 +570,13 @@ int panthor_device_resume(struct device *dev)
DRM_PANTHOR_USER_MMIO_OFFSET, 0, 1);
atomic_set(&ptdev->pm.state, PANTHOR_DEVICE_PM_STATE_ACTIVE);
mutex_unlock(&ptdev->pm.mmio_lock);
+
+ /* A reset might have been queued while we were resuming. Make sure
+ * it's not lost by rescheduling it.
+ */
+ if (atomic_read(&ptdev->reset.pending))
+ queue_work(ptdev->reset.wq, &ptdev->reset.work);
+
return 0;
err_suspend_devfreq:
--
2.55.0