From c4e14c2929c9b510c05ac7e54a9d0c441056f5e5 Mon Sep 17 00:00:00 2001 From: Yidi Lin Date: Tue, 9 Jan 2024 11:50:27 +0800 Subject: mb/google/cherry: Use common mtk_display_init() TEST=check FW screen on dojo Change-Id: Ie870899226588ac2a2e80f77e434455f4913d387 Signed-off-by: Yidi Lin Reviewed-on: https://review.coreboot.org/c/coreboot/+/79778 Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu --- src/soc/mediatek/common/display.c | 7 +++++++ src/soc/mediatek/mt8195/Makefile.inc | 1 + src/soc/mediatek/mt8195/ddp.c | 2 +- src/soc/mediatek/mt8195/include/soc/ddp.h | 4 +--- src/soc/mediatek/mt8195/include/soc/dsi.h | 8 ++++++++ 5 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 src/soc/mediatek/mt8195/include/soc/dsi.h (limited to 'src/soc') diff --git a/src/soc/mediatek/common/display.c b/src/soc/mediatek/common/display.c index d51151ecab..a5b0e6b031 100644 --- a/src/soc/mediatek/common/display.c +++ b/src/soc/mediatek/common/display.c @@ -43,6 +43,13 @@ __weak int mtk_edp_init(struct edid *edid) return -1; } +__weak int mtk_dsi_init(u32 mode_flags, u32 format, u32 lanes, + const struct edid *edid, const u8 *init_commands) +{ + printk(BIOS_WARNING, "%s: Not supported\n", __func__); + return -1; +} + int mtk_display_init(void) { struct edid edid; diff --git a/src/soc/mediatek/mt8195/Makefile.inc b/src/soc/mediatek/mt8195/Makefile.inc index 73ea6faccd..56a10bc2f2 100644 --- a/src/soc/mediatek/mt8195/Makefile.inc +++ b/src/soc/mediatek/mt8195/Makefile.inc @@ -45,6 +45,7 @@ ramstage-y += ../common/early_init.c ramstage-y += ../common/ddp.c ddp.c ramstage-y += ../common/devapc.c devapc.c ramstage-y += ../common/dfd.c +ramstage-y += ../common/display.c ramstage-y += ../common/dpm.c ramstage-$(CONFIG_DPM_FOUR_CHANNEL) += ../common/dpm_4ch.c ramstage-y += ../common/dp/dp_intf.c ../common/dp/dptx.c ../common/dp/dptx_hal.c dp_intf.c diff --git a/src/soc/mediatek/mt8195/ddp.c b/src/soc/mediatek/mt8195/ddp.c index 6277fa4caf..2bd95a2fac 100644 --- a/src/soc/mediatek/mt8195/ddp.c +++ b/src/soc/mediatek/mt8195/ddp.c @@ -150,7 +150,7 @@ void mtk_ddp_init(void) write32((void *)(SMI_LARB0 + SMI_LARB_PORT_L0_OVL_RDMA0), 0); } -void mtk_ddp_mode_set(const struct edid *edid) +void mtk_ddp_mode_set(const struct edid *edid, enum disp_path_sel path) { u32 fmt = OVL_INFMT_RGBA8888; u32 bpp = edid->framebuffer_bits_per_pixel / 8; diff --git a/src/soc/mediatek/mt8195/include/soc/ddp.h b/src/soc/mediatek/mt8195/include/soc/ddp.h index 339449002a..52bf9aec35 100644 --- a/src/soc/mediatek/mt8195/include/soc/ddp.h +++ b/src/soc/mediatek/mt8195/include/soc/ddp.h @@ -5,6 +5,7 @@ #include #include +#include #include #define MAIN_PATH_OVL_NR 2 @@ -366,7 +367,4 @@ enum { SMI_LARB_PORT_L0_OVL_RDMA0 = 0x388, }; -void mtk_ddp_init(void); -void mtk_ddp_mode_set(const struct edid *edid); - #endif diff --git a/src/soc/mediatek/mt8195/include/soc/dsi.h b/src/soc/mediatek/mt8195/include/soc/dsi.h new file mode 100644 index 0000000000..0fd65b93f8 --- /dev/null +++ b/src/soc/mediatek/mt8195/include/soc/dsi.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef SOC_MEDIATEK_MT8195_DSI_H +#define SOC_MEDIATEK_MT8195_DSI_H + +#include + +#endif -- cgit v1.2.3