diff options
author | Paul Cercueil <paul@crapouillou.net> | 2020-07-16 14:56:47 +0200 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2020-07-16 19:06:43 +0200 |
commit | 795db2afd52d1bd9305e837007166039908d8553 (patch) | |
tree | 6f5d54398c27a1e03998af5b25cd400e017019be /drivers/gpu/drm/panel | |
parent | bad20a2dbfdfaf01560026909506b6ed69d65ba2 (diff) |
drm/panel-simple: Add 50 Hz mode to the Frida FRD350H54004 panel
By changing the pixel clock and the length of the back porch, it is
possible to obtain a perfect 50 Hz refresh rate.
v2: Rebase on drm-misc-next
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200716125647.10964-2-paul@crapouillou.net
Diffstat (limited to 'drivers/gpu/drm/panel')
-rw-r--r-- | drivers/gpu/drm/panel/panel-simple.c | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 8b0bab9dd075..88493538a147 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -1753,22 +1753,36 @@ static const struct panel_desc foxlink_fl500wvr00_a0t = { .bus_format = MEDIA_BUS_FMT_RGB888_1X24, }; -static const struct drm_display_mode frida_frd350h54004_mode = { - .clock = 6000, - .hdisplay = 320, - .hsync_start = 320 + 44, - .hsync_end = 320 + 44 + 16, - .htotal = 320 + 44 + 16 + 20, - .vdisplay = 240, - .vsync_start = 240 + 2, - .vsync_end = 240 + 2 + 6, - .vtotal = 240 + 2 + 6 + 2, - .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, +static const struct drm_display_mode frida_frd350h54004_modes[] = { + { /* 60 Hz */ + .clock = 6000, + .hdisplay = 320, + .hsync_start = 320 + 44, + .hsync_end = 320 + 44 + 16, + .htotal = 320 + 44 + 16 + 20, + .vdisplay = 240, + .vsync_start = 240 + 2, + .vsync_end = 240 + 2 + 6, + .vtotal = 240 + 2 + 6 + 2, + .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, + }, + { /* 50 Hz */ + .clock = 5400, + .hdisplay = 320, + .hsync_start = 320 + 56, + .hsync_end = 320 + 56 + 16, + .htotal = 320 + 56 + 16 + 40, + .vdisplay = 240, + .vsync_start = 240 + 2, + .vsync_end = 240 + 2 + 6, + .vtotal = 240 + 2 + 6 + 2, + .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, + }, }; static const struct panel_desc frida_frd350h54004 = { - .modes = &frida_frd350h54004_mode, - .num_modes = 1, + .modes = frida_frd350h54004_modes, + .num_modes = ARRAY_SIZE(frida_frd350h54004_modes), .bpc = 8, .size = { .width = 77, |