]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
panel-raspberrypi-touchscreen: Round up clk rate to fix DSI panel.
[mirror_ubuntu-zesty-kernel.git] / drivers / gpu / drm / panel / panel-raspberrypi-touchscreen.c
index 1a536fe4d040f5fafe324baee110a6225dd0be08..7f315f04b109621ca7f3861fdd8acf956e752629 100644 (file)
@@ -220,7 +220,12 @@ static const struct drm_display_mode rpi_touchscreen_modes[] = {
 #define HBP         46
 #define HFP         ((PIXEL_CLOCK / (VTOTAL * VREFRESH)) - (HACT + HSW + HBP))
 
-               .clock = PIXEL_CLOCK / 1000,
+               /* Round up the pixel clock a bit (10khz), so that the
+                * "don't run things faster than the requested clock
+                * rate" rule of the clk driver doesn't reject the
+                * divide-by-3 mode due to rounding error.
+                */
+               .clock = PIXEL_CLOCK / 1000 + 10,
                .hdisplay = HACT,
                .hsync_start = HACT + HFP,
                .hsync_end = HACT + HFP + HSW,