[RFC v2 0/8] drm: Add support for tiny LCD displays

Noralf Trønnes noralf at tronnes.org
Fri Apr 8 17:05:02 UTC 2016


This is an attempt at providing a DRM version of drivers/staging/fbtft.

I'm sending this early before cleaning up the code hoping to get some
feedback in case there are better ways to structure this.

The tinydrm module provides a very simplified view of DRM for displays that
has onboard video memory and is connected through a slow bus like SPI/I2C.
A driver using tinydrm has to provide a function that will be called from
the dirtyfb ioctl (or fbdev deferred io) and optional drm_panel functions
which can be used to set up the display controller and control backlight.

Display controllers that have a similar register interface as the MIPI DBI/DCS
controllers can use the lcdreg module for register access.

Changes since RFC v1:
- Add fb_deferred_io support to drm_fb_helper and drm_fb_cma_helper,
  and use drm_fb_cma_helper instead.
- Move display pipeline code to drm_simple_kms_helper.
- Don't use (struct drm_driver *)->load().
- Make tinydrm more like a library, exporting the internals.
- Move the struct drm_driver definition from the tinydrm module to the
  driver using a helper macro: TINYDRM_DRM_DRIVER.
- Remove dirtyfb() async code.
- Added support for partial display updates.

Noralf Trønnes (8):
  drm/fb-helper: Add fb_deferred_io support
  drm/fb-cma-helper: Add fb_deferred_io support
  drm: Add helper for simple kms drivers
  drm: Add DRM support for tiny LCD displays
  drm/tinydrm: Add lcd register abstraction
  drm/tinydrm/lcdreg: Add SPI support
  drm/tinydrm: Add mipi-dbi support
  drm/tinydrm: Add support for several Adafruit TFT displays

 drivers/gpu/drm/Kconfig                            |   9 +
 drivers/gpu/drm/Makefile                           |   2 +
 drivers/gpu/drm/drm_fb_cma_helper.c                | 149 ++++-
 drivers/gpu/drm/drm_fb_helper.c                    | 189 +++++-
 drivers/gpu/drm/drm_simple_kms_helper.c            | 262 ++++++++
 drivers/gpu/drm/tinydrm/Kconfig                    |  25 +
 drivers/gpu/drm/tinydrm/Makefile                   |   8 +
 drivers/gpu/drm/tinydrm/adafruit-tft.c             | 257 ++++++++
 drivers/gpu/drm/tinydrm/core/Makefile              |   6 +
 drivers/gpu/drm/tinydrm/core/tinydrm-core.c        | 155 +++++
 .../gpu/drm/tinydrm/core/tinydrm-display-pipe.c    |  82 +++
 drivers/gpu/drm/tinydrm/core/tinydrm-fbdev.c       |  94 +++
 drivers/gpu/drm/tinydrm/core/tinydrm-framebuffer.c |  99 +++
 drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c     |  95 +++
 drivers/gpu/drm/tinydrm/lcdreg/Kconfig             |   8 +
 drivers/gpu/drm/tinydrm/lcdreg/Makefile            |   5 +
 drivers/gpu/drm/tinydrm/lcdreg/internal.h          |   8 +
 drivers/gpu/drm/tinydrm/lcdreg/lcdreg-core.c       | 190 ++++++
 drivers/gpu/drm/tinydrm/lcdreg/lcdreg-debugfs.c    | 281 ++++++++
 drivers/gpu/drm/tinydrm/lcdreg/lcdreg-spi.c        | 720 +++++++++++++++++++++
 drivers/gpu/drm/tinydrm/mipi-dbi.c                 | 253 ++++++++
 include/drm/drm_fb_cma_helper.h                    |  14 +
 include/drm/drm_fb_helper.h                        |  15 +
 include/drm/drm_simple_kms_helper.h                |  44 ++
 include/drm/tinydrm/ili9340.h                      |  47 ++
 include/drm/tinydrm/lcdreg-spi.h                   |  63 ++
 include/drm/tinydrm/lcdreg.h                       | 126 ++++
 include/drm/tinydrm/mipi-dbi.h                     |  24 +
 include/drm/tinydrm/tinydrm.h                      | 143 ++++
 29 files changed, 3360 insertions(+), 13 deletions(-)
 create mode 100644 drivers/gpu/drm/drm_simple_kms_helper.c
 create mode 100644 drivers/gpu/drm/tinydrm/Kconfig
 create mode 100644 drivers/gpu/drm/tinydrm/Makefile
 create mode 100644 drivers/gpu/drm/tinydrm/adafruit-tft.c
 create mode 100644 drivers/gpu/drm/tinydrm/core/Makefile
 create mode 100644 drivers/gpu/drm/tinydrm/core/tinydrm-core.c
 create mode 100644 drivers/gpu/drm/tinydrm/core/tinydrm-display-pipe.c
 create mode 100644 drivers/gpu/drm/tinydrm/core/tinydrm-fbdev.c
 create mode 100644 drivers/gpu/drm/tinydrm/core/tinydrm-framebuffer.c
 create mode 100644 drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c
 create mode 100644 drivers/gpu/drm/tinydrm/lcdreg/Kconfig
 create mode 100644 drivers/gpu/drm/tinydrm/lcdreg/Makefile
 create mode 100644 drivers/gpu/drm/tinydrm/lcdreg/internal.h
 create mode 100644 drivers/gpu/drm/tinydrm/lcdreg/lcdreg-core.c
 create mode 100644 drivers/gpu/drm/tinydrm/lcdreg/lcdreg-debugfs.c
 create mode 100644 drivers/gpu/drm/tinydrm/lcdreg/lcdreg-spi.c
 create mode 100644 drivers/gpu/drm/tinydrm/mipi-dbi.c
 create mode 100644 include/drm/drm_simple_kms_helper.h
 create mode 100644 include/drm/tinydrm/ili9340.h
 create mode 100644 include/drm/tinydrm/lcdreg-spi.h
 create mode 100644 include/drm/tinydrm/lcdreg.h
 create mode 100644 include/drm/tinydrm/mipi-dbi.h
 create mode 100644 include/drm/tinydrm/tinydrm.h

--
2.2.2



More information about the dri-devel mailing list