drm/panel: waveshare: Fix up timings for 10.1" panel
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Fri, 28 Jul 2023 17:10:53 +0000 (18:10 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:01 +0000 (11:35 +0000)
The 10.1" panel doesn't work with the timings defined. vc4
will always have been fixing up the timing due to the limited
integer divider, so compute the fixed up mode and use it
directly.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/gpu/drm/panel/panel-waveshare-dsi.c

index 2b2f94b..2e0947a 100644 (file)
@@ -112,11 +112,11 @@ static const struct drm_display_mode ws_panel_7_9_mode = {
  * https://www.waveshare.com/product/raspberry-pi/displays/10.1inch-dsi-lcd-c.htm
  */
 static const struct drm_display_mode ws_panel_10_1_mode = {
-       .clock = 76800,
+       .clock = 83333,
        .hdisplay = 1280,
-       .hsync_start = 1280 + 40,
-       .hsync_end = 1280 + 40 + 20,
-       .htotal = 1280 + 40 + 20 + 40,
+       .hsync_start = 1280 + 156,
+       .hsync_end = 1280 + 156 + 20,
+       .htotal = 1280 + 156 + 20 + 40,
        .vdisplay = 800,
        .vsync_start = 800 + 40,
        .vsync_end = 800 + 40 + 48,