From: Daniel Vetter <daniel@ffwll.ch>
To: "Noralf Trønnes" <noralf@tronnes.org>
Cc: thomas.petazzoni@free-electrons.com, dri-devel@lists.freedesktop.org
Subject: Re: [RFC 0/5] drm: Add support for tiny LCD displays
Date: Wed, 16 Mar 2016 15:50:52 +0100 [thread overview]
Message-ID: <20160316145052.GO14170@phenom.ffwll.local> (raw)
In-Reply-To: <1458135259-31050-1-git-send-email-noralf@tronnes.org>
On Wed, Mar 16, 2016 at 02:34:14PM +0100, Noralf Trønnes wrote:
> 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 and optionally drm_panel functions which can be used to
> set up the display controller and control backlight.
>
> tinydrm also has fbdev support using fb_deferred_io which is tied in through
> the dirtyfb function call. A driver can use the provided deferred work code
> to collect dirtyfb calls and schedule display memory updates if it whishes.
> The various display controllers can have library modules that handles
> display updates.
fbdev fb_deferred_io should be part of the fbdev helper, not a separate
library. We already have hand-rolled fbdev deferred io in qxl, i915 & udl,
no need to invent yet another one. Well the one in i915 is a bit a hack.
I think the best option would be to extract the code from qxl (since it
already uses a work automatically if needed) and put it into drm_fb_helper.c.
Otherwise the layering goes bust. We already have drm_fb_helper_* hooks
for everything, so only thing to do in drivers is to remove lots of code
\o/
I haven't looked at any of the other parts, just a quick comment on this
part here.
-Daniel
> Display controllers that have a similar register interface as the MIPI DBI/DCS
> controllers can use the lcdreg module for register access.
>
> struct tinydrm_device {
> struct drm_device *base;
> u32 width, height;
> struct drm_panel panel;
> [...]
> int (*dirtyfb)(struct drm_framebuffer *fb, void *vmem, unsigned flags,
> unsigned color, struct drm_clip_rect *clips,
> unsigned num_clips);
> };
>
> +------------------------------+---------+
> | | fbdev |
> | DRM +------+ |
> | | |
> +-------------------------------------+--+
> | |
> | tinydrm |
> | |
> +------------------+ . . . . . . . |
> | | deferred work |
> | Display driver +---------------------+
> | | Controller module |
> +------------------+---------------------+
> | lcdreg |
> +----------------------------------------+
> | Interface (SPI, I2C, parallel) |
> +----------------------------------------+
>
>
> Noralf Trønnes (5):
> 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 | 2 +
> drivers/gpu/drm/Makefile | 1 +
> drivers/gpu/drm/tinydrm/Kconfig | 27 +
> drivers/gpu/drm/tinydrm/Makefile | 8 +
> drivers/gpu/drm/tinydrm/adafruit-tft.c | 256 ++++++++
> drivers/gpu/drm/tinydrm/core/Makefile | 8 +
> drivers/gpu/drm/tinydrm/core/internal.h | 43 ++
> drivers/gpu/drm/tinydrm/core/tinydrm-core.c | 194 ++++++
> drivers/gpu/drm/tinydrm/core/tinydrm-crtc.c | 203 ++++++
> drivers/gpu/drm/tinydrm/core/tinydrm-deferred.c | 116 ++++
> drivers/gpu/drm/tinydrm/core/tinydrm-fbdev.c | 345 ++++++++++
> drivers/gpu/drm/tinydrm/core/tinydrm-framebuffer.c | 112 ++++
> drivers/gpu/drm/tinydrm/core/tinydrm-helpers.c | 97 +++
> drivers/gpu/drm/tinydrm/core/tinydrm-plane.c | 50 ++
> 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 | 231 +++++++
> include/drm/tinydrm/ili9340.h | 85 +++
> 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 | 142 ++++
> 26 files changed, 3345 insertions(+)
> 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/internal.h
> create mode 100644 drivers/gpu/drm/tinydrm/core/tinydrm-core.c
> create mode 100644 drivers/gpu/drm/tinydrm/core/tinydrm-crtc.c
> create mode 100644 drivers/gpu/drm/tinydrm/core/tinydrm-deferred.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/core/tinydrm-plane.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/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
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-03-16 14:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-16 13:34 [RFC 0/5] drm: Add support for tiny LCD displays Noralf Trønnes
2016-03-16 13:34 ` [RFC 1/5] drm: Add DRM " Noralf Trønnes
2016-03-16 15:11 ` Daniel Vetter
2016-03-17 21:51 ` Noralf Trønnes
2016-03-18 17:47 ` Daniel Vetter
2016-03-23 17:07 ` Noralf Trønnes
2016-03-23 17:28 ` Daniel Vetter
2016-03-25 10:41 ` Noralf Trønnes
2016-03-29 7:27 ` Daniel Vetter
2016-04-01 19:15 ` Noralf Trønnes
2016-04-12 10:40 ` Daniel Vetter
2016-03-23 17:37 ` David Herrmann
2016-03-25 19:39 ` Noralf Trønnes
2016-03-16 13:34 ` [RFC 2/5] drm/tinydrm: Add lcd register abstraction Noralf Trønnes
2016-03-16 13:34 ` [RFC 3/5] drm/tinydrm/lcdreg: Add SPI support Noralf Trønnes
2016-03-16 13:34 ` [RFC 4/5] drm/tinydrm: Add mipi-dbi support Noralf Trønnes
2016-03-16 13:34 ` [RFC 5/5] drm/tinydrm: Add support for several Adafruit TFT displays Noralf Trønnes
2016-03-16 14:50 ` Daniel Vetter [this message]
2016-03-16 18:26 ` [RFC 0/5] drm: Add support for tiny LCD displays Eric Anholt
2016-03-17 22:00 ` Noralf Trønnes
2016-03-18 17:48 ` Daniel Vetter
2016-03-26 19:11 ` Noralf Trønnes
2016-03-29 7:29 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160316145052.GO14170@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=noralf@tronnes.org \
--cc=thomas.petazzoni@free-electrons.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox