From ba604b558e3a4e9e53c948391bc86a7bc775e6b3 Mon Sep 17 00:00:00 2001 From: Yidi Lin Date: Wed, 3 Jan 2024 16:07:24 +0800 Subject: soc/mediatek: Add common implementation to configure display The sequences of configure_display() are similar on MediaTek platforms. The sequences usually involve following steps: 1. Setup mtcmos for display hardware block. - mtcmos_display_power_on() - mtcmos_protect_display_bus() 2. Configure backlight pins 3. Power on the panel - It also powers on the bridge in MIPI DSI to eDP case. 4. General initialization for DDP(display data path) 5. Initialize eDP/MIPI DSI accordingly, - For eDP path, it calls mtk_edp_init() to get edid from the panel and initializes eDP driver. - For MIPI DSI path, the edid is retrieved either from the bridge or from CBFS (the serializable data), and then initializes DSI driver. 6. Set framebuffer bits per pixel 7. Setup DDP mode 8. Setup panel orientation This patch extracts geralt/display.c to mediatek/common/display.c and refactors `struct panel_description` to generalize the display init sequences. configure_display() is also renamed to mtk_display_init(). TEST=check FW screen on geralt. Change-Id: I403bba8a826de5f3fb2ea96a5403725ff194164f Signed-off-by: Yidi Lin Reviewed-on: https://review.coreboot.org/c/coreboot/+/79776 Reviewed-by: Yu-Ping Wu Tested-by: build bot (Jenkins) --- src/soc/mediatek/mt8188/include/soc/ddp.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/soc/mediatek/mt8188/include') diff --git a/src/soc/mediatek/mt8188/include/soc/ddp.h b/src/soc/mediatek/mt8188/include/soc/ddp.h index da14a2c4e7..94fdb810a7 100644 --- a/src/soc/mediatek/mt8188/include/soc/ddp.h +++ b/src/soc/mediatek/mt8188/include/soc/ddp.h @@ -5,6 +5,7 @@ #include #include +#include #include #define MAIN_PATH_OVL_NR 1 @@ -282,13 +283,4 @@ enum { SMI_LARB_PORT_L0_OVL_RDMA0 = 0xF88, }; -enum disp_path_sel { - DISP_PATH_NONE = 0, - DISP_PATH_EDP, - DISP_PATH_MIPI, -}; - -void mtk_ddp_init(void); -void mtk_ddp_mode_set(const struct edid *edid, enum disp_path_sel); - #endif -- cgit v1.2.3