drivers/video/fbdev/omap/hwa742.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/omap/hwa742.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/omap/hwa742.c- Extension
.c- Size
- 27400 bytes
- Lines
- 1062
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/mm.hlinux/fb.hlinux/delay.hlinux/clk.hlinux/interrupt.homapfb.h
Detected Declarations
struct update_paramstruct hwa742_requestfunction hwa742_read_regfunction hwa742_write_regfunction set_window_regsfunction set_format_regsfunction enable_tearsyncfunction disable_tearsyncfunction free_reqfunction process_pending_requestsfunction submit_req_listfunction request_completefunction send_frame_handlerfunction send_frame_completefunction create_req_listfunction auto_update_completefunction __hwa742_update_window_autofunction hwa742_update_window_autofunction hwa742_update_window_asyncfunction hwa742_setup_planefunction hwa742_enable_planefunction sync_handlerfunction hwa742_syncfunction hwa742_bind_clientfunction hwa742_set_update_modefunction hwa742_get_update_modefunction round_to_extif_ticksfunction calc_reg_timingfunction calc_lut_timingfunction calc_extif_timingsfunction calc_hwa742_clk_ratesfunction setup_tearsyncfunction hwa742_get_capsfunction hwa742_suspendfunction hwa742_resumefunction hwa742_initfunction hwa742_cleanup
Annotated Snippet
struct update_param {
int x, y, width, height;
int color_mode;
int flags;
};
struct hwa742_request {
struct list_head entry;
unsigned int flags;
int (*handler)(struct hwa742_request *req);
void (*complete)(void *data);
void *complete_data;
union {
struct update_param update;
struct completion *sync;
} par;
};
struct {
enum omapfb_update_mode update_mode;
enum omapfb_update_mode update_mode_before_suspend;
struct timer_list auto_update_timer;
int stop_auto_update;
struct omapfb_update_window auto_update_window;
unsigned te_connected:1;
unsigned vsync_only:1;
struct hwa742_request req_pool[REQ_POOL_SIZE];
struct list_head pending_req_list;
struct list_head free_req_list;
/*
* @req_lock: protect request slots pool and its tracking lists
* @req_sema: counter; slot allocators from task contexts must
* push it down before acquiring a slot. This
* guarantees that atomic contexts will always have
* a minimum of IRQ_REQ_POOL_SIZE slots available.
*/
struct semaphore req_sema;
spinlock_t req_lock;
struct extif_timings reg_timings, lut_timings;
int prev_color_mode;
int prev_flags;
int window_type;
u32 max_transmit_size;
u32 extif_clk_period;
unsigned long pix_tx_time;
unsigned long line_upd_time;
struct omapfb_device *fbdev;
struct lcd_ctrl_extif *extif;
const struct lcd_ctrl *int_ctrl;
struct clk *sys_ck;
} hwa742;
struct lcd_ctrl hwa742_ctrl;
static u8 hwa742_read_reg(u8 reg)
{
u8 data;
hwa742.extif->set_bits_per_cycle(8);
hwa742.extif->write_command(®, 1);
hwa742.extif->read_data(&data, 1);
return data;
}
static void hwa742_write_reg(u8 reg, u8 data)
{
hwa742.extif->set_bits_per_cycle(8);
hwa742.extif->write_command(®, 1);
hwa742.extif->write_data(&data, 1);
}
static void set_window_regs(int x_start, int y_start, int x_end, int y_end)
{
u8 tmp[8];
u8 cmd;
x_end--;
y_end--;
Annotation
- Immediate include surface: `linux/module.h`, `linux/mm.h`, `linux/fb.h`, `linux/delay.h`, `linux/clk.h`, `linux/interrupt.h`, `omapfb.h`.
- Detected declarations: `struct update_param`, `struct hwa742_request`, `function hwa742_read_reg`, `function hwa742_write_reg`, `function set_window_regs`, `function set_format_regs`, `function enable_tearsync`, `function disable_tearsync`, `function free_req`, `function process_pending_requests`.
- Atlas domain: Driver Families / drivers/video.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.