drivers/video/fbdev/c2p_iplan2.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/c2p_iplan2.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/c2p_iplan2.c- Extension
.c- Size
- 3604 bytes
- Lines
- 155
- Domain
- Driver Families
- Bucket
- drivers/video
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
Dependency Surface
linux/export.hlinux/module.hlinux/string.hlinux/unaligned.hc2p.hc2p_core.h
Detected Declarations
function C2Pfunction store_iplan2function store_iplan2_maskedfunction c2p_iplan2export c2p_iplan2
Annotated Snippet
if (dst_idx+width <= 16) {
/* Single destination word */
first &= last;
memset(d.pixels, 0, sizeof(d));
memcpy(d.pixels+dst_idx, c, width);
c += width;
c2p_16x8(d.words);
store_iplan2_masked(p, bpp, d.words, first);
p += bpp*2;
} else {
/* Multiple destination words */
w = width;
/* Leading bits */
if (dst_idx) {
w = 16 - dst_idx;
memset(d.pixels, 0, dst_idx);
memcpy(d.pixels+dst_idx, c, w);
c += w;
c2p_16x8(d.words);
store_iplan2_masked(p, bpp, d.words, first);
p += bpp*2;
w = width-w;
}
/* Main chunk */
while (w >= 16) {
memcpy(d.pixels, c, 16);
c += 16;
c2p_16x8(d.words);
store_iplan2(p, bpp, d.words);
p += bpp*2;
w -= 16;
}
/* Trailing bits */
w %= 16;
if (w > 0) {
memcpy(d.pixels, c, w);
memset(d.pixels+w, 0, 16-w);
c2p_16x8(d.words);
store_iplan2_masked(p, bpp, d.words, last);
}
}
src += src_nextline;
dst += dst_nextline;
}
}
EXPORT_SYMBOL_GPL(c2p_iplan2);
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/export.h`, `linux/module.h`, `linux/string.h`, `linux/unaligned.h`, `c2p.h`, `c2p_core.h`.
- Detected declarations: `function C2P`, `function store_iplan2`, `function store_iplan2_masked`, `function c2p_iplan2`, `export c2p_iplan2`.
- Atlas domain: Driver Families / drivers/video.
- Implementation status: integration 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.