drivers/video/fbdev/au1200fb.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/au1200fb.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/au1200fb.c- Extension
.c- Size
- 49582 bytes
- Lines
- 1844
- 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.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk.hlinux/module.hlinux/platform_device.hlinux/kernel.hlinux/errno.hlinux/string.hlinux/mm.hlinux/fb.hlinux/init.hlinux/interrupt.hlinux/ctype.hlinux/dma-mapping.hlinux/slab.hlinux/uaccess.hasm/mach-au1x00/au1000.hasm/mach-au1x00/au1200fb.hau1200fb.h
Detected Declarations
struct au1200_lcd_global_regs_tstruct au1200_lcd_window_regs_tstruct au1200_lcd_iodata_tstruct au1200fb_devicestruct window_settingsstruct panel_settingsfunction winbppfunction fbinfo2indexfunction au1200_setlocationfunction au1200_setpanelfunction sourcefunction au1200_setmodefunction au1200fb_update_fbinfofunction au1200fb_fb_check_varfunction au1200fb_fb_set_parfunction au1200fb_fb_setcolregfunction au1200fb_fb_blankfunction flagfunction set_globalfunction get_globalfunction set_windowfunction get_windowfunction au1200fb_ioctlfunction au1200fb_handle_irqfunction au1200fb_init_fbinfofunction au1200fb_setupfunction au1200fb_drv_probefunction au1200fb_drv_removefunction au1200fb_drv_suspendfunction au1200fb_drv_resume
Annotated Snippet
struct au1200_lcd_global_regs_t {
unsigned int flags;
unsigned int xsize;
unsigned int ysize;
unsigned int backcolor;
unsigned int brightness;
unsigned int colorkey;
unsigned int mask;
unsigned int panel_choice;
char panel_desc[80];
};
#define WIN_POSITION (1<< 0)
#define WIN_ALPHA_COLOR (1<< 1)
#define WIN_ALPHA_MODE (1<< 2)
#define WIN_PRIORITY (1<< 3)
#define WIN_CHANNEL (1<< 4)
#define WIN_BUFFER_FORMAT (1<< 5)
#define WIN_COLOR_ORDER (1<< 6)
#define WIN_PIXEL_ORDER (1<< 7)
#define WIN_SIZE (1<< 8)
#define WIN_COLORKEY_MODE (1<< 9)
#define WIN_DOUBLE_BUFFER_MODE (1<< 10)
#define WIN_RAM_ARRAY_MODE (1<< 11)
#define WIN_BUFFER_SCALE (1<< 12)
#define WIN_ENABLE (1<< 13)
struct au1200_lcd_window_regs_t {
unsigned int flags;
unsigned int xpos;
unsigned int ypos;
unsigned int alpha_color;
unsigned int alpha_mode;
unsigned int priority;
unsigned int channel;
unsigned int buffer_format;
unsigned int color_order;
unsigned int pixel_order;
unsigned int xsize;
unsigned int ysize;
unsigned int colorkey_mode;
unsigned int double_buffer_mode;
unsigned int ram_array_mode;
unsigned int xscale;
unsigned int yscale;
unsigned int enable;
};
struct au1200_lcd_iodata_t {
unsigned int subcmd;
struct au1200_lcd_global_regs_t global;
struct au1200_lcd_window_regs_t window;
};
#if defined(__BIG_ENDIAN)
#define LCD_CONTROL_DEFAULT_PO LCD_CONTROL_PO_11
#else
#define LCD_CONTROL_DEFAULT_PO LCD_CONTROL_PO_00
#endif
#define LCD_CONTROL_DEFAULT_SBPPF LCD_CONTROL_SBPPF_565
/* Private, per-framebuffer management information (independent of the panel itself) */
struct au1200fb_device {
struct fb_info *fb_info; /* FB driver info record */
struct au1200fb_platdata *pd;
struct device *dev;
int plane;
unsigned char* fb_mem; /* FrameBuffer memory map */
unsigned int fb_len;
dma_addr_t fb_phys;
};
/********************************************************************/
/* LCD controller restrictions */
#define AU1200_LCD_MAX_XRES 1280
#define AU1200_LCD_MAX_YRES 1024
#define AU1200_LCD_MAX_BPP 32
#define AU1200_LCD_MAX_CLK 96000000 /* fixme: this needs to go away ? */
#define AU1200_LCD_NBR_PALETTE_ENTRIES 256
/* Default number of visible screen buffer to allocate */
#define AU1200FB_NBR_VIDEO_BUFFERS 1
/* Default maximum number of fb devices to create */
#define MAX_DEVICE_COUNT 4
Annotation
- Immediate include surface: `linux/clk.h`, `linux/module.h`, `linux/platform_device.h`, `linux/kernel.h`, `linux/errno.h`, `linux/string.h`, `linux/mm.h`, `linux/fb.h`.
- Detected declarations: `struct au1200_lcd_global_regs_t`, `struct au1200_lcd_window_regs_t`, `struct au1200_lcd_iodata_t`, `struct au1200fb_device`, `struct window_settings`, `struct panel_settings`, `function winbpp`, `function fbinfo2index`, `function au1200_setlocation`, `function au1200_setpanel`.
- Atlas domain: Driver Families / drivers/video.
- Implementation status: source implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- 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.