drivers/gpu/drm/xen/xen_drm_front.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xen/xen_drm_front.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/xen/xen_drm_front.h- Extension
.h- Size
- 4417 bytes
- Lines
- 157
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/scatterlist.hdrm/drm_connector.hdrm/drm_simple_kms_helper.hxen_drm_front_cfg.h
Detected Declarations
struct drm_devicestruct drm_framebufferstruct drm_gem_objectstruct drm_pending_vblank_eventstruct xen_drm_front_infostruct xen_drm_front_drm_pipelinestruct xen_drm_front_drm_infofunction xen_drm_front_fb_to_cookiefunction xen_drm_front_dbuf_to_cookie
Annotated Snippet
struct xen_drm_front_info {
struct xenbus_device *xb_dev;
struct xen_drm_front_drm_info *drm_info;
/* to protect data between backend IO code and interrupt handler */
spinlock_t io_lock;
int num_evt_pairs;
struct xen_drm_front_evtchnl_pair *evt_pairs;
struct xen_drm_front_cfg cfg;
/* display buffers */
struct list_head dbuf_list;
};
struct xen_drm_front_drm_pipeline {
struct xen_drm_front_drm_info *drm_info;
int index;
struct drm_simple_display_pipe pipe;
struct drm_connector conn;
/* These are only for connector mode checking */
int width, height;
struct drm_pending_vblank_event *pending_event;
struct delayed_work pflip_to_worker;
bool conn_connected;
};
struct xen_drm_front_drm_info {
struct xen_drm_front_info *front_info;
struct drm_device *drm_dev;
struct xen_drm_front_drm_pipeline pipeline[XEN_DRM_FRONT_MAX_CRTCS];
};
static inline u64 xen_drm_front_fb_to_cookie(struct drm_framebuffer *fb)
{
return (uintptr_t)fb;
}
static inline u64 xen_drm_front_dbuf_to_cookie(struct drm_gem_object *gem_obj)
{
return (uintptr_t)gem_obj;
}
int xen_drm_front_mode_set(struct xen_drm_front_drm_pipeline *pipeline,
u32 x, u32 y, u32 width, u32 height,
u32 bpp, u64 fb_cookie);
int xen_drm_front_dbuf_create(struct xen_drm_front_info *front_info,
u64 dbuf_cookie, u32 width, u32 height,
u32 bpp, u64 size, u32 offset, struct page **pages);
int xen_drm_front_fb_attach(struct xen_drm_front_info *front_info,
u64 dbuf_cookie, u64 fb_cookie, u32 width,
u32 height, u32 pixel_format);
int xen_drm_front_fb_detach(struct xen_drm_front_info *front_info,
u64 fb_cookie);
int xen_drm_front_page_flip(struct xen_drm_front_info *front_info,
int conn_idx, u64 fb_cookie);
void xen_drm_front_on_frame_done(struct xen_drm_front_info *front_info,
int conn_idx, u64 fb_cookie);
void xen_drm_front_gem_object_free(struct drm_gem_object *obj);
#endif /* __XEN_DRM_FRONT_H_ */
Annotation
- Immediate include surface: `linux/scatterlist.h`, `drm/drm_connector.h`, `drm/drm_simple_kms_helper.h`, `xen_drm_front_cfg.h`.
- Detected declarations: `struct drm_device`, `struct drm_framebuffer`, `struct drm_gem_object`, `struct drm_pending_vblank_event`, `struct xen_drm_front_info`, `struct xen_drm_front_drm_pipeline`, `struct xen_drm_front_drm_info`, `function xen_drm_front_fb_to_cookie`, `function xen_drm_front_dbuf_to_cookie`.
- Atlas domain: Driver Families / drivers/gpu.
- 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.