summaryrefslogtreecommitdiff
path: root/src/soc/mediatek
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/mediatek')
-rw-r--r--src/soc/mediatek/common/dsi.c11
-rw-r--r--src/soc/mediatek/common/include/soc/dsi_common.h6
2 files changed, 15 insertions, 2 deletions
diff --git a/src/soc/mediatek/common/dsi.c b/src/soc/mediatek/common/dsi.c
index 2505bbc075..8254dc5e87 100644
--- a/src/soc/mediatek/common/dsi.c
+++ b/src/soc/mediatek/common/dsi.c
@@ -154,8 +154,11 @@ static void mtk_dsi_rxtx_control(u32 mode_flags, u32 lanes)
break;
}
- tmp_reg |= (mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) << 6;
- tmp_reg |= (mode_flags & MIPI_DSI_MODE_EOT_PACKET) >> 3;
+ if (mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS)
+ tmp_reg |= NON_CONTINUOUS_CLK;
+
+ if (!(mode_flags & MIPI_DSI_MODE_EOT_PACKET))
+ tmp_reg |= EOTP_DISABLE;
write32(&dsi0->dsi_txrx_ctrl, tmp_reg);
}
@@ -202,6 +205,10 @@ static void mtk_dsi_config_vdo_timing(u32 mode_flags, u32 format, u32 lanes,
phy_timing->da_hs_zero + phy_timing->da_hs_exit + 3;
u32 delta = 12;
+
+ if (mode_flags & MIPI_DSI_MODE_EOT_PACKET)
+ delta += 2;
+
if (mode_flags & MIPI_DSI_MODE_VIDEO_BURST)
delta += 6;
diff --git a/src/soc/mediatek/common/include/soc/dsi_common.h b/src/soc/mediatek/common/include/soc/dsi_common.h
index 7bacec1c77..aebe62aa36 100644
--- a/src/soc/mediatek/common/include/soc/dsi_common.h
+++ b/src/soc/mediatek/common/include/soc/dsi_common.h
@@ -118,6 +118,12 @@ enum {
MIX_MODE = BIT(17)
};
+/* DSI_TXRX_CTRL */
+enum {
+ EOTP_DISABLE = BIT(6),
+ NON_CONTINUOUS_CLK = BIT(16),
+};
+
/* DSI_PSCTRL */
enum {
DSI_PS_WC = 0x3fff,