aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2018-11-27 04:19:21 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2018-11-27 09:23:18 -0500
commit39dea70d8a479a1c4578129466da2bc4601e47be (patch)
treeb193a17ef6b5c50144429dbcdb57dc0a24a5a2d6
parent02a3ce3c2a67f3c3693029bc650f0c0571d9a3a2 (diff)
drm: Improve dumb callback docs
Noticed while reviewing a patch from Eric. Also add a todo for the dumb_map_offset callbacks (it should be simple to do, but piles of work). Plus fix up vbox, because vbox. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Cc: Sean Paul <sean@poorly.run> Cc: David Airlie <airlied@linux.ie> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Nicholas Mc Guire <der.herr@hofr.at> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Fabio Rafael da Rosa <fdr@pid42.net> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20181127091921.8325-1-daniel.vetter@ffwll.ch
-rw-r--r--Documentation/gpu/todo.rst11
-rw-r--r--drivers/staging/vboxvideo/vbox_drv.c1
-rw-r--r--include/drm/drm_drv.h9
3 files changed, 18 insertions, 3 deletions
diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
index 9815b3b82bd1..ab347dec5079 100644
--- a/Documentation/gpu/todo.rst
+++ b/Documentation/gpu/todo.rst
@@ -28,6 +28,17 @@ them, but also all the virtual ones used by KVM, so everyone qualifies).
28 28
29Contact: Daniel Vetter, Thierry Reding, respective driver maintainers 29Contact: Daniel Vetter, Thierry Reding, respective driver maintainers
30 30
31
32Remove custom dumb_map_offset implementations
33---------------------------------------------
34
35All GEM based drivers should be using drm_gem_create_mmap_offset() instead.
36Audit each individual driver, make sure it'll work with the generic
37implementation (there's lots of outdated locking leftovers in various
38implementations), and then remove it.
39
40Contact: Daniel Vetter, respective driver maintainers
41
31Convert existing KMS drivers to atomic modesetting 42Convert existing KMS drivers to atomic modesetting
32-------------------------------------------------- 43--------------------------------------------------
33 44
diff --git a/drivers/staging/vboxvideo/vbox_drv.c b/drivers/staging/vboxvideo/vbox_drv.c
index 257030460fb6..d3e23dd70c1b 100644
--- a/drivers/staging/vboxvideo/vbox_drv.c
+++ b/drivers/staging/vboxvideo/vbox_drv.c
@@ -279,7 +279,6 @@ static struct drm_driver driver = {
279 .gem_free_object_unlocked = vbox_gem_free_object, 279 .gem_free_object_unlocked = vbox_gem_free_object,
280 .dumb_create = vbox_dumb_create, 280 .dumb_create = vbox_dumb_create,
281 .dumb_map_offset = vbox_dumb_mmap_offset, 281 .dumb_map_offset = vbox_dumb_mmap_offset,
282 .dumb_destroy = drm_gem_dumb_destroy,
283 .prime_handle_to_fd = drm_gem_prime_handle_to_fd, 282 .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
284 .prime_fd_to_handle = drm_gem_prime_fd_to_handle, 283 .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
285 .gem_prime_export = drm_gem_prime_export, 284 .gem_prime_export = drm_gem_prime_export,
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index 252dd216cc60..35af23f5fa0d 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -527,8 +527,10 @@ struct drm_driver {
527 * @dumb_map_offset: 527 * @dumb_map_offset:
528 * 528 *
529 * Allocate an offset in the drm device node's address space to be able to 529 * Allocate an offset in the drm device node's address space to be able to
530 * memory map a dumb buffer. GEM-based drivers must use 530 * memory map a dumb buffer.
531 * drm_gem_create_mmap_offset() to implement this. 531 *
532 * The default implementation is drm_gem_create_mmap_offset(). GEM based
533 * drivers must not overwrite this.
532 * 534 *
533 * Called by the user via ioctl. 535 * Called by the user via ioctl.
534 * 536 *
@@ -548,6 +550,9 @@ struct drm_driver {
548 * 550 *
549 * Called by the user via ioctl. 551 * Called by the user via ioctl.
550 * 552 *
553 * The default implementation is drm_gem_dumb_destroy(). GEM based drivers
554 * must not overwrite this.
555 *
551 * Returns: 556 * Returns:
552 * 557 *
553 * Zero on success, negative errno on failure. 558 * Zero on success, negative errno on failure.