Skip to content

Commit

Permalink
drm/vc4: Account for interrupts in flight
Browse files Browse the repository at this point in the history
Synchronously disable the IRQ to make the following cancel_work_sync
invocation effective.

An interrupt in flight could enqueue further overflow mem work. As we
free the binner BO immediately following vc4_irq_uninstall this caused
a NULL pointer dereference in the work callback vc4_overflow_mem_work.

Link: anholt/linux#114
Signed-off-by: Stefan Schake <stschake@gmail.com>
Fixes: d5b1a78 ("drm/vc4: Add support for drawing 3D frames.")
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/1510275907-993-2-git-send-email-stschake@gmail.com
(cherry picked from commit 253696ccd613fbdaa5aba1de44c461a058e0a114)
  • Loading branch information
stschake authored and Raspbian kernel package updater committed Mar 31, 2018
1 parent 2f1a466 commit 65804da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/vc4/vc4_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ vc4_irq_postinstall(struct drm_device *dev)
{
struct vc4_dev *vc4 = to_vc4_dev(dev);

/* Undo the effects of a previous vc4_irq_uninstall. */
enable_irq(dev->irq);

/* Enable both the render done and out of memory interrupts. */
V3D_WRITE(V3D_INTENA, V3D_DRIVER_IRQS);

Expand Down

0 comments on commit 65804da

Please sign in to comment.