|
XenevaOS
|
#include <drm_mode.h>
Public Attributes | |
| __u32 | fb_id |
| __u32 | width |
| __u32 | height |
| __u32 | pixel_format |
| __u32 | flags |
| __u32 | handles [4] |
| __u32 | pitches [4] |
| __u32 | offsets [4] |
| __u64 | modifier [4] |
struct drm_mode_fb_cmd2 - Frame-buffer metadata.
This struct holds frame-buffer metadata. There are two ways to use it:
In case of planar formats, this struct allows up to 4 buffer objects with offsets and pitches per plane. The pitch and offset order are dictated by the format FourCC as defined by drm_fourcc.h, e.g. NV12 is described as:
YUV 4:2:0 image with a plane of 8-bit Y samples followed by an interleaved U/V plane containing 8-bit 2x2 subsampled colour difference samples.
So it would consist of a Y plane at offsets[0] and a UV plane at offsets[1].
To accommodate tiled, compressed, etc formats, a modifier can be specified. For more information see the "Format Modifiers" section. Note that even though it looks like we have a modifier per-plane, we in fact do not. The modifier for each plane must be identical. Thus all combinations of different data layouts for multi-plane formats must be enumerated as separate modifiers.
All of the entries in @handles, @pitches, @offsets and @modifier must be zero when unused. Warning, for @offsets and @modifier zero can't be used to figure out whether the entry is used or not since it's a valid value (a zero offset is common, and a zero modifier is &DRM_FORMAT_MOD_LINEAR).
| __u32 drm_mode_fb_cmd2::fb_id |
@fb_id: Object ID of the frame-buffer.
| __u32 drm_mode_fb_cmd2::flags |
@flags: Frame-buffer flags (see &DRM_MODE_FB_INTERLACED and &DRM_MODE_FB_MODIFIERS).
| __u32 drm_mode_fb_cmd2::handles |
@handles: GEM buffer handle, one per plane. Set to 0 if the plane is unused. The same handle can be used for multiple planes.
| __u32 drm_mode_fb_cmd2::height |
@height: Height of the frame-buffer.
| __u64 drm_mode_fb_cmd2::modifier |
@modifier: Format modifier, one per plane. See DRM_FORMAT_MOD_* constants in drm_fourcc.h. All planes must use the same modifier. Ignored unless &DRM_MODE_FB_MODIFIERS is set in @flags.
| __u32 drm_mode_fb_cmd2::offsets |
@offsets: Offset into the buffer in bytes, one per plane.
| __u32 drm_mode_fb_cmd2::pitches |
@pitches: Pitch (aka. stride) in bytes, one per plane.
| __u32 drm_mode_fb_cmd2::pixel_format |
@pixel_format: FourCC format code, see DRM_FORMAT_* constants in drm_fourcc.h.
| __u32 drm_mode_fb_cmd2::width |
@width: Width of the frame-buffer.