drm/mediatek: mtk_crtc: Fix connector route handling
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | drm/mediatek: mtk_crtc: Look up connector routes in the CRTC's own mmsysdrivers/ | +3 | 1 reply | |
| 2/3 | drm/mediatek: mtk_crtc: Skip the empty connector route slot in destroydrivers/ | +4 | 1 reply | |
| 3/3 | drm/mediatek: mtk_crtc: Pick the connector route on every CRTC enabledrivers/ | +0 | 1 reply |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by.
| Patch | CK Hu |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] drm/mediatek: mtk_crtc: Fix connector route handling
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
Signature · 1 line
2.43.0