From e1ee23f29d9b0ca86bc29b540efa9290d7b40cb0 Mon Sep 17 00:00:00 2001 From: Liju-Clr Chen Date: Mon, 21 Nov 2022 18:36:36 +0800 Subject: soc/mediatek: Add error handling for dptx_get_edid() Skip eDP initialization when we failed to get EDID. This prevents the PLL assertion in dp_intf_config() if the display could not be initialized properly. BUG=b:233720142 TEST=boot to depthcharge on MT8188 EVB. Change-Id: I0fd672b175feb9b813c1d9ec4140e4273079ff07 Signed-off-by: Liju-Clr Chen Reviewed-on: https://review.coreboot.org/c/coreboot/+/69858 Reviewed-by: Rex-BC Chen Reviewed-by: Yidi Lin Reviewed-by: Yu-Ping Wu Tested-by: build bot (Jenkins) --- src/soc/mediatek/common/dp/dptx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/soc/mediatek/common') diff --git a/src/soc/mediatek/common/dp/dptx.c b/src/soc/mediatek/common/dp/dptx.c index f2c0905cc4..08d288acf8 100644 --- a/src/soc/mediatek/common/dp/dptx.c +++ b/src/soc/mediatek/common/dp/dptx.c @@ -1111,7 +1111,10 @@ int mtk_edp_init(struct edid *edid) dptx_check_sinkcap(&mtk_edp); - dptx_get_edid(&mtk_edp, edid); + if (dptx_get_edid(&mtk_edp, edid) != 0) { + printk(BIOS_ERR, "Failed to get EDID\n"); + return -1; + } dptx_set_trainingstart(&mtk_edp); dp_intf_config(edid); -- cgit v1.2.3