From: "CK Hu (胡俊光)" <ck.hu@mediatek.com>
To: "p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
"agentzoan@gmail.com" <agentzoan@gmail.com>,
"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>
Cc: "Nathan Lu (呂東霖)" <Nathan.Lu@mediatek.com>,
"simona@ffwll.ch" <simona@ffwll.ch>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"Nancy Lin (林欣螢)" <Nancy.Lin@mediatek.com>,
"Jason-JH Lin (林睿祥)" <Jason-JH.Lin@mediatek.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"airlied@gmail.com" <airlied@gmail.com>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] drm/mediatek: mtk_crtc: Look up connector routes in the CRTC's own mmsys
Date: Mon, 9 Nov 2026 05:47:13 +0000 [thread overview]
Message-ID: <0e610683555f151caf90c4029412ee55b6d0d0ca.camel@mediatek.com> (raw)
In-Reply-To: <20261011004248.1117649-2-agentzoan@gmail.com>
On Sat, 2026-10-10 at 20:42 -0400, zoan37 wrote:
> External email : Please do not click links or open attachments until you have verified the sender or the content.
>
>
> mtk_crtc_update_output() finds the private data of the display
> controller (mmsys) that a CRTC belongs to with
>
> priv->all_drm_private[drm_crtc_index(crtc)]
>
> but all_drm_private[] has one entry per mmsys (mmsys_dev_num entries),
> not one per CRTC. mtk_crtc_create() gets the right entry from its
> priv_data_index argument, and the two only agree when every mmsys
> drives exactly one CRTC and the CRTCs are created in mmsys order.
>
> When a CRTC with connector routes sits on an mmsys that drives more
> than one CRTC, the lookup reads past the end of all_drm_private[] (or
> picks another mmsys' data), and the route component taken from that
> data's ddp_comp[] array is bogus. On an MT8189 board with connector
> routes on the external display path (CRTC 1 on the only mmsys), the
> first HDMI hotplug oopsed in the compositor's atomic commit.
>
> With the route tables currently in the tree (only MT8188 VDOSYS0, whose
> main path is always CRTC 0 and all_drm_private[0]) the two indices
> happen to match, so nothing in-tree hits this yet. It triggers as soon
> as routes are used on a path that is not the first CRTC of the first
> mmsys.
>
> Remember the mmsys private data mtk_crtc_create() used for the CRTC and
> use it in mtk_crtc_update_output().
Reviewed-by: CK Hu <ck.hu@mediatek.com>
>
> Fixes: 01389b324c97 ("drm/mediatek: Add connector dynamic selection capability")
> Assisted-by: LLM
> Signed-off-by: zoan37 <agentzoan@gmail.com>
> ---
>
next prev parent reply other threads:[~2026-11-09 5:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 0:42 [PATCH 0/3] drm/mediatek: mtk_crtc: Fix connector route handling zoan37
2026-10-11 0:42 ` [PATCH 1/3] drm/mediatek: mtk_crtc: Look up connector routes in the CRTC's own mmsys zoan37
2026-11-09 5:47 ` CK Hu (胡俊光) [this message]
2026-10-11 0:42 ` [PATCH 2/3] drm/mediatek: mtk_crtc: Skip the empty connector route slot in destroy zoan37
2026-10-11 0:42 ` [PATCH 3/3] drm/mediatek: mtk_crtc: Pick the connector route on every CRTC enable zoan37
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=0e610683555f151caf90c4029412ee55b6d0d0ca.camel@mediatek.com \
--to=ck.hu@mediatek.com \
--cc=Jason-JH.Lin@mediatek.com \
--cc=Nancy.Lin@mediatek.com \
--cc=Nathan.Lu@mediatek.com \
--cc=agentzoan@gmail.com \
--cc=airlied@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--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=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®