diff options
author | Eric Miao <eric.miao@linaro.org> | 2011-07-20 20:49:21 +0800 |
---|---|---|
committer | Eric Miao <eric.miao@linaro.org> | 2011-08-16 12:37:20 +0800 |
commit | 9f53913db598281fff16a8cfc15c4620b1172f42 (patch) | |
tree | b1ca7158a14d7b06a418b169e5e3032b2f622dd4 | |
parent | bb2d9fef6a4d52c937e7baf60f51c4f1914e1716 (diff) |
SAUCE: ipuv3: fix kernel oops in ipu_{init,uninit}_sync_panel()
Signed-off-by: Eric Miao <eric.miao@linaro.org>
-rw-r--r-- | drivers/mxc/ipu3/ipu_disp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mxc/ipu3/ipu_disp.c b/drivers/mxc/ipu3/ipu_disp.c index e3994fafd9d..dc619f6de13 100644 --- a/drivers/mxc/ipu3/ipu_disp.c +++ b/drivers/mxc/ipu3/ipu_disp.c @@ -1096,8 +1096,8 @@ int32_t ipu_init_sync_panel(int disp, uint32_t pixel_clk, * so if the clk rate is not fit, try ext clk. */ if (!sig.int_clk && - ((rounded_pixel_clk >= pixel_clk + pixel_clk/16) || - (rounded_pixel_clk <= pixel_clk - pixel_clk/16))) { + ((rounded_pixel_clk >= pixel_clk + pixel_clk/100) || + (rounded_pixel_clk <= pixel_clk - pixel_clk/100))) { dev_dbg(g_ipu_dev, "try ipu ext di clk\n"); rounded_pixel_clk = pixel_clk * 2; while (rounded_pixel_clk < 150000000) @@ -1519,6 +1519,9 @@ void ipu_uninit_sync_panel(int disp) uint32_t reg; uint32_t di_gen; + if (disp < 0 || disp > 1) + return; + spin_lock_irqsave(&ipu_lock, lock_flags); di_gen = __raw_readl(DI_GENERAL(disp)); |