drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c- Extension
.c- Size
- 15052 bytes
- Lines
- 659
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/export.hlinux/kernel.hlinux/module.hlinux/slab.hlinux/spinlock.hlinux/jiffies.hlinux/delay.hlinux/interrupt.hlinux/seq_file.hvideo/omapfb_dss.hdss.hdss_features.hdispc-compat.h
Detected Declarations
struct omap_dispc_isr_datastruct dispc_irq_statsfunction dispc_dump_irqsfunction _omap_dispc_set_irqsfunction omap_dispc_register_isrfunction omap_dispc_unregister_isrfunction print_irq_statusfunction omap_dispc_irq_handlerfunction dispc_error_workerfunction dss_dispc_initialize_irqfunction dss_dispc_uninitialize_irqfunction dispc_mgr_disable_isrfunction dispc_mgr_enable_lcd_outfunction dispc_mgr_disable_lcd_outfunction dispc_digit_out_enable_isrfunction dispc_mgr_enable_digit_outfunction dispc_mgr_disable_digit_outfunction dispc_mgr_enable_syncfunction dispc_mgr_disable_syncfunction dispc_irq_wait_handlerfunction omap_dispc_wait_for_irq_interruptible_timeoutexport omap_dispc_register_isrexport omap_dispc_unregister_isr
Annotated Snippet
struct omap_dispc_isr_data {
omap_dispc_isr_t isr;
void *arg;
u32 mask;
};
struct dispc_irq_stats {
unsigned long last_reset;
unsigned irq_count;
unsigned irqs[32];
};
static struct {
spinlock_t irq_lock;
u32 irq_error_mask;
struct omap_dispc_isr_data registered_isr[DISPC_MAX_NR_ISRS];
u32 error_irqs;
struct work_struct error_work;
#ifdef CONFIG_FB_OMAP2_DSS_COLLECT_IRQ_STATS
spinlock_t irq_stats_lock;
struct dispc_irq_stats irq_stats;
#endif
} dispc_compat;
#ifdef CONFIG_FB_OMAP2_DSS_COLLECT_IRQ_STATS
static void dispc_dump_irqs(struct seq_file *s)
{
unsigned long flags;
struct dispc_irq_stats stats;
spin_lock_irqsave(&dispc_compat.irq_stats_lock, flags);
stats = dispc_compat.irq_stats;
memset(&dispc_compat.irq_stats, 0, sizeof(dispc_compat.irq_stats));
dispc_compat.irq_stats.last_reset = jiffies;
spin_unlock_irqrestore(&dispc_compat.irq_stats_lock, flags);
seq_printf(s, "period %u ms\n",
jiffies_to_msecs(jiffies - stats.last_reset));
seq_printf(s, "irqs %d\n", stats.irq_count);
#define PIS(x) \
seq_printf(s, "%-20s %10d\n", #x, stats.irqs[ffs(DISPC_IRQ_##x)-1])
PIS(FRAMEDONE);
PIS(VSYNC);
PIS(EVSYNC_EVEN);
PIS(EVSYNC_ODD);
PIS(ACBIAS_COUNT_STAT);
PIS(PROG_LINE_NUM);
PIS(GFX_FIFO_UNDERFLOW);
PIS(GFX_END_WIN);
PIS(PAL_GAMMA_MASK);
PIS(OCP_ERR);
PIS(VID1_FIFO_UNDERFLOW);
PIS(VID1_END_WIN);
PIS(VID2_FIFO_UNDERFLOW);
PIS(VID2_END_WIN);
if (dss_feat_get_num_ovls() > 3) {
PIS(VID3_FIFO_UNDERFLOW);
PIS(VID3_END_WIN);
}
PIS(SYNC_LOST);
PIS(SYNC_LOST_DIGIT);
PIS(WAKEUP);
if (dss_has_feature(FEAT_MGR_LCD2)) {
PIS(FRAMEDONE2);
PIS(VSYNC2);
PIS(ACBIAS_COUNT_STAT2);
PIS(SYNC_LOST2);
}
if (dss_has_feature(FEAT_MGR_LCD3)) {
PIS(FRAMEDONE3);
PIS(VSYNC3);
PIS(ACBIAS_COUNT_STAT3);
PIS(SYNC_LOST3);
}
#undef PIS
}
#endif
/* dispc.irq_lock has to be locked by the caller */
static void _omap_dispc_set_irqs(void)
{
u32 mask;
int i;
struct omap_dispc_isr_data *isr_data;
Annotation
- Immediate include surface: `linux/export.h`, `linux/kernel.h`, `linux/module.h`, `linux/slab.h`, `linux/spinlock.h`, `linux/jiffies.h`, `linux/delay.h`, `linux/interrupt.h`.
- Detected declarations: `struct omap_dispc_isr_data`, `struct dispc_irq_stats`, `function dispc_dump_irqs`, `function _omap_dispc_set_irqs`, `function omap_dispc_register_isr`, `function omap_dispc_unregister_isr`, `function print_irq_status`, `function omap_dispc_irq_handler`, `function dispc_error_worker`, `function dss_dispc_initialize_irq`.
- Atlas domain: Driver Families / drivers/video.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- 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.