mirror_ubuntu-kernels/drivers/gpu/drm/mediatek
AngeloGioacchino Del Regno 3b8e19a0aa drm/mediatek: hdmi: Perform NULL pointer check for mtk_hdmi_conf
In commit 41ca9caaae
("drm/mediatek: hdmi: Add check for CEA modes only") a check
for CEA modes was added to function mtk_hdmi_bridge_mode_valid()
in order to address possible issues on MT8167;
moreover, with commit c91026a938
("drm/mediatek: hdmi: Add optional limit on maximal HDMI mode clock")
another similar check was introduced.

Unfortunately though, at the time of writing, MT8173 does not provide
any mtk_hdmi_conf structure and this is crashing the kernel with NULL
pointer upon entering mtk_hdmi_bridge_mode_valid(), which happens as
soon as a HDMI cable gets plugged in.

To fix this regression, add a NULL pointer check for hdmi->conf in the
said function, restoring HDMI functionality and avoiding NULL pointer
kernel panics.

Fixes: 41ca9caaae ("drm/mediatek: hdmi: Add check for CEA modes only")
Fixes: c91026a938 ("drm/mediatek: hdmi: Add optional limit on maximal HDMI mode clock")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
2021-12-13 21:01:11 +08:00
..
Kconfig phy: mediatek: Move mtk_mipi_dsi_phy driver into drivers/phy/mediatek folder 2020-11-30 23:42:40 +08:00
Makefile drm/mediatek: Separate aal sub driver 2021-07-25 08:25:45 +08:00
mtk_cec.c drm/mediatek: Add missing MODULE_DEVICE_TABLE() 2021-03-31 19:38:06 +08:00
mtk_cec.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
mtk_disp_aal.c drm for v5.15-rc1 2021-09-01 11:26:46 -07:00
mtk_disp_ccorr.c drm/mediatek: Add matrix_bits private data for ccorr 2021-02-04 22:55:46 +08:00
mtk_disp_color.c drm/mediatek: Add component_del in OVL and COLOR remove function 2021-08-12 07:00:50 +08:00
mtk_disp_drv.h drm/mediatek: Separate aal sub driver 2021-07-25 08:25:45 +08:00
mtk_disp_gamma.c drm/mediatek/mtk_disp_gamma: Strip and demote non-conformant kernel-doc header 2021-06-03 13:28:39 +02:00
mtk_disp_ovl.c drm/mediatek: Add component_del in OVL and COLOR remove function 2021-08-12 07:00:50 +08:00
mtk_disp_rdma.c drm/mediatek: Adjust rdma fifo threshold calculate formula 2021-07-12 22:47:27 +08:00
mtk_dpi_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
mtk_dpi.c drm for v5.15-rc1 2021-09-01 11:26:46 -07:00
mtk_drm_crtc.c Revert "drm/mediatek: Use mailbox rx_callback instead of cmdq_task_cb" 2021-10-12 08:02:27 +08:00
mtk_drm_crtc.h drm-misc-next for 5.13: 2021-03-16 17:08:46 +10:00
mtk_drm_ddp_comp.c drm/mediatek: Add AAL output size configuration 2021-08-12 06:43:28 +08:00
mtk_drm_ddp_comp.h drm/mediatek: Move mtk_ddp_comp_init() from sub driver to DRM driver 2021-01-07 06:28:16 +08:00
mtk_drm_drv.c Mediatek DRM Next for Linux 5.15 2021-08-17 10:32:18 +10:00
mtk_drm_drv.h drm/mediatek: Separate aal sub driver 2021-07-25 08:25:45 +08:00
mtk_drm_gem.c drm/mediatek: Implement mmap as GEM object function 2021-08-09 21:23:51 +08:00
mtk_drm_gem.h drm/mediatek: Implement mmap as GEM object function 2021-08-09 21:23:51 +08:00
mtk_drm_plane.c drm for v5.15-rc1 2021-09-01 11:26:46 -07:00
mtk_drm_plane.h drm/mediatek: update cursors by using async atomic update 2019-12-20 16:19:11 +08:00
mtk_dsi.c drm/mediatek: mtk_dsi: Reset the dsi0 hardware 2021-10-08 15:15:26 +02:00
mtk_hdmi_ddc.c drm/mediatek: Add missing MODULE_DEVICE_TABLE() 2021-03-31 19:38:06 +08:00
mtk_hdmi_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
mtk_hdmi.c drm/mediatek: hdmi: Perform NULL pointer check for mtk_hdmi_conf 2021-12-13 21:01:11 +08:00
mtk_hdmi.h drm/mediatek: Separate mtk_hdmi_phy to an independent module 2020-09-06 07:02:54 +08:00