Make sure we're not interrupted by resets while we're unplugging.

Signed-off-by: Boris Brezillon <[email protected]>
---
 drivers/gpu/drm/panthor/panthor_device.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/panthor/panthor_device.c 
b/drivers/gpu/drm/panthor/panthor_device.c
index 0b25abebb803..e7f5744bc1e3 100644
--- a/drivers/gpu/drm/panthor/panthor_device.c
+++ b/drivers/gpu/drm/panthor/panthor_device.c
@@ -86,6 +86,9 @@ void panthor_device_unplug(struct panthor_device *ptdev)
         */
        drm_dev_unplug(&ptdev->base);
 
+       /* Make sure we're not interrupted by resets while we're unplugging. */
+       disable_work_sync(&ptdev->reset.work);
+
        /* We do the rest of the unplug with the unplug lock released,
         * future callers will wait on ptdev->unplug.done anyway.
         */

-- 
2.55.0

Reply via email to