soc/mediatek/mt8196: Support logo display on DISP_PATH_DUAL_MIPI path

The mtk_ddp_ovlsys_start function is updated to take edid and path
as arguments. This allows the function to configure the framebuffer
address and overlay for DISP_PATH_DUAL_MIPI path.

BUG=b:319511268
TEST=cherry pick CB:90504 and manual enable BMP_LOGO related configs.
     The logo is drawn in the ramstage.

Change-Id: I60809f7062907617f2af1badcad9f53477911020
Signed-off-by: Yidi Lin <yidilin@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90537
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Chen-Tsung Hsieh <chentsung@google.com>
This commit is contained in:
Yidi Lin 2025-12-15 21:10:06 +08:00
commit 003ea85115
3 changed files with 19 additions and 5 deletions

View file

@ -78,7 +78,8 @@ static void panel_configure_backlight(struct panel_description *panel,
static void display_logo(struct panel_description *panel,
uintptr_t fb_addr,
const struct edid *edid)
const struct edid *edid,
enum disp_path_sel path)
{
memset((void *)fb_addr, 0, edid->bytes_per_line * edid->y_resolution);
@ -90,7 +91,7 @@ static void display_logo(struct panel_description *panel,
};
render_logo_to_framebuffer(&config);
mtk_ddp_ovlsys_start(fb_addr);
mtk_ddp_ovlsys_start(fb_addr, edid, path);
panel_configure_backlight(panel, true);
}
@ -209,7 +210,7 @@ int mtk_display_init(void)
fb_set_dual_pipe_flag(info, true);
if (CONFIG(BMP_LOGO))
display_logo(panel, fb_addr, &edid);
display_logo(panel, fb_addr, &edid, panel->disp_path);
return 0;
}

View file

@ -37,6 +37,7 @@ void mtk_ddp_soc_mode_set(u32 fmt, u32 bpp, u32 width, u32 height, u32 vrefresh,
enum disp_path_sel path, struct dsc_config *dsc_config);
void mtk_ddp_mode_set(const struct edid *edid, enum disp_path_sel path,
struct dsc_config *dsc_config);
void mtk_ddp_ovlsys_start(uintptr_t fb_addr);
void mtk_ddp_ovlsys_start(uintptr_t fb_addr, const struct edid *edid,
enum disp_path_sel path);
#endif

View file

@ -695,10 +695,22 @@ void mtk_ddp_soc_mode_set(u32 fmt, u32 bpp, u32 width, u32 height, u32 vrefresh,
ovlsys_layer_config(fmt, bpp, width, height, path);
}
void mtk_ddp_ovlsys_start(uintptr_t fb_addr)
void mtk_ddp_ovlsys_start(uintptr_t fb_addr, const struct edid *edid,
enum disp_path_sel path)
{
uint32_t offset;
write32(&ovl_exdma2_reg->ovl_addr, fb_addr);
setbits32(&ovl_exdma2_reg->ovl_en, BIT(0));
setbits32(&ovl_exdma2_reg->ovl_l_en, BIT(0));
setbits32(&ovl_blenders[0]->bld_l_en, BIT(0));
if (!DUAL_PIPE(path))
return;
offset = edid->x_resolution * edid->framebuffer_bits_per_pixel / 8 / 2;
write32(&ovl1_exdma2_reg->ovl_addr, fb_addr + offset);
setbits32(&ovl1_exdma2_reg->ovl_en, BIT(0));
setbits32(&ovl1_exdma2_reg->ovl_l_en, BIT(0));
setbits32(&ovl1_blenders[0]->bld_l_en, BIT(0));
}