Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/panel: simple: Convert Innolux G121X1-L03 to display_timing

Use display_timing instead of drm_display_mode to define a range of
possible display timings supported by this panel. This makes the panel
support more flexible and improves compatibility. No functional change
is expected.

The settings are picked from documentation [1] section 6.1 INPUT SIGNAL
TIMING SPECIFICATIONS.

[1] https://www.distec.de/fileadmin/pdf/produkte/TFT-Displays/Innolux/G121X1-L03_Datasheet.pdf

Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240328102746.17868-3-marex@denx.de

+13 -13
+13 -13
drivers/gpu/drm/panel/panel-simple.c
··· 2591 2591 .connector_type = DRM_MODE_CONNECTOR_LVDS, 2592 2592 }; 2593 2593 2594 - static const struct drm_display_mode innolux_g121x1_l03_mode = { 2595 - .clock = 65000, 2596 - .hdisplay = 1024, 2597 - .hsync_start = 1024 + 0, 2598 - .hsync_end = 1024 + 1, 2599 - .htotal = 1024 + 0 + 1 + 320, 2600 - .vdisplay = 768, 2601 - .vsync_start = 768 + 38, 2602 - .vsync_end = 768 + 38 + 1, 2603 - .vtotal = 768 + 38 + 1 + 0, 2604 - .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, 2594 + static const struct display_timing innolux_g121x1_l03_timings = { 2595 + .pixelclock = { 57500000, 64900000, 74400000 }, 2596 + .hactive = { 1024, 1024, 1024 }, 2597 + .hfront_porch = { 90, 140, 190 }, 2598 + .hback_porch = { 90, 140, 190 }, 2599 + .hsync_len = { 36, 40, 60 }, 2600 + .vactive = { 768, 768, 768 }, 2601 + .vfront_porch = { 2, 15, 30 }, 2602 + .vback_porch = { 2, 15, 30 }, 2603 + .vsync_len = { 2, 8, 20 }, 2604 + .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW, 2605 2605 }; 2606 2606 2607 2607 static const struct panel_desc innolux_g121x1_l03 = { 2608 - .modes = &innolux_g121x1_l03_mode, 2609 - .num_modes = 1, 2608 + .timings = &innolux_g121x1_l03_timings, 2609 + .num_timings = 1, 2610 2610 .bpc = 6, 2611 2611 .size = { 2612 2612 .width = 246,