drivers/gpu/drm/tiny/appletbdrm.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/tiny/appletbdrm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/tiny/appletbdrm.c- Extension
.c- Size
- 23550 bytes
- Lines
- 835
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/align.hlinux/array_size.hlinux/bitops.hlinux/bug.hlinux/container_of.hlinux/err.hlinux/module.hlinux/overflow.hlinux/slab.hlinux/types.hlinux/unaligned.hlinux/usb.hdrm/drm_atomic.hdrm/drm_atomic_helper.hdrm/drm_crtc.hdrm/drm_damage_helper.hdrm/drm_drv.hdrm/drm_encoder.hdrm/drm_format_helper.hdrm/drm_fourcc.hdrm/drm_framebuffer.hdrm/drm_gem_atomic_helper.hdrm/drm_gem_framebuffer_helper.hdrm/drm_gem_shmem_helper.hdrm/drm_plane.hdrm/drm_print.hdrm/drm_probe_helper.h
Detected Declarations
struct appletbdrm_msg_request_headerstruct appletbdrm_msg_response_headerstruct appletbdrm_msg_simple_requeststruct appletbdrm_msg_informationstruct appletbdrm_framestruct appletbdrm_fb_request_footerstruct appletbdrm_fb_requeststruct appletbdrm_fb_request_responsestruct appletbdrm_devicestruct appletbdrm_plane_statefunction appletbdrm_send_requestfunction appletbdrm_read_responsefunction appletbdrm_send_msgfunction appletbdrm_clear_displayfunction appletbdrm_signal_readinessfunction appletbdrm_get_informationfunction rect_sizefunction appletbdrm_connector_helper_get_modesfunction appletbdrm_primary_plane_helper_atomic_checkfunction appletbdrm_flush_damagefunction appletbdrm_primary_plane_helper_atomic_updatefunction appletbdrm_primary_plane_helper_atomic_disablefunction appletbdrm_primary_plane_resetfunction appletbdrm_primary_plane_destroy_statefunction appletbdrm_crtc_helper_mode_validfunction appletbdrm_setup_mode_configfunction appletbdrm_probefunction appletbdrm_disconnectfunction appletbdrm_shutdown
Annotated Snippet
struct appletbdrm_msg_request_header {
__le16 unk_00;
__le16 unk_02;
__le32 unk_04;
__le32 unk_08;
__le32 size;
} __packed;
struct appletbdrm_msg_response_header {
u8 unk_00[16];
__le32 msg;
} __packed;
struct appletbdrm_msg_simple_request {
struct appletbdrm_msg_request_header header;
__le32 msg;
u8 unk_14[8];
__le32 size;
} __packed;
struct appletbdrm_msg_information {
struct appletbdrm_msg_response_header header;
u8 unk_14[12];
__le32 width;
__le32 height;
u8 bits_per_pixel;
__le32 bytes_per_row;
__le32 orientation;
__le32 bitmap_info;
__le32 pixel_format;
__le32 width_inches; /* floating point */
__le32 height_inches; /* floating point */
} __packed;
struct appletbdrm_frame {
__le16 begin_x;
__le16 begin_y;
__le16 width;
__le16 height;
__le32 buf_size;
u8 buf[];
} __packed;
struct appletbdrm_fb_request_footer {
u8 unk_00[12];
__le32 unk_0c;
u8 unk_10[12];
__le32 unk_1c;
__le64 timestamp;
u8 unk_28[12];
__le32 unk_34;
u8 unk_38[20];
__le32 unk_4c;
} __packed;
struct appletbdrm_fb_request {
struct appletbdrm_msg_request_header header;
__le16 unk_10;
u8 msg_id;
u8 unk_13[29];
/*
* Contents of `data`:
* - struct appletbdrm_frame frames[];
* - struct appletbdrm_fb_request_footer footer;
* - padding to make the total size a multiple of 16
*/
u8 data[];
} __packed;
struct appletbdrm_fb_request_response {
struct appletbdrm_msg_response_header header;
u8 unk_14[12];
__le64 timestamp;
} __packed;
struct appletbdrm_device {
unsigned int in_ep;
unsigned int out_ep;
unsigned int width;
unsigned int height;
struct drm_device drm;
struct drm_display_mode mode;
struct drm_connector connector;
struct drm_plane primary_plane;
struct drm_crtc crtc;
struct drm_encoder encoder;
};
Annotation
- Immediate include surface: `linux/align.h`, `linux/array_size.h`, `linux/bitops.h`, `linux/bug.h`, `linux/container_of.h`, `linux/err.h`, `linux/module.h`, `linux/overflow.h`.
- Detected declarations: `struct appletbdrm_msg_request_header`, `struct appletbdrm_msg_response_header`, `struct appletbdrm_msg_simple_request`, `struct appletbdrm_msg_information`, `struct appletbdrm_frame`, `struct appletbdrm_fb_request_footer`, `struct appletbdrm_fb_request`, `struct appletbdrm_fb_request_response`, `struct appletbdrm_device`, `struct appletbdrm_plane_state`.
- Atlas domain: Driver Families / drivers/gpu.
- 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.