dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
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: Fri, 18 Mar 2016 18:48:39 +0100	[thread overview]
Message-ID: <20160318174839.GJ14170@phenom.ffwll.local> (raw)
In-Reply-To: <56EB28E0.8010508@tronnes.org>

On Thu, Mar 17, 2016 at 11:00:00PM +0100, Noralf Trønnes wrote:
> 
> Den 16.03.2016 19:26, skrev Eric Anholt:
> >Noralf Trønnes <noralf@tronnes.org> writes:
> >
> >>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.
> >>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);
> >>};
> >This is awesome!
> >
> >I was wondering, have you considered what it would take to DMA
> >framebuffer contents from somewhere in memory to these displays?  Does
> >that look doable to you?
> 
> The vast majory of these displays are connected through SPI and the SPI
> subsystem maps the buffers using the DMA streaming API including support
> for vmalloc buffers. I have some more details in my reply to Daniel.
> 
> >I'd love to be able to do something PRIME-like where vc4's doing the
> >rendering and we're periodically updating the TFT with the result.
> 
> I think I read somewhere that one drm device could do the rendering and
> another could scan out the buffer. It would be great if this could be done.
> Some use these displays on handhold game emulators and the emulator only
> supports OpenGL or some library needing hw rendering. Currently on the
> Raspberry Pi this is solved by having a program take snapshots of the gpu
> framebuffer and copy this into the fbtft fbdev framebuffer.

Yeah, this is definitely perfect use-case for prime buffer sharing.
CMA/dma buffer support for tinydrm would be great to make this work
seamlessly.
-Daniel
-- 
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

  reply	other threads:[~2016-03-18 17:47 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 ` [RFC 0/5] drm: Add support for tiny LCD displays Daniel Vetter
2016-03-16 18:26 ` Eric Anholt
2016-03-17 22:00   ` Noralf Trønnes
2016-03-18 17:48     ` Daniel Vetter [this message]
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=20160318174839.GJ14170@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