Skip to content

Commit

Permalink
drm: Begin an API for in-kernel clients
Browse files Browse the repository at this point in the history
This the beginning of an API for in-kernel clients.
First out is a way to get a framebuffer backed by a dumb buffer.

Only GEM drivers are supported.
The original idea of using an exported dma-buf was dropped because it
also creates an anonomous file descriptor which doesn't work when the
buffer is created from a kernel thread. The easy way out is to use
drm_driver.gem_prime_vmap to get the virtual address, which requires a
GEM object. This excludes the vmwgfx driver which is the only non-GEM
driver apart from the legacy ones. A solution for vmwgfx will have to be
worked out later if it wants to support the client API which it probably
will when we have a bootsplash client.

Suggested-by: Daniel Vetter <[email protected]>
Signed-off-by: Noralf Trønnes <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
notro committed Jul 10, 2018
1 parent 5ba57ba commit c76f0f7
Show file tree
Hide file tree
Showing 9 changed files with 572 additions and 1 deletion.
12 changes: 12 additions & 0 deletions Documentation/gpu/drm-client.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
=================
Kernel clients
=================

.. kernel-doc:: drivers/gpu/drm/drm_client.c
:doc: overview

.. kernel-doc:: include/drm/drm_client.h
:internal:

.. kernel-doc:: drivers/gpu/drm/drm_client.c
:export:
1 change: 1 addition & 0 deletions Documentation/gpu/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Linux GPU Driver Developer's Guide
drm-kms
drm-kms-helpers
drm-uapi
drm-client
drivers
vga-switcheroo
vgaarbiter
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ drm-y := drm_auth.o drm_bufs.o drm_cache.o \
drm_encoder.o drm_mode_object.o drm_property.o \
drm_plane.o drm_color_mgmt.o drm_print.o \
drm_dumb_buffers.o drm_mode_config.o drm_vblank.o \
drm_syncobj.o drm_lease.o drm_writeback.o
drm_syncobj.o drm_lease.o drm_writeback.o drm_client.o

drm-$(CONFIG_DRM_LIB_RANDOM) += lib/drm_random.o
drm-$(CONFIG_DRM_VM) += drm_vm.o
Expand Down
Loading

0 comments on commit c76f0f7

Please sign in to comment.