summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/mxc/ipu3/ipu_disp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/mxc/ipu3/ipu_disp.c b/drivers/mxc/ipu3/ipu_disp.c
index fc28b3700a7f..e956529dd2cd 100644
--- a/drivers/mxc/ipu3/ipu_disp.c
+++ b/drivers/mxc/ipu3/ipu_disp.c
@@ -1087,8 +1087,13 @@ int32_t ipu_init_sync_panel(struct ipu_soc *ipu, int disp, uint32_t pixel_clk,
rounded_pixel_clk = pixel_clk * 2;
rounded_parent_clk = clk_round_rate(di_parent,
rounded_pixel_clk);
- while (rounded_pixel_clk < rounded_parent_clk)
- rounded_pixel_clk += pixel_clk * 2;
+ while (rounded_pixel_clk < rounded_parent_clk) {
+ /* the max divider from parent to di is 8 */
+ if (rounded_parent_clk / pixel_clk < 8)
+ rounded_pixel_clk += pixel_clk * 2;
+ else
+ rounded_pixel_clk *= 2;
+ }
clk_set_rate(di_parent, rounded_pixel_clk);
rounded_pixel_clk =
clk_round_rate(ipu->di_clk[disp], pixel_clk);