Skip to content

Commit

Permalink
drm/vc4: Move IRQ enable to PM path
Browse files Browse the repository at this point in the history
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.

Fixes: 253696c ("drm/vc4: Account for interrupts in flight")
Signed-off-by: Stefan Schake <[email protected]>
Signed-off-by: Eric Anholt <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Tested-by: Stefan Wahren <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
  • Loading branch information
stschake authored and anholt committed Jan 3, 2018
1 parent e7cdf5c commit ce9caf2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/gpu/drm/vc4/vc4_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,6 @@ 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
3 changes: 3 additions & 0 deletions drivers/gpu/drm/vc4/vc4_v3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ce9caf2

Please sign in to comment.