Skip to content

Commit 0734b0f

Browse files
xubilvrkhuangtao
authored andcommitted
drm/rockchip: dw-mipi-dsi: fix escape clock rate
Use the same calculation as the vendor kernel to derive the escape clock speed. Change-Id: I7aff4dc7fa9598df164148eaf44304caad704f23 Signed-off-by: xubilv <xbl@rock-chips.com>
1 parent 6d82179 commit 0734b0f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

drivers/gpu/drm/rockchip/dw-mipi-dsi.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,11 +749,16 @@ static void dw_mipi_dsi_set_mode(struct dw_mipi_dsi *dsi,
749749

750750
static void dw_mipi_dsi_init(struct dw_mipi_dsi *dsi)
751751
{
752+
u32 esc_clk_div;
753+
752754
dsi_write(dsi, DSI_PWR_UP, RESET);
753755
dsi_write(dsi, DSI_PHY_RSTZ, PHY_DISFORCEPLL | PHY_DISABLECLK
754756
| PHY_RSTZ | PHY_SHUTDOWNZ);
757+
758+
/* The maximum value of the escape clock frequency is 20MHz */
759+
esc_clk_div = DIV_ROUND_UP(dsi->lane_mbps >> 3, 20);
755760
dsi_write(dsi, DSI_CLKMGR_CFG, TO_CLK_DIVIDSION(10) |
756-
TX_ESC_CLK_DIVIDSION(7));
761+
TX_ESC_CLK_DIVIDSION(esc_clk_div));
757762
}
758763

759764
static void dw_mipi_dsi_dpi_config(struct dw_mipi_dsi *dsi,

0 commit comments

Comments
 (0)