All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Noralf Trønnes" <noralf@tronnes.org>
To: dri-devel@lists.freedesktop.org
Subject: [RFC 0/6] drm: Add support for userspace drivers
Date: Wed,  4 Jan 2017 14:34:36 +0100	[thread overview]
Message-ID: <20170104133442.4534-1-noralf@tronnes.org> (raw)

Hi,

I was previously working on tinydrm as a replacement for staging/fbtft.
During a break from that work, I started to think about if it would be
possible to move the drivers to userspace instead. No point in having
them in the kernel if it's not necessary.

This patchset includes all the pieces necessary to get a userspace
driver[1] working that is compatible with the fbtft/fb_ili9341 driver.
It is tested with a SPI interfaced display hat/shield for the Raspberry Pi,
which has an eeprom with a Device Tree fragment on it (merged by the
bootloader). With the help of udev and systemd, the driver is able to
autoload when the display is connected.
Performance wise, the kernel driver can do ~19fps on a 320x240 spi@32MHz
display, whereas the userspace version does ~18fps. So performance is not
an argument to keep the driver in the kernel.

What do you think about this approach?

Note: This patchset is based on 4.9

[1] https://github.com/notro/udrm


Noralf.


Noralf Trønnes (6):
  drm/modes: Export drm_mode_convert_umode()
  drm: Add support for userspace drivers
  dma-buf: Support generic userspace allocations
  spi: Let clients do scatter/gather transfers
  spi: spidev: Add dma-buf support
  spi: spidev: Add userspace driver support

 drivers/dma-buf/Makefile         |   2 +-
 drivers/dma-buf/dev.c            | 211 ++++++++++++++++++
 drivers/gpu/drm/Kconfig          |   2 +
 drivers/gpu/drm/Makefile         |   1 +
 drivers/gpu/drm/drm_modes.c      |   1 +
 drivers/gpu/drm/udrm/Kconfig     |   9 +
 drivers/gpu/drm/udrm/Makefile    |   4 +
 drivers/gpu/drm/udrm/udrm-dev.c  | 276 ++++++++++++++++++++++++
 drivers/gpu/drm/udrm/udrm-drv.c  | 324 ++++++++++++++++++++++++++++
 drivers/gpu/drm/udrm/udrm-fb.c   | 369 ++++++++++++++++++++++++++++++++
 drivers/gpu/drm/udrm/udrm-pipe.c | 170 +++++++++++++++
 drivers/gpu/drm/udrm/udrm.h      |  84 ++++++++
 drivers/spi/Kconfig              |   1 +
 drivers/spi/spi.c                |  24 ++-
 drivers/spi/spidev.c             | 447 ++++++++++++++++++++++++++++++++++++++-
 include/linux/spi/spi.h          |   4 +
 include/uapi/drm/udrm.h          |  78 +++++++
 include/uapi/linux/dma-buf-dev.h |  35 +++
 include/uapi/linux/spi/spidev.h  |   8 +
 19 files changed, 2032 insertions(+), 18 deletions(-)
 create mode 100644 drivers/dma-buf/dev.c
 create mode 100644 drivers/gpu/drm/udrm/Kconfig
 create mode 100644 drivers/gpu/drm/udrm/Makefile
 create mode 100644 drivers/gpu/drm/udrm/udrm-dev.c
 create mode 100644 drivers/gpu/drm/udrm/udrm-drv.c
 create mode 100644 drivers/gpu/drm/udrm/udrm-fb.c
 create mode 100644 drivers/gpu/drm/udrm/udrm-pipe.c
 create mode 100644 drivers/gpu/drm/udrm/udrm.h
 create mode 100644 include/uapi/drm/udrm.h
 create mode 100644 include/uapi/linux/dma-buf-dev.h

--
2.10.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2017-01-04 14:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04 13:34 Noralf Trønnes [this message]
2017-01-04 13:34 ` [RFC 1/6] drm/modes: Export drm_mode_convert_umode() Noralf Trønnes
2017-01-04 13:34 ` [RFC 2/6] drm: Add support for userspace drivers Noralf Trønnes
2017-01-04 13:34 ` [RFC 3/6] dma-buf: Support generic userspace allocations Noralf Trønnes
2017-01-04 15:08   ` Daniel Vetter
2017-01-04 13:34 ` [RFC 4/6] spi: Let clients do scatter/gather transfers Noralf Trønnes
2017-01-04 13:34 ` [RFC 5/6] spi: spidev: Add dma-buf support Noralf Trønnes
2017-01-04 13:34 ` [RFC 6/6] spi: spidev: Add userspace driver support Noralf Trønnes
2017-01-04 15:06 ` [RFC 0/6] drm: Add support for userspace drivers Daniel Vetter
2017-01-04 15:15   ` Martin Peres

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=20170104133442.4534-1-noralf@tronnes.org \
    --to=noralf@tronnes.org \
    --cc=dri-devel@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.