diff options
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/mediatek/common/dsi.c | 7 | ||||
-rw-r--r-- | src/soc/mediatek/common/include/soc/dsi_common.h | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/soc/mediatek/common/dsi.c b/src/soc/mediatek/common/dsi.c index 8254dc5e87..3f35443ba1 100644 --- a/src/soc/mediatek/common/dsi.c +++ b/src/soc/mediatek/common/dsi.c @@ -224,6 +224,13 @@ static void mtk_dsi_config_vdo_timing(u32 mode_flags, u32 format, u32 lanes, "the panel may not work properly.\n"); } + if (mode_flags & MIPI_DSI_MODE_LINE_END) { + hsync_active_byte = DIV_ROUND_UP(hsync_active_byte, lanes) * lanes - 2; + hbp_byte = DIV_ROUND_UP(hbp_byte, lanes) * lanes - 2; + hfp_byte = DIV_ROUND_UP(hfp_byte, lanes) * lanes - 2; + hbp_byte -= (edid->mode.ha * bytes_per_pixel + 2) % lanes; + } + if (hfp_byte + hbp_byte < MIN_HFP_BYTE + MIN_HBP_BYTE) { printk(BIOS_ERR, "Calculated hfp_byte and hbp_byte are too small, " "the panel may not work properly.\n"); diff --git a/src/soc/mediatek/common/include/soc/dsi_common.h b/src/soc/mediatek/common/include/soc/dsi_common.h index aebe62aa36..489a591890 100644 --- a/src/soc/mediatek/common/include/soc/dsi_common.h +++ b/src/soc/mediatek/common/include/soc/dsi_common.h @@ -39,7 +39,9 @@ enum { /* device supports non-continuous clock behavior (DSI spec 5.6.1) */ MIPI_DSI_CLOCK_NON_CONTINUOUS = BIT(10), /* transmit data in low power */ - MIPI_DSI_MODE_LPM = BIT(11) + MIPI_DSI_MODE_LPM = BIT(11), + /* dsi per line's data end same time on all lanes */ + MIPI_DSI_MODE_LINE_END = BIT(12), }; struct dsi_regs { |