Re: [PATCH] drm/vmwgfx: uninstall the IRQ before freeing the command buffer manager on unload

From: Fan Wu

Date: Thu Jul 16 2026 - 22:25:08 EST


Hi Maaz,

Thanks for the review. I'll drop this reordering — keeping the IRQ alive
for command-buffer processing during teardown is the right call.

One question before I investigate further: is there an existing teardown
invariant that guarantees an already-woken, but not yet run, CMDBUF or
FENCE threaded handler (vmw_thread_fn) cannot remain pending once cman or
fman teardown begins? If there is, I may well be chasing a non-issue, and
I'd rather not propose an alternative that fights an invariant I'm missing.

I'll re-check whether such a handler can outlive the current destroy
sequence before suggesting anything further.

Best,
Fan Wu


On Jul 16, 2026, at 07:39, Maaz Mombasawala <maaz.mombasawala@xxxxxxxxxxxx> wrote:
>
> With this patch we would miss any command buffer processing done on the svga
> device in the window between irq_uninstall and vmw_cmdbuf_man_destroy(), so it's
> better to leave the takedown order as is.
> If you want to address the case where a thread_fn awoken by an earlier irq is
> scheduled before irq_uinstall but after vmw_cmdbuf_man_destroy(), then just add checks
> to vmw_thread_fn(), though I'm not sure if that case is even possible since the
> command buffer contexts should already be taken down at that point.
>