include/drm/drm_fb_helper.h
Source file repositories/reference/linux-study-clean/include/drm/drm_fb_helper.h
File Facts
- System
- Linux kernel
- Corpus path
include/drm/drm_fb_helper.h- Extension
.h- Size
- 9490 bytes
- Lines
- 285
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/fb.hdrm/drm_client.h
Detected Declarations
struct drm_clip_rectstruct drm_fb_helperstruct drm_fb_helper_surface_sizestruct drm_fb_helper_funcsstruct drm_fb_helperfunction drm_fb_helper_from_clientfunction drm_fb_helper_gem_is_fb
Annotated Snippet
struct drm_fb_helper_surface_size {
u32 fb_width;
u32 fb_height;
u32 surface_width;
u32 surface_height;
u32 surface_bpp;
u32 surface_depth;
};
/**
* struct drm_fb_helper_funcs - driver callbacks for the fbdev emulation library
*
* Driver callbacks used by the fbdev emulation helper library.
*/
struct drm_fb_helper_funcs {
/**
* @fb_dirty:
*
* Driver callback to update the framebuffer memory. If set, fbdev
* emulation will invoke this callback in regular intervals after
* the framebuffer has been written.
*
* This callback is optional.
*
* Returns:
* 0 on success, or an error code otherwise.
*/
int (*fb_dirty)(struct drm_fb_helper *helper, struct drm_clip_rect *clip);
/**
* @fb_restore:
*
* Driver callback to restore internal fbdev state. If set, fbdev
* emulation will invoke this callback after restoring the display
* mode.
*
* Only for i915. Do not use in new code.
*
* TODO: Fix i915 to not require this callback.
*/
void (*fb_restore)(struct drm_fb_helper *helper);
/**
* @fb_set_suspend:
*
* Driver callback to suspend or resume, if set, fbdev emulation will
* invoke this callback during suspend and resume. Driver should call
* fb_set_suspend() from their implementation. If not set, fbdev
* emulation will invoke fb_set_suspend() directly.
*
* Only for i915. Do not use in new code.
*
* TODO: Fix i915 to not require this callback.
*/
void (*fb_set_suspend)(struct drm_fb_helper *helper, bool suspend);
};
/**
* struct drm_fb_helper - main structure to emulate fbdev on top of KMS
* @fb: Scanout framebuffer object
* @dev: DRM device
* @funcs: driver callbacks for fb helper
* @info: emulated fbdev device info struct
* @pseudo_palette: fake palette of 16 colors
* @damage_clip: clip rectangle used with deferred_io to accumulate damage to
* the screen buffer
* @damage_lock: spinlock protecting @damage_clip
* @damage_work: worker used to flush the framebuffer
* @resume_work: worker used during resume if the console lock is already taken
*
* 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.
*/
struct drm_fb_helper {
/**
* @client:
*
* DRM client used by the generic fbdev emulation.
*/
struct drm_client_dev client;
/**
* @buffer:
*
* Framebuffer used by the generic fbdev emulation.
*/
struct drm_client_buffer *buffer;
Annotation
- Immediate include surface: `linux/fb.h`, `drm/drm_client.h`.
- Detected declarations: `struct drm_clip_rect`, `struct drm_fb_helper`, `struct drm_fb_helper_surface_size`, `struct drm_fb_helper_funcs`, `struct drm_fb_helper`, `function drm_fb_helper_from_client`, `function drm_fb_helper_gem_is_fb`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.