Commit 39dea70d authored by Daniel Vetter's avatar Daniel Vetter

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: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20181127091921.8325-1-daniel.vetter@ffwll.ch
parent 02a3ce3c
...@@ -28,6 +28,17 @@ them, but also all the virtual ones used by KVM, so everyone qualifies). ...@@ -28,6 +28,17 @@ them, but also all the virtual ones used by KVM, so everyone qualifies).
Contact: Daniel Vetter, Thierry Reding, respective driver maintainers Contact: Daniel Vetter, Thierry Reding, respective driver maintainers
Remove custom dumb_map_offset implementations
---------------------------------------------
All GEM based drivers should be using drm_gem_create_mmap_offset() instead.
Audit each individual driver, make sure it'll work with the generic
implementation (there's lots of outdated locking leftovers in various
implementations), and then remove it.
Contact: Daniel Vetter, respective driver maintainers
Convert existing KMS drivers to atomic modesetting Convert existing KMS drivers to atomic modesetting
-------------------------------------------------- --------------------------------------------------
......
...@@ -279,7 +279,6 @@ static struct drm_driver driver = { ...@@ -279,7 +279,6 @@ static struct drm_driver driver = {
.gem_free_object_unlocked = vbox_gem_free_object, .gem_free_object_unlocked = vbox_gem_free_object,
.dumb_create = vbox_dumb_create, .dumb_create = vbox_dumb_create,
.dumb_map_offset = vbox_dumb_mmap_offset, .dumb_map_offset = vbox_dumb_mmap_offset,
.dumb_destroy = drm_gem_dumb_destroy,
.prime_handle_to_fd = drm_gem_prime_handle_to_fd, .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
.prime_fd_to_handle = drm_gem_prime_fd_to_handle, .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
.gem_prime_export = drm_gem_prime_export, .gem_prime_export = drm_gem_prime_export,
......
...@@ -527,8 +527,10 @@ struct drm_driver { ...@@ -527,8 +527,10 @@ struct drm_driver {
* @dumb_map_offset: * @dumb_map_offset:
* *
* Allocate an offset in the drm device node's address space to be able to * Allocate an offset in the drm device node's address space to be able to
* memory map a dumb buffer. GEM-based drivers must use * memory map a dumb buffer.
* drm_gem_create_mmap_offset() to implement this. *
* The default implementation is drm_gem_create_mmap_offset(). GEM based
* drivers must not overwrite this.
* *
* Called by the user via ioctl. * Called by the user via ioctl.
* *
...@@ -548,6 +550,9 @@ struct drm_driver { ...@@ -548,6 +550,9 @@ struct drm_driver {
* *
* Called by the user via ioctl. * Called by the user via ioctl.
* *
* The default implementation is drm_gem_dumb_destroy(). GEM based drivers
* must not overwrite this.
*
* Returns: * Returns:
* *
* Zero on success, negative errno on failure. * Zero on success, negative errno on failure.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment