drm/vc4: Move IRQ enable to PM path
Subsystems (3)
PATCH 1/1 drm/vc4: Move IRQ enable to PM path
We were calling enable_irq on bind, where it was already enabled previously by the IRQ helper. Additionally, dev->irq is not set correctly until after postinstall and so was always zero here, triggering a warning in 4.15. Fix both by moving the enable to the power management resume path, where we know there was a previous disable invocation during suspend.
---
I tested replacing the enable/disable dance with just synchronize_irq, but that only made the original kernel OOPS more sporadic.
drivers/gpu/drm/vc4/vc4_irq.c | 3 --- drivers/gpu/drm/vc4/vc4_v3d.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/vc4/vc4_irq.c +0 -3
@@ -209,9 +209,6 @@ {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 );
drivers/gpu/drm/vc4/vc4_v3d.c +3 -0
@@ -327,6 +327,9 @@ static int vc4_v3d_runtime_resume(struct device *dev)return ret;vc4_v3d_init_hw (vc4->dev); + +/* We disabled the IRQ as part of vc4_irq_uninstall in suspend. */ +enable_irq (vc4->dev->irq);vc4_irq_postinstall (vc4->dev);return 0 ;
Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 4 lines
Stefan Schake <[email protected]> hat am 29. Dezember 2017 um 17:05 geschrieben:
Quoted 8 lines
We were calling
enable_irqon bind, where it was already enabled previously by the IRQ helper. Additionally,dev->irqis not set correctly until after postinstall and so was always zero here, triggering a warning in 4.15. Fix both by moving the enable to the power management resume path, where we know there was a previous disable invocation during suspend.Fixes 253696ccd613 ("drm/vc4: Account for interrupts in flight")Signed-off-by Stefan Schake <[email protected]>
Quoted 11 lines · Stefan Schake
We were calling
enable_irqon bind, where it was already enabled previously by the IRQ helper. Additionally,dev->irqis not set correctly until after postinstall and so was always zero here, triggering a warning in 4.15. Fix both by moving the enable to the power management resume path, where we know there was a previous disable invocation during suspend.Fixes 253696ccd613 ("drm/vc4: Account for interrupts in flight")Signed-off-by Stefan Schake <[email protected]>---
I tested replacing the enable/disable dance with justsynchronize_irq, but that only made the original kernel OOPS more sporadic.
Reviewed and applied. Thanks!
Somewhere on the infinite TODO list is to stop using the DRM IRQ helpers and just install our IRQ handler on our own, which I think would have avoided this trouble.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel