include/drm/drm_gem_atomic_helper.h
Source file repositories/reference/linux-study-clean/include/drm/drm_gem_atomic_helper.h
File Facts
- System
- Linux kernel
- Corpus path
include/drm/drm_gem_atomic_helper.h- Extension
.h- Size
- 5655 bytes
- Lines
- 155
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/iosys-map.hdrm/drm_format_helper.hdrm/drm_fourcc.hdrm/drm_plane.h
Detected Declarations
struct drm_simple_display_pipestruct drm_shadow_plane_statefunction to_drm_shadow_plane_state
Annotated Snippet
struct drm_shadow_plane_state {
/** @base: plane state */
struct drm_plane_state base;
/**
* @fmtcnv_state: Format-conversion state
*
* Per-plane state for format conversion.
* Flags for copying shadow buffers into backend storage. Also holds
* temporary storage for format conversion.
*/
struct drm_format_conv_state fmtcnv_state;
/* Transitional state - do not export or duplicate */
/**
* @map: Mappings of the plane's framebuffer BOs in to kernel address space
*
* The memory mappings stored in map should be established in the plane's
* prepare_fb callback and removed in the cleanup_fb callback.
*/
struct iosys_map map[DRM_FORMAT_MAX_PLANES];
/**
* @data: Address of each framebuffer BO's data
*
* The address of the data stored in each mapping. This is different
* for framebuffers with non-zero offset fields.
*/
struct iosys_map data[DRM_FORMAT_MAX_PLANES];
};
/**
* to_drm_shadow_plane_state - upcasts from struct drm_plane_state
* @state: the plane state
*/
static inline struct drm_shadow_plane_state *
to_drm_shadow_plane_state(struct drm_plane_state *state)
{
return container_of(state, struct drm_shadow_plane_state, base);
}
void __drm_gem_duplicate_shadow_plane_state(struct drm_plane *plane,
struct drm_shadow_plane_state *new_shadow_plane_state);
void __drm_gem_destroy_shadow_plane_state(struct drm_shadow_plane_state *shadow_plane_state);
void __drm_gem_reset_shadow_plane(struct drm_plane *plane,
struct drm_shadow_plane_state *shadow_plane_state);
void drm_gem_reset_shadow_plane(struct drm_plane *plane);
struct drm_plane_state *drm_gem_duplicate_shadow_plane_state(struct drm_plane *plane);
void drm_gem_destroy_shadow_plane_state(struct drm_plane *plane,
struct drm_plane_state *plane_state);
/**
* DRM_GEM_SHADOW_PLANE_FUNCS -
* Initializes struct drm_plane_funcs for shadow-buffered planes
*
* Drivers may use GEM BOs as shadow buffers over the framebuffer memory. This
* macro initializes struct drm_plane_funcs to use the rsp helper functions.
*/
#define DRM_GEM_SHADOW_PLANE_FUNCS \
.reset = drm_gem_reset_shadow_plane, \
.atomic_duplicate_state = drm_gem_duplicate_shadow_plane_state, \
.atomic_destroy_state = drm_gem_destroy_shadow_plane_state
int drm_gem_begin_shadow_fb_access(struct drm_plane *plane, struct drm_plane_state *plane_state);
void drm_gem_end_shadow_fb_access(struct drm_plane *plane, struct drm_plane_state *plane_state);
/**
* DRM_GEM_SHADOW_PLANE_HELPER_FUNCS -
* Initializes struct drm_plane_helper_funcs for shadow-buffered planes
*
* Drivers may use GEM BOs as shadow buffers over the framebuffer memory. This
* macro initializes struct drm_plane_helper_funcs to use the rsp helper
* functions.
*/
#define DRM_GEM_SHADOW_PLANE_HELPER_FUNCS \
.begin_fb_access = drm_gem_begin_shadow_fb_access, \
.end_fb_access = drm_gem_end_shadow_fb_access
int drm_gem_simple_kms_begin_shadow_fb_access(struct drm_simple_display_pipe *pipe,
struct drm_plane_state *plane_state);
void drm_gem_simple_kms_end_shadow_fb_access(struct drm_simple_display_pipe *pipe,
struct drm_plane_state *plane_state);
void drm_gem_simple_kms_reset_shadow_plane(struct drm_simple_display_pipe *pipe);
struct drm_plane_state *
drm_gem_simple_kms_duplicate_shadow_plane_state(struct drm_simple_display_pipe *pipe);
void drm_gem_simple_kms_destroy_shadow_plane_state(struct drm_simple_display_pipe *pipe,
struct drm_plane_state *plane_state);
Annotation
- Immediate include surface: `linux/iosys-map.h`, `drm/drm_format_helper.h`, `drm/drm_fourcc.h`, `drm/drm_plane.h`.
- Detected declarations: `struct drm_simple_display_pipe`, `struct drm_shadow_plane_state`, `function to_drm_shadow_plane_state`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.