Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Noralf Trønnes" <noralf@tronnes.org>
To: dri-devel@lists.freedesktop.org
Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org,
	laurent.pinchart@ideasonboard.com
Subject: [RFC v3 00/12] drm: Add generic fbdev emulation
Date: Thu, 22 Feb 2018 21:06:41 +0100	[thread overview]
Message-ID: <20180222200653.19453-1-noralf@tronnes.org> (raw)

This patchset explores the possibility of having generic fbdev emulation
in DRM for drivers that supports dumb buffers which they can export.

The change this time is that I have tried to do an in-kernel client API.
The intention was to have callbacks on the drm_file, but I gave up on
that mainly because I have to take a ref on the driver module since
drm_driver->postclose is called in drm_file_free(). This blocks DRM
driver module unload. Another reason is that the callback signalling new
drm_devices would have to be out-of-band so I put all the callbacks
together.

The patchset includes 3 different clients that I have done to see how it
is to use the API:
- fbdev
- bootsplash
- VT console

There is still work left to be done, but it would be nice to get some
feedback about the direction I have taken.

For readers I suggest to first look at the bootsplash client to see the
API in use. The client is very simple so it's an easy read.

Noralf.

Changes since version 2:
- Don't set drm master for in-kernel clients. (Daniel Vetter)
- Add in-kernel client API

Changes since version 1:
- Don't add drm_fb_helper_fb_open() and drm_fb_helper_fb_release() to
  DRM_FB_HELPER_DEFAULT_OPS(). (Fi.CI.STATIC)
  The following uses that macro and sets fb_open/close: udlfb_ops,
  amdgpufb_ops, drm_fb_helper_generic_fbdev_ops, nouveau_fbcon_ops,
  nouveau_fbcon_sw_ops, radeonfb_ops.
  This results in: warning: Initializer entry defined twice
- Support CONFIG_DRM_KMS_HELPER=m (kbuild test robot)
  ERROR: <function> [drivers/gpu/drm/drm_kms_helper.ko] undefined!
- Drop buggy patch: (Chris Wilson)
  drm/prime: Clear drm_gem_object->dma_buf on release
- Defer buffer creation until fb_open.

David Herrmann (1):
  drm: provide management functions for drm_file

Noralf Trønnes (11):
  drm/file: Don't set master on in-kernel clients
  drm: Make ioctls available for in-kernel clients part 1
  drm: Make ioctls available for in-kernel clients part 2
  drm: Add _ioctl suffix to some functions
  drm: Add DRM device iterator
  drm/modes: Add drm_umode_equal()
  drm/framebuffer: Add drm_mode_can_dirtyfb()
  drm: Add API for in-kernel clients
  drm/client: Add fbdev emulation client
  drm/client: Add bootsplash client
  drm/client: Add VT console client

 drivers/gpu/drm/Kconfig                 |    2 +
 drivers/gpu/drm/Makefile                |    3 +-
 drivers/gpu/drm/client/Kconfig          |   30 +
 drivers/gpu/drm/client/Makefile         |    5 +
 drivers/gpu/drm/client/drm_bootsplash.c |  205 ++++
 drivers/gpu/drm/client/drm_client.c     | 1612 +++++++++++++++++++++++++++++++
 drivers/gpu/drm/client/drm_fbdev.c      |  997 +++++++++++++++++++
 drivers/gpu/drm/client/drm_vtcon.c      |  760 +++++++++++++++
 drivers/gpu/drm/drm_connector.c         |   50 +-
 drivers/gpu/drm/drm_crtc.c              |   47 +-
 drivers/gpu/drm/drm_crtc_internal.h     |   80 +-
 drivers/gpu/drm/drm_drv.c               |   66 ++
 drivers/gpu/drm/drm_dumb_buffers.c      |   33 +-
 drivers/gpu/drm/drm_encoder.c           |   10 +-
 drivers/gpu/drm/drm_file.c              |  304 +++---
 drivers/gpu/drm/drm_framebuffer.c       |  149 ++-
 drivers/gpu/drm/drm_internal.h          |    7 +
 drivers/gpu/drm/drm_ioc32.c             |    2 +-
 drivers/gpu/drm/drm_ioctl.c             |   24 +-
 drivers/gpu/drm/drm_mode_config.c       |   81 +-
 drivers/gpu/drm/drm_mode_object.c       |   12 +-
 drivers/gpu/drm/drm_modes.c             |   50 +
 drivers/gpu/drm/drm_plane.c             |   24 +-
 drivers/gpu/drm/drm_prime.c             |   13 +-
 drivers/gpu/drm/drm_probe_helper.c      |    3 +
 drivers/gpu/drm/drm_vblank.c            |   11 +-
 include/drm/drm_client.h                |  192 ++++
 include/drm/drm_device.h                |    1 +
 include/drm/drm_drv.h                   |   34 +
 include/drm/drm_file.h                  |    7 +
 include/drm/drm_framebuffer.h           |    2 +
 include/drm/drm_modes.h                 |    2 +
 32 files changed, 4515 insertions(+), 303 deletions(-)
 create mode 100644 drivers/gpu/drm/client/Kconfig
 create mode 100644 drivers/gpu/drm/client/Makefile
 create mode 100644 drivers/gpu/drm/client/drm_bootsplash.c
 create mode 100644 drivers/gpu/drm/client/drm_client.c
 create mode 100644 drivers/gpu/drm/client/drm_fbdev.c
 create mode 100644 drivers/gpu/drm/client/drm_vtcon.c
 create mode 100644 include/drm/drm_client.h

-- 
2.15.1

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

             reply	other threads:[~2018-02-22 20:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 20:06 Noralf Trønnes [this message]
2018-02-22 20:06 ` [RFC v3 01/12] drm: provide management functions for drm_file Noralf Trønnes
2018-02-22 20:06 ` [RFC v3 02/12] drm/file: Don't set master on in-kernel clients Noralf Trønnes
2018-03-06  8:28   ` Daniel Vetter
2018-02-22 20:06 ` [RFC v3 03/12] drm: Make ioctls available for in-kernel clients part 1 Noralf Trønnes
2018-02-22 20:06 ` [RFC v3 04/12] drm: Make ioctls available for in-kernel clients part 2 Noralf Trønnes
2018-03-06  8:41   ` Daniel Vetter
2018-02-22 20:06 ` [RFC v3 05/12] drm: Add _ioctl suffix to some functions Noralf Trønnes
2018-02-22 20:06 ` [RFC v3 06/12] drm: Add DRM device iterator Noralf Trønnes
2018-02-22 20:06 ` [RFC v3 07/12] drm/modes: Add drm_umode_equal() Noralf Trønnes
2018-03-06  8:42   ` Daniel Vetter
2018-02-22 20:06 ` [RFC v3 08/12] drm/framebuffer: Add drm_mode_can_dirtyfb() Noralf Trønnes
2018-03-06  8:45   ` Daniel Vetter
2018-02-22 20:06 ` [RFC v3 09/12] drm: Add API for in-kernel clients Noralf Trønnes
2018-03-06  8:56   ` Daniel Vetter
2018-03-08 17:12     ` Noralf Trønnes
2018-03-12 16:51       ` Daniel Vetter
2018-03-12 20:21         ` Noralf Trønnes
2018-03-13 15:11           ` Daniel Vetter
2018-02-22 20:06 ` [RFC v3 10/12] drm/client: Add fbdev emulation client Noralf Trønnes
2018-03-06  9:06   ` Daniel Vetter
2018-02-22 20:06 ` [RFC v3 11/12] drm/client: Add bootsplash client Noralf Trønnes
2018-03-06  9:12   ` Daniel Vetter
2018-03-06 15:21     ` Max Staudt
2018-02-22 20:06 ` [RFC v3 12/12] drm/client: Add VT console client Noralf Trønnes
2018-02-22 21:03 ` ✗ Fi.CI.BAT: failure for drm: Add generic fbdev emulation (rev3) Patchwork

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=20180222200653.19453-1-noralf@tronnes.org \
    --to=noralf@tronnes.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.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