Re: [PATCH v2] drm/mediatek: dsi: Don't let a signal cut the IRQ wait short

From: CK Hu (胡俊光)

Date: Tue Nov 24 2026 - 00:55:14 EST


On Mon, 2026-11-23 at 18:31 -0600, Ryan Brue wrote:
> External email : Please do not click links or open attachments until you have verified the sender or the content.
>
>
> On Thu, Nov 19, 2026 at 11:36:34AM +0800, Zi-Hao Huang wrote:
> > I'm not sure the trigger is specific to our downstream driver.
>
> I hit the same lockup on MT8173 (Amazon Fire HD 10 2017) with the
> upstream driver. v7.4-rc4, whose only DSI change is "drm/mediatek: dsi:
> force command mode in mtk_dsi_poweron()" from the mediatek tree, and the
> mainline NT51021 panel driver, which also sets prepare_prev_first and
> sends display off and enter sleep from .unprepare.
>
> The trigger for me was suspend under Plasma. logind's PrepareForSleep
> makes KWin turn the display off, and the session is frozen while KWin's
> commit is still in the panel's unprepare. The freezer's fake signal ends
> the interruptible wait with -ERESTARTSYS, mtk_dsi_host_send_cmd() takes
> that for success, and the late CMD_DONE lands in mtk_dsi_irq()'s
> DSI_BUSY loop. After the watchdog reset, MT8173's last-PC latch showed
> CPU0 at mtk_dsi_irq+0x84, the DSI_INTSTA read in that loop.
>
> With only mediatek-drm.ko changed, suspending through logind with a GPU
> benchmark running: without the patch 5 of 6 suspends reset the board
> (about one in three without the load); with this v2, 0 of 10, with no
> DSI IRQ or vblank timeouts, and the panel's power-down still takes 270ms.
>
> The wake_up() hunk matters. With only the wait changed, every command
> waited out its 2s timeout and the panel's power-down took 10.4s.
>
> Tested-by: Ryan Brue <ryanbrue.dev@xxxxxxxxx> # MT8173, NT51021
>
> I actually had a similar fix ready to go, and found your patch, so thank
> you :)

The upstream driver has this problem, and this patch fix it,
so I would apply this patch first.

Regards,
CK

>
> Best regards,
> Ryan Brue