From: hhb Date: Tue, 6 Aug 2013 09:09:13 +0000 (+0800) Subject: mipi dsi: fix bug about mclk variation X-Git-Tag: firefly_0821_release~6745 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=35c0172ffff6d0cf25537c6f01d4c496010f379e;p=firefly-linux-kernel-4.4.55.git mipi dsi: fix bug about mclk variation --- diff --git a/drivers/mfd/rk616-core.c b/drivers/mfd/rk616-core.c index 7c0347868acc..0a93b778be73 100755 --- a/drivers/mfd/rk616-core.c +++ b/drivers/mfd/rk616-core.c @@ -40,12 +40,12 @@ static struct mfd_cell rk616_devs[] = { }, }; - +extern int rk_mipi_dsi_init_lite(void); void rk616_mclk_set_rate(struct clk *mclk,unsigned long rate) { clk_set_rate(mclk, rate); -#if defined(RK616_MIPI_DSI) +#if defined(CONFIG_RK616_MIPI_DSI) rk_mipi_dsi_init_lite(); #endif diff --git a/drivers/video/rockchip/transmitter/rk616_mipi_dsi.c b/drivers/video/rockchip/transmitter/rk616_mipi_dsi.c index c3c3a1fb45e6..01a65816970f 100644 --- a/drivers/video/rockchip/transmitter/rk616_mipi_dsi.c +++ b/drivers/video/rockchip/transmitter/rk616_mipi_dsi.c @@ -77,8 +77,9 @@ * *v1.0 : this driver is mipi dsi driver of rockchip; *v1.1 : add FT code +*v1.2 : add rk_mipi_dsi_init_lite() for mclk variation */ -#define RK_MIPI_DSI_VERSION_AND_TIME "rockchip mipi_dsi v1.1 2013-07-23" +#define RK_MIPI_DSI_VERSION_AND_TIME "rockchip mipi_dsi v1.2 2013-08-06" @@ -728,6 +729,9 @@ int rk_mipi_dsi_init_lite(void) { u32 decimals = 1000, i = 0, pre = 0, val = 0, ref_clk = 0; struct mipi_dsi_screen *screen = g_screen; + if(!screen) + return -1; + if(rk_mipi_dsi_is_active() == 0) return -1;