[PATCH v3 2/2] drm/mediatek: change config_lock from spin_lock to spin_lock_irqsave

Fei Shao fshao at chromium.org
Wed Aug 28 09:41:00 UTC 2024


Hi Jason,

On Tue, Aug 27, 2024 at 10:58 PM Jason-JH.Lin via B4 Relay
<devnull+jason-jh.lin.mediatek.com at kernel.org> wrote:
>
> From: "Jason-JH.Lin" <jason-jh.lin at mediatek.com>
>
> Operations within spin_locks are limited to fast memory access and
> confirmation of minimum lock duration.
>
> Although using spin_lock with config_lock seems to ensure shorter hold
> times, it is safer to use spin_lock_irqsave due to potential deadlocks
> and nested interrupt scenarios in interrupt contexts.
>
> So change config_lock from spin_lock to spin_lock_irqsave.
>
> Fixes: 7f82d9c43879 ("drm/mediatek: Clear pending flag when cmdq packet is done")

The appropriate fix tag should be:
Fixes: 1bbb2be61bbb ("drm/mediatek: Fix missing configuration flags in
mtk_crtc_ddp_config()")

I don't know if it's worth resending though.
I guess it's up to CK if he's willing to replace it when picking up the patch.

But the change itself is valid, so after fixing that:
Reviewed-by: Fei Shao <fshao at chromium.org>

Regards,
Fei

> Signed-off-by: Jason-JH.Lin <jason-jh.lin at mediatek.com>


More information about the dri-devel mailing list