drivers/video/fbdev/core/fbcon_rotate.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/core/fbcon_rotate.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/core/fbcon_rotate.c- Extension
.c- Size
- 1268 bytes
- Lines
- 53
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/errno.hlinux/fb.hlinux/font.hfbcon.hfbcon_rotate.h
Detected Declarations
function Copyright
Annotated Snippet
#include <linux/errno.h>
#include <linux/fb.h>
#include <linux/font.h>
#include "fbcon.h"
#include "fbcon_rotate.h"
int fbcon_rotate_font(struct fb_info *info, struct vc_data *vc)
{
struct fbcon_par *par = info->fbcon_par;
unsigned char *buf;
int ret;
if (par->p->fontdata == par->rotated.fontdata && par->rotate == par->rotated.buf_rotate)
return 0;
par->rotated.fontdata = par->p->fontdata;
par->rotated.buf_rotate = par->rotate;
if (info->fbops->fb_sync)
info->fbops->fb_sync(info);
buf = font_data_rotate(par->rotated.fontdata, vc->vc_font.width,
vc->vc_font.height, vc->vc_font.charcount,
par->rotated.buf_rotate, par->rotated.buf,
&par->rotated.bufsize);
if (IS_ERR(buf)) {
ret = PTR_ERR(buf);
goto err_kfree;
}
par->rotated.buf = buf;
return 0;
err_kfree:
kfree(par->rotated.buf);
par->rotated.buf = NULL; /* clear here to avoid output */
par->rotated.bufsize = 0;
return ret;
}
Annotation
- Immediate include surface: `linux/errno.h`, `linux/fb.h`, `linux/font.h`, `fbcon.h`, `fbcon_rotate.h`.
- Detected declarations: `function Copyright`.
- 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.