950-0479-drm-panel-simple-Add-a-timing-for-the-Raspberry-Pi-7.patch 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. From 02ce5b14d69bf513f3c6cc93c005cae07db985a0 Mon Sep 17 00:00:00 2001
  2. From: Dave Stevenson <[email protected]>
  3. Date: Fri, 26 Mar 2021 17:06:36 +0000
  4. Subject: [PATCH] drm/panel-simple: Add a timing for the Raspberry Pi
  5. 7" panel
  6. The Raspberry Pi 7" 800x480 panel uses a Toshiba TC358762 DSI
  7. to DPI bridge chip, so there is a requirement for the timings
  8. to be specified for the end panel. Add such a definition.
  9. Signed-off-by: Dave Stevenson <[email protected]>
  10. ---
  11. drivers/gpu/drm/panel/panel-simple.c | 28 ++++++++++++++++++++++++++++
  12. 1 file changed, 28 insertions(+)
  13. --- a/drivers/gpu/drm/panel/panel-simple.c
  14. +++ b/drivers/gpu/drm/panel/panel-simple.c
  15. @@ -3761,6 +3761,31 @@ static const struct panel_desc qishenglo
  16. .connector_type = DRM_MODE_CONNECTOR_DPI,
  17. };
  18. +static const struct drm_display_mode raspberrypi_7inch_mode = {
  19. + .clock = 25979400 / 1000,
  20. + .hdisplay = 800,
  21. + .hsync_start = 800 + 2,
  22. + .hsync_end = 800 + 2 + 2,
  23. + .htotal = 800 + 2 + 2 + 46,
  24. + .vdisplay = 480,
  25. + .vsync_start = 480 + 7,
  26. + .vsync_end = 480 + 7 + 2,
  27. + .vtotal = 480 + 7 + 2 + 21,
  28. + .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
  29. +};
  30. +
  31. +static const struct panel_desc raspberrypi_7inch = {
  32. + .modes = &raspberrypi_7inch_mode,
  33. + .num_modes = 1,
  34. + .bpc = 8,
  35. + .size = {
  36. + .width = 154,
  37. + .height = 86,
  38. + },
  39. + .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
  40. + .connector_type = DRM_MODE_CONNECTOR_DSI,
  41. +};
  42. +
  43. static const struct display_timing rocktech_rk070er9427_timing = {
  44. .pixelclock = { 26400000, 33300000, 46800000 },
  45. .hactive = { 800, 800, 800 },
  46. @@ -4841,6 +4866,9 @@ static const struct of_device_id platfor
  47. .compatible = "qishenglong,gopher2b-lcd",
  48. .data = &qishenglong_gopher2b_lcd,
  49. }, {
  50. + .compatible = "raspberrypi,7inch-dsi",
  51. + .data = &raspberrypi_7inch,
  52. + }, {
  53. .compatible = "rocktech,rk070er9427",
  54. .data = &rocktech_rk070er9427,
  55. }, {