aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@freescale.com>2014-07-09 23:18:14 -0400
committerShawn Guo <shawn.guo@freescale.com>2014-07-11 04:14:45 -0400
commit21d742a1d602b703a935f40f0811dd8b0820c31d (patch)
treee8f9cfea6d9bd82b7b31e3604530e9dbf5b37446 /drivers/video
parentf9a708175789b138e559f6afcea75cd4b2acd25e (diff)
ENGR00322272-2: video: mxc ldb: remove ldb_di_sel from pixel rate setup
Since commit 0bec46131d88 (ENGR00318063-8: ARM: imx6q: hide buggy ldb_di_sel from clk API), the mux clock ldb_di_sel becomes unavailable from the clock tree. The LDB driver sets up its pixel clock rate with the help of ldb_di_sel knowledge, and thus causes problem. The net result is the LDB pixel clock rate slows down to 50 MHz (50285714) from the original 64 MHz (64653061) on imx6q. The patch fixes the problem by removing the ldb_di_sel knowledge from the clock configuration path and just setting the rate on div_sel[chno] clock. The bonus point is that we can use chan.vm.pixelclock directly instead of calculating the required rate we need to set on ldb_di_sel_parent. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/mxc/ldb.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/video/mxc/ldb.c b/drivers/video/mxc/ldb.c
index 4739df7fcca1..0fa426d291ee 100644
--- a/drivers/video/mxc/ldb.c
+++ b/drivers/video/mxc/ldb.c
@@ -389,11 +389,10 @@ static int ldb_setup(struct mxc_dispdrv_handle *mddh,
389 struct ldb_data *ldb = mxc_dispdrv_getdata(mddh); 389 struct ldb_data *ldb = mxc_dispdrv_getdata(mddh);
390 struct ldb_chan chan; 390 struct ldb_chan chan;
391 struct device *dev = ldb->dev; 391 struct device *dev = ldb->dev;
392 struct clk *ldb_di_parent, *ldb_di_sel, *ldb_di_sel_parent; 392 struct clk *ldb_di_parent, *ldb_di_sel_parent;
393 struct clk *other_ldb_di_sel = NULL; 393 struct clk *other_ldb_di_sel = NULL;
394 struct bus_mux bus_mux; 394 struct bus_mux bus_mux;
395 int ret = 0, id = 0, chno, other_chno; 395 int ret = 0, id = 0, chno, other_chno;
396 unsigned long serial_clk;
397 u32 mux_val; 396 u32 mux_val;
398 397
399 ret = find_ldb_chno(ldb, fbi, &chno); 398 ret = find_ldb_chno(ldb, fbi, &chno);
@@ -421,7 +420,7 @@ static int ldb_setup(struct mxc_dispdrv_handle *mddh,
421 } 420 }
422 421
423 /* 422 /*
424 * ldb_di_sel_parent(plls) -> ldb_di_sel -> 423 * ldb_di_sel_parent(plls) ->
425 * 424 *
426 * -> div_3_5[chno] -> 425 * -> div_3_5[chno] ->
427 * -> | |-> div_sel[chno] -> 426 * -> | |-> div_sel[chno] ->
@@ -433,11 +432,8 @@ static int ldb_setup(struct mxc_dispdrv_handle *mddh,
433 ldb_di_parent = ldb->spl_mode ? ldb->div_3_5_clk[chno] : 432 ldb_di_parent = ldb->spl_mode ? ldb->div_3_5_clk[chno] :
434 ldb->div_7_clk[chno]; 433 ldb->div_7_clk[chno];
435 clk_set_parent(ldb->div_sel_clk[chno], ldb_di_parent); 434 clk_set_parent(ldb->div_sel_clk[chno], ldb_di_parent);
436 ldb_di_sel = clk_get_parent(ldb_di_parent); 435 ldb_di_sel_parent = clk_get_parent(ldb_di_parent);
437 ldb_di_sel_parent = clk_get_parent(ldb_di_sel); 436 clk_set_rate(ldb->div_sel_clk[chno], chan.vm.pixelclock);
438 serial_clk = ldb->spl_mode ? chan.vm.pixelclock * 7 / 2 :
439 chan.vm.pixelclock * 7;
440 clk_set_rate(ldb_di_sel_parent, serial_clk);
441 437
442 /* 438 /*
443 * split mode or dual mode: 439 * split mode or dual mode: