Sasha Levin <[email protected]> writes:

> From: Stefan Schake <[email protected]>
>
> [ Upstream commit 253696ccd613fbdaa5aba1de44c461a058e0a114 ]
>
> 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 <[email protected]>
> Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.")
> Signed-off-by: Eric Anholt <[email protected]>
> Reviewed-by: Eric Anholt <[email protected]>
> Link: 
> https://patchwork.freedesktop.org/patch/msgid/[email protected]
> Signed-off-by: Sasha Levin <[email protected]>

We found a bug, and this patch also needs:

commit ce9caf2f79a5aa170a4b6456a03db639eed9c988 (tag: drm-misc-fixes-2018-01-08)
Author: Stefan Schake <[email protected]>
Date:   Fri Dec 29 17:05:43 2017 +0100

    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.
    
    Fixes: 253696ccd613 ("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]>

Attachment: signature.asc
Description: PGP signature

Reply via email to