drivers/video/fbdev/core/fbcon_ccw.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/core/fbcon_ccw.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/core/fbcon_ccw.c- Extension
.c- Size
- 9877 bytes
- Lines
- 377
- Domain
- Driver Families
- Bucket
- drivers/video
- 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.
- 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/module.hlinux/slab.hlinux/string.hlinux/fb.hlinux/font.hlinux/vt_kern.hlinux/console.hasm/types.hfbcon.hfbcon_rotate.h
Detected Declarations
function Copyrightfunction ccw_bmovefunction ccw_clearfunction ccw_putcs_alignedfunction ccw_putcsfunction ccw_clear_marginsfunction ccw_cursorfunction ccw_update_startfunction fbcon_set_bitops_ccw
Annotated Snippet
if (attribute & FBCON_ATTRIBUTE_UNDERLINE) {
if (j == width - 1)
c |= msk;
if (msk1 && j == width - 2)
c |= msk1;
}
if (attribute & FBCON_ATTRIBUTE_BOLD && i)
*(dst - width) |= c;
if (attribute & FBCON_ATTRIBUTE_REVERSE)
c = ~c;
src++;
*dst++ = c;
}
}
}
static void ccw_bmove(struct vc_data *vc, struct fb_info *info, int sy,
int sx, int dy, int dx, int height, int width)
{
struct fbcon_par *par = info->fbcon_par;
struct fb_copyarea area;
u32 vyres = GETVYRES(par->p, info);
area.sx = sy * vc->vc_font.height;
area.sy = vyres - ((sx + width) * vc->vc_font.width);
area.dx = dy * vc->vc_font.height;
area.dy = vyres - ((dx + width) * vc->vc_font.width);
area.width = height * vc->vc_font.height;
area.height = width * vc->vc_font.width;
info->fbops->fb_copyarea(info, &area);
}
static void ccw_clear(struct vc_data *vc, struct fb_info *info, int sy,
int sx, int height, int width, int fg, int bg)
{
struct fbcon_par *par = info->fbcon_par;
struct fb_fillrect region;
u32 vyres = GETVYRES(par->p, info);
region.color = bg;
region.dx = sy * vc->vc_font.height;
region.dy = vyres - ((sx + width) * vc->vc_font.width);
region.height = width * vc->vc_font.width;
region.width = height * vc->vc_font.height;
region.rop = ROP_COPY;
info->fbops->fb_fillrect(info, ®ion);
}
static inline void ccw_putcs_aligned(struct vc_data *vc, struct fb_info *info,
const u16 *s, u32 attr, u32 cnt,
u32 d_pitch, u32 s_pitch, u32 cellsize,
struct fb_image *image, u8 *buf, u8 *dst)
{
struct fbcon_par *par = info->fbcon_par;
u16 charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
u32 idx = font_glyph_pitch(vc->vc_font.height);
u8 *src;
while (cnt--) {
src = par->rotated.buf + (scr_readw(s--) & charmask) * cellsize;
if (attr) {
ccw_update_attr(buf, src, attr, vc);
src = buf;
}
if (likely(idx == 1))
__fb_pad_aligned_buffer(dst, d_pitch, src, idx,
vc->vc_font.width);
else
fb_pad_aligned_buffer(dst, d_pitch, src, idx,
vc->vc_font.width);
dst += d_pitch * vc->vc_font.width;
}
info->fbops->fb_imageblit(info, image);
}
static void ccw_putcs(struct vc_data *vc, struct fb_info *info,
const unsigned short *s, int count, int yy, int xx,
int fg, int bg)
{
struct fb_image image;
Annotation
- Immediate include surface: `linux/module.h`, `linux/slab.h`, `linux/string.h`, `linux/fb.h`, `linux/font.h`, `linux/vt_kern.h`, `linux/console.h`, `asm/types.h`.
- Detected declarations: `function Copyright`, `function ccw_bmove`, `function ccw_clear`, `function ccw_putcs_aligned`, `function ccw_putcs`, `function ccw_clear_margins`, `function ccw_cursor`, `function ccw_update_start`, `function fbcon_set_bitops_ccw`.
- Atlas domain: Driver Families / drivers/video.
- 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.