diff options
author | Peter Robinson <pbrobinson@gmail.com> | 2017-11-15 08:50:19 +0000 |
---|---|---|
committer | Peter Robinson <pbrobinson@gmail.com> | 2017-11-15 08:50:19 +0000 |
commit | fe6b94d468f9d4e141572e47a6cc82b6e8f03e46 (patch) | |
tree | 6e091190ad78b4433b85432cccc223ba71321dbf | |
parent | 8a38849fd5b72d940ac6b71d90c713d65bf77607 (diff) | |
download | kernel-fe6b94d468f9d4e141572e47a6cc82b6e8f03e46.tar.gz kernel-fe6b94d468f9d4e141572e47a6cc82b6e8f03e46.tar.xz kernel-fe6b94d468f9d4e141572e47a6cc82b6e8f03e46.zip |
Add fix for vc4 interupts
-rw-r--r-- | kernel.spec | 5 | ||||
-rw-r--r-- | rpi-graphics-fix.patch | 46 |
2 files changed, 51 insertions, 0 deletions
diff --git a/kernel.spec b/kernel.spec index 33ef2984c..bf7716ec2 100644 --- a/kernel.spec +++ b/kernel.spec @@ -622,6 +622,8 @@ Patch321: bcm283x-dma-mapping-skip-USB-devices-when-configuring-DMA-during-probe # Updat3 move of bcm2837, landed in 4.14 Patch322: bcm2837-move-dt.patch +Patch325: rpi-graphics-fix.patch + # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20170912&id=723288836628bc1c0855f3bb7b64b1803e4b9e4a Patch324: arm-of-restrict-dma-configuration.patch @@ -2281,6 +2283,9 @@ fi # # %changelog +* Wed Nov 15 2017 Peter Robinson <pbrobinson@fedoraproject.org> +- Add fix for vc4 interupts + * Wed Nov 08 2017 Jeremy Cline <jeremy@jcline.org> - 4.13.12-200 - Linux v4.13.12 diff --git a/rpi-graphics-fix.patch b/rpi-graphics-fix.patch new file mode 100644 index 000000000..89bfaf9a5 --- /dev/null +++ b/rpi-graphics-fix.patch @@ -0,0 +1,46 @@ +From 253696ccd613fbdaa5aba1de44c461a058e0a114 Mon Sep 17 00:00:00 2001 +From: Stefan Schake <stschake@gmail.com> +Date: Fri, 10 Nov 2017 02:05:06 +0100 +Subject: drm/vc4: Account for interrupts in flight + +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: https://github.com/anholt/linux/issues/114 +Signed-off-by: Stefan Schake <stschake@gmail.com> +Fixes: d5b1a78a772f ("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 + +diff --git a/drivers/gpu/drm/vc4/vc4_irq.c b/drivers/gpu/drm/vc4/vc4_irq.c +index 7d7af3a..61b2e53 100644 +--- a/drivers/gpu/drm/vc4/vc4_irq.c ++++ b/drivers/gpu/drm/vc4/vc4_irq.c +@@ -208,6 +208,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); + +@@ -225,6 +228,9 @@ vc4_irq_uninstall(struct drm_device *dev) + /* Clear any pending interrupts we might have left. */ + V3D_WRITE(V3D_INTCTL, V3D_DRIVER_IRQS); + ++ /* Finish any interrupt handler still in flight. */ ++ disable_irq(dev->irq); ++ + cancel_work_sync(&vc4->overflow_mem_work); + } + +-- +cgit v0.10.2 + |