linux/drivers/gpu/drm/mediatek
Chen-Yu Tsai 6524d3d587 drm/mediatek: dp: Only trigger DRM HPD events if bridge is attached
[ Upstream commit 36b617f7e4 ]

The MediaTek DisplayPort interface bridge driver starts its interrupts
as soon as its probed. However when the interrupts trigger the bridge
might not have been attached to a DRM device. As drm_helper_hpd_irq_event()
does not check whether the passed in drm_device is valid or not, a NULL
pointer passed in results in a kernel NULL pointer dereference in it.

Check whether the bridge is attached and only trigger an HPD event if
it is.

Fixes: f70ac097a2 ("drm/mediatek: Add MT8195 Embedded DisplayPort driver")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Guillaume Ranquet <granquet@baylibre.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230202045734.2773503-1-wenst@chromium.org/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-11 23:03:08 +09:00
..
Kconfig
Makefile
mtk_cec.c
mtk_cec.h
mtk_disp_aal.c
mtk_disp_ccorr.c
mtk_disp_color.c
mtk_disp_drv.h
mtk_disp_gamma.c
mtk_disp_merge.c
mtk_disp_ovl.c
mtk_disp_rdma.c
mtk_dp_reg.h
mtk_dp.c drm/mediatek: dp: Only trigger DRM HPD events if bridge is attached 2023-05-11 23:03:08 +09:00
mtk_dpi_regs.h
mtk_dpi.c drm/mediatek: Modify dpi power on/off sequence. 2022-12-31 13:32:11 +01:00
mtk_drm_crtc.c drm/mediatek: mtk_drm_crtc: Add checks for devm_kcalloc 2023-03-10 09:33:17 +01:00
mtk_drm_crtc.h
mtk_drm_ddp_comp.c
mtk_drm_ddp_comp.h
mtk_drm_drv.c drm/mediatek: Clean dangling pointer on bind error path 2023-03-10 09:33:17 +01:00
mtk_drm_drv.h
mtk_drm_gem.c drm/mediatek: Drop unbalanced obj unref 2023-03-10 09:33:17 +01:00
mtk_drm_gem.h
mtk_drm_plane.c
mtk_drm_plane.h
mtk_dsi.c drm/mediatek: dsi: Reduce the time of dsi from LP11 to sending cmd 2023-03-10 09:33:17 +01:00
mtk_hdmi_ddc.c
mtk_hdmi_regs.h
mtk_hdmi.c drm/mediatek: Fix return type of mtk_hdmi_bridge_mode_valid() 2022-12-31 13:33:01 +01:00
mtk_hdmi.h
mtk_mdp_rdma.c
mtk_mdp_rdma.h