From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: "CK Hu (胡俊光)" <ck.hu@mediatek.com>,
"Zi-hao Huang (黃梓豪)" <Zi-hao.Huang@mediatek.com>,
"ryanbrue.dev@gmail.com" <ryanbrue.dev@gmail.com>
Cc: "chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>,
"simona@ffwll.ch" <simona@ffwll.ch>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"airlied@gmail.com" <airlied@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"Shaoming Chen (陈绍明)" <shaoming.chen@mediatek.com>
Subject: Re: [PATCH v2] drm/mediatek: dsi: Don't let a signal cut the IRQ wait short
Date: Tue, 24 Nov 2026 12:24:55 +0100 [thread overview]
Message-ID: <56cca340-b7b8-4e6a-adbb-887864cc14b1@collabora.com> (raw)
In-Reply-To: <65140b86aed23f307f8552be8bc5ae13f1de1874.camel@mediatek.com>
On 11/24/26 06:54, CK Hu (胡俊光) wrote:
> 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@gmail.com> # 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.
>
CK, okay, apply it.
Beware though, this will block at every frame and lower performance quite a bit.
Cheers,
Angelo
> Regards,
> CK
>
>>
>> Best regards,
>> Ryan Brue
>
prev parent reply other threads:[~2026-11-24 11:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 9:33 Zi-Hao Huang via B4 Relay
2026-11-18 12:32 ` AngeloGioacchino Del Regno
2026-11-19 1:28 ` CK Hu (胡俊光)
2026-11-19 3:36 ` Zi-Hao Huang
2026-11-24 0:31 ` Ryan Brue
2026-11-24 5:54 ` CK Hu (胡俊光)
2026-11-24 11:24 ` AngeloGioacchino Del Regno [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56cca340-b7b8-4e6a-adbb-887864cc14b1@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=Zi-hao.Huang@mediatek.com \
--cc=airlied@gmail.com \
--cc=chunkuang.hu@kernel.org \
--cc=ck.hu@mediatek.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=ryanbrue.dev@gmail.com \
--cc=shaoming.chen@mediatek.com \
--cc=simona@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®