struct drm_fb_helper — main structure to emulate fbdev on top of KMS
struct drm_fb_helper { struct drm_framebuffer * fb; struct drm_device * dev; int crtc_count; struct drm_fb_helper_crtc * crtc_info; int connector_count; int connector_info_alloc_count; struct drm_fb_helper_connector ** connector_info; const struct drm_fb_helper_funcs * funcs; struct fb_info * fbdev; u32 pseudo_palette[17]; struct drm_clip_rect dirty_clip; spinlock_t dirty_lock; struct work_struct dirty_work; struct list_head kernel_fb_list; bool delayed_hotplug; bool atomic; };
Scanout framebuffer object
DRM device
number of possible CRTCs
per-CRTC helper state (mode, x/y offset, etc)
number of connected connectors
size of connector_info
array of per-connector information
driver callbacks for fb helper
emulated fbdev device info struct
fake palette of 16 colors
clip rectangle used with deferred_io to accumulate damage to the screen buffer
spinlock protecting dirty_clip
worker used to flush the framebuffer
Entry on the global kernel_fb_helper_list, used for kgdb entry/exit.
A hotplug was received while fbdev wasn't in control of the DRM device, i.e. another KMS master was active. The output configuration needs to be reprobe when fbdev is in control again.
Use atomic updates for restore_fbdev_mode
, etc. This defaults to
true if driver has DRIVER_ATOMIC feature flag, but drivers can
override it to true after drm_fb_helper_init
if they support atomic
modeset but do not yet advertise DRIVER_ATOMIC (note that fb-helper
does not require ASYNC commits).
This is the main structure used by the fbdev helpers. Drivers supporting fbdev emulation should embedded this into their overall driver structure. Drivers must also fill out a struct drm_fb_helper_funcs with a few operations.