drivers/video/fbdev/omap2/omapfb/dss/dispc.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/omap2/omapfb/dss/dispc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/omap2/omapfb/dss/dispc.c- Extension
.c- Size
- 100874 bytes
- Lines
- 4060
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/dma-mapping.hlinux/vmalloc.hlinux/export.hlinux/clk.hlinux/io.hlinux/jiffies.hlinux/seq_file.hlinux/delay.hlinux/workqueue.hlinux/hardirq.hlinux/platform_device.hlinux/pm_runtime.hlinux/sizes.hlinux/mfd/syscon.hlinux/regmap.hlinux/of.hlinux/component.hvideo/omapfb_dss.hdss.hdss_features.hdispc.h
Detected Declarations
struct dispc_featuresstruct dispc_reg_fieldstruct color_conv_coefstruct accuenum omap_burst_sizeenum omap_color_componentenum mgr_reg_fieldsfunction dispc_write_regfunction dispc_read_regfunction mgr_fld_readfunction mgr_fld_writefunction dispc_save_contextfunction dispc_restore_contextfunction dispc_runtime_getfunction dispc_runtime_putfunction dispc_mgr_get_vsync_irqfunction dispc_mgr_get_framedone_irqfunction dispc_mgr_get_sync_lost_irqfunction dispc_mgr_go_busyfunction dispc_mgr_gofunction dispc_ovl_write_firh_regfunction dispc_ovl_write_firhv_regfunction dispc_ovl_write_firv_regfunction dispc_ovl_write_firh2_regfunction dispc_ovl_write_firhv2_regfunction dispc_ovl_write_firv2_regfunction dispc_ovl_set_scale_coeffunction dispc_ovl_write_color_conv_coeffunction dispc_setup_color_conv_coeffunction dispc_ovl_set_ba0function dispc_ovl_set_ba1function dispc_ovl_set_ba0_uvfunction dispc_ovl_set_ba1_uvfunction dispc_ovl_set_posfunction dispc_ovl_set_input_sizefunction dispc_ovl_set_output_sizefunction dispc_ovl_set_zorderfunction dispc_ovl_enable_zorder_planesfunction dispc_ovl_set_pre_mult_alphafunction dispc_ovl_setup_global_alphafunction dispc_ovl_set_pix_incfunction dispc_ovl_set_row_incfunction dispc_ovl_set_color_modefunction dispc_ovl_configure_burst_typefunction dispc_ovl_set_channel_outfunction dispc_ovl_get_channel_outfunction dispc_ovl_set_burst_sizefunction dispc_configure_burst_sizes
Annotated Snippet
struct dispc_features {
u8 sw_start;
u8 fp_start;
u8 bp_start;
u16 sw_max;
u16 vp_max;
u16 hp_max;
u8 mgr_width_start;
u8 mgr_height_start;
u16 mgr_width_max;
u16 mgr_height_max;
unsigned long max_lcd_pclk;
unsigned long max_tv_pclk;
int (*calc_scaling) (unsigned long pclk, unsigned long lclk,
const struct omap_video_timings *mgr_timings,
u16 width, u16 height, u16 out_width, u16 out_height,
enum omap_color_mode color_mode, bool *five_taps,
int *x_predecim, int *y_predecim, int *decim_x, int *decim_y,
u16 pos_x, unsigned long *core_clk, bool mem_to_mem);
unsigned long (*calc_core_clk) (unsigned long pclk,
u16 width, u16 height, u16 out_width, u16 out_height,
bool mem_to_mem);
u8 num_fifos;
/* swap GFX & WB fifos */
bool gfx_fifo_workaround:1;
/* no DISPC_IRQ_FRAMEDONETV on this SoC */
bool no_framedone_tv:1;
/* revert to the OMAP4 mechanism of DISPC Smart Standby operation */
bool mstandby_workaround:1;
bool set_max_preload:1;
/* PIXEL_INC is not added to the last pixel of a line */
bool last_pixel_inc_missing:1;
/* POL_FREQ has ALIGN bit */
bool supports_sync_align:1;
bool has_writeback:1;
};
#define DISPC_MAX_NR_FIFOS 5
static struct {
struct platform_device *pdev;
void __iomem *base;
int irq;
irq_handler_t user_handler;
void *user_data;
unsigned long core_clk_rate;
unsigned long tv_pclk_rate;
u32 fifo_size[DISPC_MAX_NR_FIFOS];
/* maps which plane is using a fifo. fifo-id -> plane-id */
int fifo_assignment[DISPC_MAX_NR_FIFOS];
bool ctx_valid;
u32 ctx[DISPC_SZ_REGS / sizeof(u32)];
const struct dispc_features *feat;
bool is_enabled;
struct regmap *syscon_pol;
u32 syscon_pol_offset;
/* DISPC_CONTROL & DISPC_CONFIG lock*/
spinlock_t control_lock;
} dispc;
enum omap_color_component {
/* used for all color formats for OMAP3 and earlier
* and for RGB and Y color component on OMAP4
*/
DISPC_COLOR_COMPONENT_RGB_Y = 1 << 0,
/* used for UV component for
* OMAP_DSS_COLOR_YUV2, OMAP_DSS_COLOR_UYVY, OMAP_DSS_COLOR_NV12
* color formats on OMAP4
*/
DISPC_COLOR_COMPONENT_UV = 1 << 1,
};
enum mgr_reg_fields {
DISPC_MGR_FLD_ENABLE,
DISPC_MGR_FLD_STNTFT,
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/dma-mapping.h`, `linux/vmalloc.h`, `linux/export.h`, `linux/clk.h`, `linux/io.h`, `linux/jiffies.h`, `linux/seq_file.h`.
- Detected declarations: `struct dispc_features`, `struct dispc_reg_field`, `struct color_conv_coef`, `struct accu`, `enum omap_burst_size`, `enum omap_color_component`, `enum mgr_reg_fields`, `function dispc_write_reg`, `function dispc_read_reg`, `function mgr_fld_read`.
- 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.