zoan37 <[email protected]> 於 2026年10月11日週日 上午12:43寫道: > > A CRTC created with connector routes gets one extra ddp_comp[] slot for > its output component, and ddp_comp_nr counts it, but the slot stays > NULL until mtk_crtc_update_output() fills it in the first atomic > enable. > > mtk_crtc_destroy() walks all ddp_comp_nr slots and passes each one to > mtk_ddp_comp_unregister_vblank_cb(), which dereferences it. Tearing > down a CRTC that was never enabled therefore dereferences NULL: unbinding > or removing mediatek-drm while that display path was never used, or > an error in mtk_drm_kms_init() after the CRTC was created. > > Skip the empty slot. Nothing was registered for it anyway: the routed > components (DSI, DPI, DP_INTF, ...) have no vblank callback.
Applied to mediatek-drm-fixes [1], thanks. [1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-fixes Regards, Chun-Kuang. > > Fixes: 01389b324c97 ("drm/mediatek: Add connector dynamic selection > capability") > Assisted-by: LLM > Signed-off-by: zoan37 <[email protected]> > ---
