XenevaOS
Loading...
Searching...
No Matches
Public Attributes | List of all members
drm_mode_create_dumb Struct Reference

#include <drm_mode.h>

Public Attributes

__u32 height
 
__u32 width
 
__u32 bpp
 
__u32 flags
 
__u32 handle
 
__u32 pitch
 
__u64 size
 

Detailed Description

struct drm_mode_create_dumb - Create a KMS dumb buffer for scanout. @height: buffer height in pixels @width: buffer width in pixels @bpp: color mode @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.

The value of @bpp is a color-mode number describing a specific format or a variant thereof. The value often corresponds to the number of bits per pixel for most modes, although there are exceptions. Each color mode maps to a DRM format plus a number of modes with similar pixel layout. Framebuffer layout is always linear.

Support for all modes and formats is optional. Even if dumb-buffer creation with a certain color mode succeeds, it is not guaranteed that the DRM driver supports any of the related formats. Most drivers support a color mode of 32 with a format of DRM_FORMAT_XRGB8888 on their primary plane.

+---------—+---------------------—+---------------------—+ | Color mode | Framebuffer format | Compatible formats | +============+========================+========================+ | 32 | * DRM_FORMAT_XRGB8888 | * DRM_FORMAT_BGRX8888 | | | | * DRM_FORMAT_RGBX8888 | | | | * DRM_FORMAT_XBGR8888 | +---------—+---------------------—+---------------------—+ | 24 | * DRM_FORMAT_RGB888 | * DRM_FORMAT_BGR888 | +---------—+---------------------—+---------------------—+ | 16 | * DRM_FORMAT_RGB565 | * DRM_FORMAT_BGR565 | +---------—+---------------------—+---------------------—+ | 15 | * DRM_FORMAT_XRGB1555 | * DRM_FORMAT_BGRX1555 | | | | * DRM_FORMAT_RGBX1555 | | | | * DRM_FORMAT_XBGR1555 | +---------—+---------------------—+---------------------—+ | 8 | * DRM_FORMAT_C8 | * DRM_FORMAT_D8 | | | | * DRM_FORMAT_R8 | +---------—+---------------------—+---------------------—+ | 4 | * DRM_FORMAT_C4 | * DRM_FORMAT_D4 | | | | * DRM_FORMAT_R4 | +---------—+---------------------—+---------------------—+ | 2 | * DRM_FORMAT_C2 | * DRM_FORMAT_D2 | | | | * DRM_FORMAT_R2 | +---------—+---------------------—+---------------------—+ | 1 | * DRM_FORMAT_C1 | * DRM_FORMAT_D1 | | | | * DRM_FORMAT_R1 | +---------—+---------------------—+---------------------—+

Color modes of 10, 12, 15, 30 and 64 are only supported for use by legacy user space. Please don't use them in new code. Other modes are not support.

Do not attempt to allocate anything but linear framebuffer memory with single-plane RGB data. Allocation of other framebuffer layouts requires dedicated ioctls in the respective DRM driver.

Member Data Documentation

◆ bpp

__u32 drm_mode_create_dumb::bpp

◆ flags

__u32 drm_mode_create_dumb::flags

◆ handle

__u32 drm_mode_create_dumb::handle

◆ height

__u32 drm_mode_create_dumb::height

◆ pitch

__u32 drm_mode_create_dumb::pitch

◆ size

__u64 drm_mode_create_dumb::size

◆ width

__u32 drm_mode_create_dumb::width

The documentation for this struct was generated from the following files: