drivers/video/fbdev/omap2/omapfb/dss/apply.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/omap2/omapfb/dss/apply.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/omap2/omapfb/dss/apply.c- Extension
.c- Size
- 34802 bytes
- Lines
- 1691
- 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.
- 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.hvideo/omapfb_dss.hdss.hdss_features.hdispc-compat.h
Detected Declarations
struct ovl_priv_datastruct mgr_priv_datafunction apply_init_privfunction ovl_manual_updatefunction mgr_manual_updatefunction dss_check_settings_lowfunction dss_check_settingsfunction dss_check_settings_applyfunction need_isrfunction list_for_each_entryfunction need_gofunction list_for_each_entryfunction extra_info_update_ongoingfunction list_for_each_entryfunction wait_pending_extra_info_updatesfunction dss_mgr_wait_for_vsyncfunction dss_mgr_wait_for_gofunction dss_mgr_wait_for_go_ovlfunction dss_ovl_write_regsfunction dss_ovl_write_regs_extrafunction dss_mgr_write_regsfunction dss_mgr_write_regs_extrafunction dss_write_regsfunction dss_set_go_bitsfunction mgr_clear_shadow_dirtyfunction list_for_each_entryfunction dss_mgr_connect_compatfunction dss_mgr_disconnect_compatfunction dss_mgr_start_update_compatfunction dss_register_vsync_isrfunction dss_unregister_vsync_isrfunction dss_apply_irq_handlerfunction omap_dss_mgr_apply_ovlfunction omap_dss_mgr_apply_mgrfunction omap_dss_mgr_applyfunction dss_apply_ovl_enablefunction dss_apply_ovl_fifo_thresholdsfunction dss_ovl_setup_fifofunction dss_mgr_setup_fifosfunction dss_setup_fifosfunction dss_mgr_enable_compatfunction dss_mgr_disable_compatfunction dss_mgr_set_infofunction dss_mgr_get_infofunction dss_mgr_set_outputfunction dss_mgr_unset_outputfunction dss_apply_mgr_timingsfunction dss_mgr_set_timings_compat
Annotated Snippet
struct ovl_priv_data {
bool user_info_dirty;
struct omap_overlay_info user_info;
bool info_dirty;
struct omap_overlay_info info;
bool shadow_info_dirty;
bool extra_info_dirty;
bool shadow_extra_info_dirty;
bool enabled;
u32 fifo_low, fifo_high;
/*
* True if overlay is to be enabled. Used to check and calculate configs
* for the overlay before it is enabled in the HW.
*/
bool enabling;
};
struct mgr_priv_data {
bool user_info_dirty;
struct omap_overlay_manager_info user_info;
bool info_dirty;
struct omap_overlay_manager_info info;
bool shadow_info_dirty;
/* If true, GO bit is up and shadow registers cannot be written.
* Never true for manual update displays */
bool busy;
/* If true, dispc output is enabled */
bool updating;
/* If true, a display is enabled using this manager */
bool enabled;
bool extra_info_dirty;
bool shadow_extra_info_dirty;
struct omap_video_timings timings;
struct dss_lcd_mgr_config lcd_config;
void (*framedone_handler)(void *);
void *framedone_handler_data;
};
static struct {
struct ovl_priv_data ovl_priv_data_array[MAX_DSS_OVERLAYS];
struct mgr_priv_data mgr_priv_data_array[MAX_DSS_MANAGERS];
bool irq_enabled;
} dss_data;
/* protects dss_data */
static DEFINE_SPINLOCK(data_lock);
/* lock for blocking functions */
static DEFINE_MUTEX(apply_lock);
static DECLARE_COMPLETION(extra_updated_completion);
static void dss_register_vsync_isr(void);
static struct ovl_priv_data *get_ovl_priv(struct omap_overlay *ovl)
{
return &dss_data.ovl_priv_data_array[ovl->id];
}
static struct mgr_priv_data *get_mgr_priv(struct omap_overlay_manager *mgr)
{
return &dss_data.mgr_priv_data_array[mgr->id];
}
static void apply_init_priv(void)
{
const int num_ovls = dss_feat_get_num_ovls();
struct mgr_priv_data *mp;
int i;
for (i = 0; i < num_ovls; ++i) {
struct ovl_priv_data *op;
op = &dss_data.ovl_priv_data_array[i];
op->info.color_mode = OMAP_DSS_COLOR_RGB16;
Annotation
- Immediate include surface: `linux/export.h`, `linux/kernel.h`, `linux/module.h`, `linux/slab.h`, `linux/spinlock.h`, `linux/jiffies.h`, `video/omapfb_dss.h`, `dss.h`.
- Detected declarations: `struct ovl_priv_data`, `struct mgr_priv_data`, `function apply_init_priv`, `function ovl_manual_update`, `function mgr_manual_update`, `function dss_check_settings_low`, `function dss_check_settings`, `function dss_check_settings_apply`, `function need_isr`, `function list_for_each_entry`.
- 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.
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.