drm: rcar-du: lvds: Fix PLL frequency-related configuration
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Mon, 7 Sep 2015 13:03:25 +0000 (16:03 +0300)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 23 Feb 2016 07:34:30 +0000 (09:34 +0200)
The frequency checks don't match the datasheet, fix them.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c

index 937b2da98814c87b4b9c73c63bbb8d61360682ee..e044a17a2a2f74a3e317aeca7052807413463af2 100644 (file)
@@ -56,11 +56,11 @@ static int rcar_du_lvdsenc_start(struct rcar_du_lvdsenc *lvds,
                return ret;
 
        /* PLL clock configuration */
-       if (freq <= 38000)
+       if (freq < 39000)
                pllcr = LVDPLLCR_CEEN | LVDPLLCR_COSEL | LVDPLLCR_PLLDLYCNT_38M;
-       else if (freq <= 60000)
+       else if (freq < 61000)
                pllcr = LVDPLLCR_CEEN | LVDPLLCR_COSEL | LVDPLLCR_PLLDLYCNT_60M;
-       else if (freq <= 121000)
+       else if (freq < 121000)
                pllcr = LVDPLLCR_CEEN | LVDPLLCR_COSEL | LVDPLLCR_PLLDLYCNT_121M;
        else
                pllcr = LVDPLLCR_PLLDLYCNT_150M;