summaryrefslogtreecommitdiff
path: root/include/uapi/drm/drm_mode.h
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-08-21 13:15:56 +0000
committerSimon Ser <contact@emersion.fr>2023-10-25 17:32:56 +0200
commitb8644c4ae2b646b89b40892bf93cbb6f7451c868 (patch)
tree980ee94e4049e2c79df5f29e522c5aa36fec3979 /include/uapi/drm/drm_mode.h
parentd4b384228562848e4b76b608a5876c92160e993c (diff)
downloadlinux-next-b8644c4ae2b646b89b40892bf93cbb6f7451c868.tar.gz
linux-next-b8644c4ae2b646b89b40892bf93cbb6f7451c868.zip
drm/doc: document DRM_IOCTL_MODE_CREATE_DUMB
The main motivation is to repeat that dumb buffers should not be abused for anything else than basic software rendering with KMS. User-space devs are more likely to look at the IOCTL docs than to actively search for the driver-oriented "Dumb Buffer Objects" section. v2: reference DRM_CAP_DUMB_BUFFER, DRM_CAP_DUMB_PREFERRED_DEPTH and DRM_CAP_DUMB_PREFER_SHADOW (Pekka) Signed-off-by: Simon Ser <contact@emersion.fr> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230821131548.269204-1-contact@emersion.fr
Diffstat (limited to 'include/uapi/drm/drm_mode.h')
-rw-r--r--include/uapi/drm/drm_mode.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index ea1b639bcb28..128d09138ceb 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -1032,13 +1032,25 @@ struct drm_mode_crtc_page_flip_target {
__u64 user_data;
};
-/* create a dumb scanout buffer */
+/**
+ * struct drm_mode_create_dumb - Create a KMS dumb buffer for scanout.
+ * @height: buffer height in pixels
+ * @width: buffer width in pixels
+ * @bpp: bits per pixel
+ * @flags: must be zero
+ * @handle: buffer object handle
+ * @pitch: number of bytes between two consecutive lines
+ * @size: size of the whole buffer in bytes
+ *
+ * User-space fills @height, @width, @bpp and @flags. If the IOCTL succeeds,
+ * the kernel fills @handle, @pitch and @size.
+ */
struct drm_mode_create_dumb {
__u32 height;
__u32 width;
__u32 bpp;
__u32 flags;
- /* handle, pitch, size will be returned */
+
__u32 handle;
__u32 pitch;
__u64 size;