All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Noralf Trønnes" <noralf@tronnes.org>
To: dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org, laurent.pinchart@ideasonboard.com
Subject: [PATCH v2 00/12] drm: Add generic fbdev emulation
Date: Mon, 18 Jun 2018 16:17:27 +0200	[thread overview]
Message-ID: <20180618141739.48151-1-noralf@tronnes.org> (raw)

This patchset adds generic fbdev emulation for drivers that supports GEM
based dumb buffers which support .gem_prime_vmap and gem_prime_mmap. An
API is begun to support in-kernel clients in general.

Notable changes since version 1:

- Rework client unregister code. I've used reference counting to manage
  the fact that both the client itself and the driver through
  drm_dev_unregister() can release the client. The client is now released
  using drm_client_put() instead of drm_client_free().

- fbdev: Use a shadow buffer for framebuffers that have a dirty
  callback. This makes the fbdev client truly generic and useable for all
  drivers. There's a blitting penalty, but this is generic emulation after
  all. The reason for needing a shadow buffer is that deferred I/O only
  works with kmalloc/vmalloc buffers and not with shmem buffers
  (page->lru/mapping).

- Let tinydrm use the full fbdev client

Noralf.

Changes since version 1:
- Make it possible to embed struct drm_client_dev and drop the private
  pointer
- Use kref reference counting to control client release since both the
  client and the driver can release.
- Add comment about using dma-buf as a possibility with some rework
- Move buffer NULL check to drm_client_framebuffer_delete()
- Move client name to struct drm_client_dev
- Move up drm_dev_get/put calls to make them more visible
- Move drm_client_dev.list definition to later patch that makes use of it

- Embed drm_client at the beginning of drm_fb_helper to avoid a fragile
  transitional kfree hack in drm_client_release()
- Set owner in drm_fbdev_fb_ops
- Add kerneldoc to drm_fb_helper_generic_probe()

- Remove unused functions
- Change name drm_client_funcs.lastclose -> .restore
- Change name drm_client_funcs.remove -> .unregister
- Rework unregister code

- tinydrm: Use drm_fbdev_generic_setup() and remove
  drm_fb_cma_fbdev_init_with_funcs()

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
  drm: Begin an API for in-kernel clients
  drm/fb-helper: Add generic fbdev emulation .fb_probe function
  drm/pl111: Set .gem_prime_vmap and .gem_prime_mmap
  drm/cma-helper: Use the generic fbdev emulation
  drm/client: Add client callbacks
  drm/debugfs: Add internal client debugfs file
  drm/fb-helper: Finish the generic fbdev emulation
  drm/tinydrm: Use drm_fbdev_generic_setup()
  drm/cma-helper: Remove drm_fb_cma_fbdev_init_with_funcs()

 Documentation/gpu/drm-client.rst            |  12 +
 Documentation/gpu/index.rst                 |   1 +
 drivers/gpu/drm/Makefile                    |   2 +-
 drivers/gpu/drm/drm_client.c                | 435 ++++++++++++++++++++++++++++
 drivers/gpu/drm/drm_crtc_internal.h         |  19 +-
 drivers/gpu/drm/drm_debugfs.c               |   7 +
 drivers/gpu/drm/drm_drv.c                   |   8 +
 drivers/gpu/drm/drm_dumb_buffers.c          |  33 ++-
 drivers/gpu/drm/drm_fb_cma_helper.c         | 380 +++---------------------
 drivers/gpu/drm/drm_fb_helper.c             | 330 ++++++++++++++++++++-
 drivers/gpu/drm/drm_file.c                  | 304 ++++++++++---------
 drivers/gpu/drm/drm_framebuffer.c           |  42 ++-
 drivers/gpu/drm/drm_internal.h              |   2 +
 drivers/gpu/drm/drm_ioctl.c                 |   4 +-
 drivers/gpu/drm/drm_probe_helper.c          |   3 +
 drivers/gpu/drm/pl111/pl111_drv.c           |   2 +
 drivers/gpu/drm/tinydrm/core/tinydrm-core.c |   3 +-
 drivers/gpu/drm/tinydrm/ili9225.c           |   1 -
 drivers/gpu/drm/tinydrm/mi0283qt.c          |   1 -
 drivers/gpu/drm/tinydrm/st7586.c            |   1 -
 drivers/gpu/drm/tinydrm/st7735r.c           |   1 -
 include/drm/drm_client.h                    | 156 ++++++++++
 include/drm/drm_device.h                    |  21 ++
 include/drm/drm_fb_cma_helper.h             |   6 -
 include/drm/drm_fb_helper.h                 |  38 +++
 25 files changed, 1298 insertions(+), 514 deletions(-)
 create mode 100644 Documentation/gpu/drm-client.rst
 create mode 100644 drivers/gpu/drm/drm_client.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-06-18 14:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18 14:17 Noralf Trønnes [this message]
2018-06-18 14:17 ` [PATCH v2 01/12] drm: provide management functions for drm_file Noralf Trønnes
2018-06-18 14:17 ` [PATCH v2 02/12] drm/file: Don't set master on in-kernel clients Noralf Trønnes
2018-06-18 14:17 ` [PATCH v2 03/12] drm: Make ioctls available for " Noralf Trønnes
2018-06-18 14:17 ` [PATCH v2 04/12] drm: Begin an API " Noralf Trønnes
2018-06-18 14:17 ` [PATCH v2 05/12] drm/fb-helper: Add generic fbdev emulation .fb_probe function Noralf Trønnes
2018-06-18 14:17 ` [PATCH v2 06/12] drm/pl111: Set .gem_prime_vmap and .gem_prime_mmap Noralf Trønnes
2018-06-18 14:17 ` [PATCH v2 07/12] drm/cma-helper: Use the generic fbdev emulation Noralf Trønnes
2018-06-18 14:17 ` [PATCH v2 08/12] drm/client: Add client callbacks Noralf Trønnes
2018-06-18 14:17 ` [PATCH v2 09/12] drm/debugfs: Add internal client debugfs file Noralf Trønnes
2018-06-20  9:23   ` [Intel-gfx] " Daniel Vetter
2018-06-18 14:17 ` [PATCH v2 10/12] drm/fb-helper: Finish the generic fbdev emulation Noralf Trønnes
2018-06-18 14:17 ` [PATCH v2 11/12] drm/tinydrm: Use drm_fbdev_generic_setup() Noralf Trønnes
2018-06-18 14:17 ` [PATCH v2 12/12] drm/cma-helper: Remove drm_fb_cma_fbdev_init_with_funcs() Noralf Trønnes
2018-06-18 15:05 ` ✗ Fi.CI.CHECKPATCH: warning for drm: Add generic fbdev emulation Patchwork
2018-06-18 15:09 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-06-18 15:20 ` ✓ Fi.CI.BAT: success " Patchwork
2018-06-18 20:02 ` ✓ Fi.CI.IGT: " Patchwork
2018-06-20  9:34 ` [PATCH v2 00/12] " Daniel Vetter
2018-06-20 13:52   ` [Intel-gfx] " Noralf Trønnes
2018-06-20 15:28     ` Noralf Trønnes
2018-06-21  7:14       ` Daniel Vetter
2018-06-21 17:19         ` Noralf Trønnes
2018-06-26 13:41           ` [Intel-gfx] " Noralf Trønnes
2018-06-26 13:42             ` Daniel Vetter
2018-06-25 14:28 ` Noralf Trønnes

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=20180618141739.48151-1-noralf@tronnes.org \
    --to=noralf@tronnes.org \
    --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 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.