drm: rcar-du: Use 1000 to avoid misunderstanding in rcar_du_dpll_divider()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 18 Dec 2017 00:35:18 +0000 (00:35 +0000)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Wed, 14 Feb 2018 16:05:25 +0000 (18:05 +0200)
It is difficult to understand its scale if number has many 0s.
This patch uses "* 1000" to avoid it in rcar_du_dpll_divider().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_crtc.c

index 5685d5a..6820461 100644 (file)
@@ -132,7 +132,7 @@ static void rcar_du_dpll_divider(struct rcar_du_crtc *rcrtc,
 
                                output = input * (n + 1) / (m + 1)
                                       / (fdpll + 1);
-                               if (output >= 400000000)
+                               if (output >= 400 * 1000 * 1000)
                                        continue;
 
                                diff = abs((long)output - (long)target);