Re: [PATCH 01/12] drm/panthor: Disable reset work before unplug

From: Boris Brezillon

Date: Tue Aug 04 2026 - 08:03:09 EST


On Tue, 04 Aug 2026 12:09:40 +0200
Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx> wrote:

> Make sure we're not interrupted by resets while we're unplugging.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx>
> ---
> 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);

As Sashiko pointed out, this introduces a deadlock, which I fixed in
patch 12 thinking it was something introduced before this patchset :-(.
I'll address that by pulling the from_reset_work argument into this
commit commits, and making the fake_failure bits its own commit.

> +
> /* We do the rest of the unplug with the unplug lock released,
> * future callers will wait on ptdev->unplug.done anyway.
> */
>