mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] drm/mediatek: mtk_crtc: Fix connector route handling
@ 2026-10-11  0:42 zoan37
  2026-10-11  0:42 ` [PATCH 1/3] drm/mediatek: mtk_crtc: Look up connector routes in the CRTC's own mmsys zoan37
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: zoan37 @ 2026-10-11  0:42 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel
  Cc: David Airlie, Simona Vetter, Matthias Brugger,
	AngeloGioacchino Del Regno, Jason-JH Lin, CK Hu, Nancy Lin,
	Nathan Lu, dri-devel, linux-mediatek, linux-arm-kernel,
	linux-kernel

Three fixes for the connector routes of mtk_crtc (the output component
picked at enable time from the encoder in use), found while bringing up
the external display path of an MT8189 Chromebook, where one CRTC
drives either an HDMI bridge on DSI0 or USB-C DisplayPort on DVO1:

1. The route components are looked up in the private data of the mmsys
   at index drm_crtc_index(), not of the CRTC's own mmsys. It only works
   by coincidence today (the only route table is on MT8188's CRTC 0);
   on MT8189 it oopsed on the first HDMI hotplug.
2. Destroying a CRTC whose route slot was never filled dereferences
   NULL.
3. The route is only picked when connectors_changed is set, so a CRTC
   whose connector was attached or swapped while it was off is enabled
   with no output (NULL dereference) or with the old one.

All three were compile-tested with W=1 on next-20261008 and run on the
MT8189 board; the per-patch notes say what was and wasn't exercised.
The MT8189 display support itself isn't upstream yet; these patches
don't depend on it.

The changes were written with the help of an AI coding assistant
(hence the Assisted-by tags).

zoan37 (3):
  drm/mediatek: mtk_crtc: Look up connector routes in the CRTC's own
    mmsys
  drm/mediatek: mtk_crtc: Skip the empty connector route slot in destroy
  drm/mediatek: mtk_crtc: Pick the connector route on every CRTC enable

 drivers/gpu/drm/mediatek/mtk_crtc.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)


base-commit: aac26bee2287c88af5be5a5ff96d783b19a28790
-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-11  0:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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-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

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®