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

#include <drm_framebuffer.h>

Collaboration diagram for drm_framebuffer:
Collaboration graph
[legend]

Public Attributes

struct drm_device * dev
 
struct list_head head
 
struct drm_mode_object base
 
char comm [TASK_COMM_LEN]
 
const struct drm_format_info * format
 
const struct drm_framebuffer_funcs * funcs
 
unsigned int pitches [DRM_FORMAT_MAX_PLANES]
 
unsigned int offsets [DRM_FORMAT_MAX_PLANES]
 
uint64_t modifier
 
unsigned int width
 
unsigned int height
 
int flags
 
unsigned int internal_flags
 
struct list_head filp_head
 
struct drm_gem_object * obj [DRM_FORMAT_MAX_PLANES]
 

Detailed Description

struct drm_framebuffer - frame buffer object

Note that the fb is refcounted for the benefit of driver internals, for example some hw, disabling a CRTC/plane is asynchronous, and scanout does not actually complete until the next vblank. So some cleanup (like releasing the reference(s) on the backing GEM bo(s)) should be deferred. In cases like this, the driver would like to hold a ref to the fb even though it has already been removed from userspace perspective. See drm_framebuffer_get() and drm_framebuffer_put().

The refcount is stored inside the mode object @base.

Member Data Documentation

◆ base

struct drm_mode_object drm_framebuffer::base

@base: base modeset object structure, contains the reference count.

◆ comm

char drm_framebuffer::comm[TASK_COMM_LEN]

@comm: Name of the process allocating the fb, used for fb dumping.

◆ dev

struct drm_device* drm_framebuffer::dev

@dev: DRM device this framebuffer belongs to

◆ filp_head

struct list_head drm_framebuffer::filp_head

@filp_head: Placed on &drm_file.fbs, protected by &drm_file.fbs_lock.

◆ flags

int drm_framebuffer::flags

@flags: Framebuffer flags like DRM_MODE_FB_INTERLACED or DRM_MODE_FB_MODIFIERS.

◆ format

const struct drm_format_info* drm_framebuffer::format

@format: framebuffer format information

◆ funcs

const struct drm_framebuffer_funcs* drm_framebuffer::funcs

@funcs: framebuffer vfunc table

◆ head

struct list_head drm_framebuffer::head

@head: Place on the &drm_mode_config.fb_list, access protected by &drm_mode_config.fb_lock.

◆ height

unsigned int drm_framebuffer::height

@height: Logical height of the visible area of the framebuffer, in pixels.

◆ internal_flags

unsigned int drm_framebuffer::internal_flags

@internal_flags: Framebuffer flags like DRM_FRAMEBUFFER_HAS_HANDLE_REF.

◆ modifier

uint64_t drm_framebuffer::modifier

@modifier: Data layout modifier. This is used to describe tiling, or also special layouts (like compression) of auxiliary buffers. For userspace created object this is copied from drm_mode_fb_cmd2.

◆ obj

struct drm_gem_object* drm_framebuffer::obj[DRM_FORMAT_MAX_PLANES]

@obj: GEM objects backing the framebuffer, one per plane (optional).

This is used by the GEM framebuffer helpers, see e.g. drm_gem_fb_create().

◆ offsets

unsigned int drm_framebuffer::offsets[DRM_FORMAT_MAX_PLANES]

@offsets: Offset from buffer start to the actual pixel data in bytes, per buffer. For userspace created object this is copied from drm_mode_fb_cmd2.

Note that this is a linear offset and does not take into account tiling or buffer layout per @modifier. It is meant to be used when the actual pixel data for this framebuffer plane starts at an offset, e.g. when multiple planes are allocated within the same backing storage buffer object. For tiled layouts this generally means its @offsets must at least be tile-size aligned, but hardware often has stricter requirements.

This should not be used to specifiy x/y pixel offsets into the buffer data (even for linear buffers). Specifying an x/y pixel offset is instead done through the source rectangle in &struct drm_plane_state.

◆ pitches

unsigned int drm_framebuffer::pitches[DRM_FORMAT_MAX_PLANES]

@pitches: Line stride per buffer. For userspace created object this is copied from drm_mode_fb_cmd2.

◆ width

unsigned int drm_framebuffer::width

@width: Logical width of the visible area of the framebuffer, in pixels.


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