video: tegra20: dsi: make SOL delay calculation mode independent
Move SOL delay calculation outside of video mode conditions. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
This commit is contained in:
@@ -712,9 +712,6 @@ static void tegra_dsi_configure(struct udevice *dev,
|
|||||||
writel(hact << 16 | hbp, &len->dsi_pkt_len_2_3);
|
writel(hact << 16 | hbp, &len->dsi_pkt_len_2_3);
|
||||||
writel(hfp, &len->dsi_pkt_len_4_5);
|
writel(hfp, &len->dsi_pkt_len_4_5);
|
||||||
writel(0x0f0f << 16, &len->dsi_pkt_len_6_7);
|
writel(0x0f0f << 16, &len->dsi_pkt_len_6_7);
|
||||||
|
|
||||||
/* set SOL delay (for non-burst mode only) */
|
|
||||||
writel(8 * mul / div, &misc->dsi_sol_delay);
|
|
||||||
} else {
|
} else {
|
||||||
if (priv->master || priv->slave) {
|
if (priv->master || priv->slave) {
|
||||||
/*
|
/*
|
||||||
@@ -734,6 +731,7 @@ static void tegra_dsi_configure(struct udevice *dev,
|
|||||||
value = MIPI_DCS_WRITE_MEMORY_START << 8 |
|
value = MIPI_DCS_WRITE_MEMORY_START << 8 |
|
||||||
MIPI_DCS_WRITE_MEMORY_CONTINUE;
|
MIPI_DCS_WRITE_MEMORY_CONTINUE;
|
||||||
writel(value, &len->dsi_dcs_cmds);
|
writel(value, &len->dsi_dcs_cmds);
|
||||||
|
}
|
||||||
|
|
||||||
/* set SOL delay */
|
/* set SOL delay */
|
||||||
if (priv->master || priv->slave) {
|
if (priv->master || priv->slave) {
|
||||||
@@ -752,12 +750,11 @@ static void tegra_dsi_configure(struct udevice *dev,
|
|||||||
bclk_ganged = DIV_ROUND_UP(bclk * lanes / 2, lanes);
|
bclk_ganged = DIV_ROUND_UP(bclk * lanes / 2, lanes);
|
||||||
value = bclk - bclk_ganged + delay + 20;
|
value = bclk - bclk_ganged + delay + 20;
|
||||||
} else {
|
} else {
|
||||||
/* TODO: revisit for non-ganged mode */
|
/* set SOL delay (for non-burst mode only) */
|
||||||
value = 8 * mul / div;
|
value = 8 * mul / div;
|
||||||
}
|
}
|
||||||
|
|
||||||
writel(value, &misc->dsi_sol_delay);
|
writel(value, &misc->dsi_sol_delay);
|
||||||
}
|
|
||||||
|
|
||||||
if (priv->slave) {
|
if (priv->slave) {
|
||||||
tegra_dsi_configure(priv->slave, mode_flags);
|
tegra_dsi_configure(priv->slave, mode_flags);
|
||||||
|
Reference in New Issue
Block a user