drivers/media/platform/renesas/vsp1/vsp1_dl.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/renesas/vsp1/vsp1_dl.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/renesas/vsp1/vsp1_dl.c- Extension
.c- Size
- 30850 bytes
- Lines
- 1177
- Domain
- Driver Families
- Bucket
- drivers/media
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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/device.hlinux/dma-mapping.hlinux/gfp.hlinux/lockdep.hlinux/refcount.hlinux/slab.hlinux/workqueue.hvsp1.hvsp1_dl.h
Detected Declarations
struct vsp1_dl_header_liststruct vsp1_dl_headerstruct vsp1_dl_ext_headerstruct vsp1_dl_header_extendedstruct vsp1_dl_entrystruct vsp1_pre_ext_dl_bodystruct vsp1_dl_bodystruct vsp1_dl_body_poolstruct vsp1_dl_cmd_poolstruct vsp1_dl_liststruct vsp1_dl_managerstruct vsp1_extended_command_infoenum vsp1_extcmd_typefunction vsp1_dl_body_pool_createfunction vsp1_dl_body_pool_destroyfunction vsp1_dl_body_putfunction vsp1_dl_body_allocfunction vsp1_dl_cmd_pool_createfunction vsp1_dl_ext_cmd_putfunction vsp1_dl_ext_cmd_pool_destroyfunction vsp1_dl_list_bodies_putfunction list_for_each_entry_safefunction vsp1_dl_list_freefunction __vsp1_dl_list_putfunction vsp1_dl_list_putfunction vsp1_dl_body_putfunction __vsp1_dl_list_putfunction vsp1_dl_ext_cmd_fill_headerfunction vsp1_dl_list_fill_headerfunction list_for_each_entryfunction vsp1_dl_list_hw_update_pendingfunction vsp1_dl_list_hw_enqueuefunction vsp1_dl_list_commit_continuousfunction vsp1_dl_list_commit_singleshotfunction vsp1_dl_list_commitfunction list_for_each_entryfunction vsp1_dlm_irq_frame_endfunction vsp1_dlm_setupfunction vsp1_dlm_resetfunction scoped_guardfunction vsp1_dlm_destroyfunction list_for_each_entry_safe
Annotated Snippet
struct vsp1_dl_header_list {
u32 num_bytes;
u32 addr;
} __packed;
struct vsp1_dl_header {
u32 num_lists;
struct vsp1_dl_header_list lists[8];
u32 next_header;
u32 flags;
} __packed;
/**
* struct vsp1_dl_ext_header - Extended display list header
* @padding: padding zero bytes for alignment
* @pre_ext_dl_num_cmd: number of pre-extended command bodies to parse
* @flags: enables or disables execution of the pre and post command
* @pre_ext_dl_plist: start address of pre-extended display list bodies
* @post_ext_dl_num_cmd: number of post-extended command bodies to parse
* @post_ext_dl_plist: start address of post-extended display list bodies
*/
struct vsp1_dl_ext_header {
u32 padding;
/*
* The datasheet represents flags as stored before pre_ext_dl_num_cmd,
* expecting 32-bit accesses. The flags are appropriate to the whole
* header, not just the pre_ext command, and thus warrant being
* separated out. Due to byte ordering, and representing as 16 bit
* values here, the flags must be positioned after the
* pre_ext_dl_num_cmd.
*/
u16 pre_ext_dl_num_cmd;
u16 flags;
u32 pre_ext_dl_plist;
u32 post_ext_dl_num_cmd;
u32 post_ext_dl_plist;
} __packed;
struct vsp1_dl_header_extended {
struct vsp1_dl_header header;
struct vsp1_dl_ext_header ext;
} __packed;
struct vsp1_dl_entry {
u32 addr;
u32 data;
} __packed;
/**
* struct vsp1_pre_ext_dl_body - Pre Extended Display List Body
* @opcode: Extended display list command operation code
* @flags: Pre-extended command flags. These are specific to each command
* @address_set: Source address set pointer. Must have 16-byte alignment
* @reserved: Zero bits for alignment.
*/
struct vsp1_pre_ext_dl_body {
u32 opcode;
u32 flags;
u32 address_set;
u32 reserved;
} __packed;
/**
* struct vsp1_dl_body - Display list body
* @list: entry in the display list list of bodies
* @free: entry in the pool free body list
* @refcnt: reference tracking for the body
* @pool: pool to which this body belongs
* @entries: array of entries
* @dma: DMA address of the entries
* @size: size of the DMA memory in bytes
* @num_entries: number of stored entries
* @max_entries: number of entries available
*/
struct vsp1_dl_body {
struct list_head list;
struct list_head free;
refcount_t refcnt;
struct vsp1_dl_body_pool *pool;
struct vsp1_dl_entry *entries;
dma_addr_t dma;
size_t size;
unsigned int num_entries;
unsigned int max_entries;
Annotation
- Immediate include surface: `linux/device.h`, `linux/dma-mapping.h`, `linux/gfp.h`, `linux/lockdep.h`, `linux/refcount.h`, `linux/slab.h`, `linux/workqueue.h`, `vsp1.h`.
- Detected declarations: `struct vsp1_dl_header_list`, `struct vsp1_dl_header`, `struct vsp1_dl_ext_header`, `struct vsp1_dl_header_extended`, `struct vsp1_dl_entry`, `struct vsp1_pre_ext_dl_body`, `struct vsp1_dl_body`, `struct vsp1_dl_body_pool`, `struct vsp1_dl_cmd_pool`, `struct vsp1_dl_list`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.