diff --git a/src/soc/mediatek/common/display.c b/src/soc/mediatek/common/display.c index d1880e4299..1f7277a0e6 100644 --- a/src/soc/mediatek/common/display.c +++ b/src/soc/mediatek/common/display.c @@ -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; } diff --git a/src/soc/mediatek/common/include/soc/display.h b/src/soc/mediatek/common/include/soc/display.h index ca8782280e..c71d15bb66 100644 --- a/src/soc/mediatek/common/include/soc/display.h +++ b/src/soc/mediatek/common/include/soc/display.h @@ -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 diff --git a/src/soc/mediatek/mt8196/ddp.c b/src/soc/mediatek/mt8196/ddp.c index ba317d4e79..012c6c9b3b 100644 --- a/src/soc/mediatek/mt8196/ddp.c +++ b/src/soc/mediatek/mt8196/ddp.c @@ -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)); }