summaryrefslogtreecommitdiff
path: root/src/soc/mediatek
diff options
context:
space:
mode:
authorYu-Ping Wu <yupingso@chromium.org>2021-12-27 13:46:35 +0800
committerFelix Held <felix-coreboot@felixheld.de>2021-12-28 09:36:42 +0000
commitf8f5062430bffc5494c346de28f63dba5785f447 (patch)
tree74e3dabd1daa429c254dd71032936faa5afdc307 /src/soc/mediatek
parentdb01d1e2fc097f3f54229b6db65fcf04026c01e4 (diff)
soc/mediatek: Prevent passing NULL MIPI commands
Previously (before CB:56965 [1]) mtk_dsi_send_init_command() would ignore NULL initialization commands passed to it. However, in the current code mipi_panel_parse_init_commands() doesn't check that (see CB:57150 [2]), so we should check it on the caller side from mtk_dsi_init(). [1] b2a1480191 device: Move MIPI panel library from mainboard/google/kukui into common [2] 4757a7ea33 mipi: Make panel init callback work directly on DSI transaction types BUG=b:202871018, b:209930699 TEST=emerge-corsola coreboot BRANCH=none Change-Id: I8196e3b135da273325e2e121523abb7fb230a49c Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/60392 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Diffstat (limited to 'src/soc/mediatek')
-rw-r--r--src/soc/mediatek/common/dsi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/soc/mediatek/common/dsi.c b/src/soc/mediatek/common/dsi.c
index a4556f5200..f16d8f2480 100644
--- a/src/soc/mediatek/common/dsi.c
+++ b/src/soc/mediatek/common/dsi.c
@@ -377,7 +377,8 @@ int mtk_dsi_init(u32 mode_flags, u32 format, u32 lanes, const struct edid *edid,
mtk_dsi_clk_hs_mode_disable();
mtk_dsi_config_vdo_timing(mode_flags, format, lanes, edid, &phy_timing);
mtk_dsi_clk_hs_mode_enable();
- mipi_panel_parse_init_commands(init_commands, mtk_dsi_cmdq);
+ if (init_commands)
+ mipi_panel_parse_init_commands(init_commands, mtk_dsi_cmdq);
mtk_dsi_set_mode(mode_flags);
mtk_dsi_start();