drivers/gpu/drm/omapdrm/dss/dispc.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/omapdrm/dss/dispc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/omapdrm/dss/dispc.c- Extension
.c- Size
- 127501 bytes
- Lines
- 4777
- Domain
- Driver Families
- Bucket
- drivers/gpu
- 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 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/property.hlinux/sizes.hlinux/mfd/syscon.hlinux/regmap.hlinux/of.hlinux/component.hlinux/sys_soc.hdrm/drm_fourcc.hdrm/drm_blend.homapdss.hdss.hdispc.h
Detected Declarations
struct dispc_devicestruct dispc_featuresstruct dispc_devicestruct dispc_reg_fieldstruct dispc_gamma_descstruct csc_coef_yuv2rgbstruct accuenum omap_burst_sizeenum dispc_feature_idenum omap_color_componentenum mgr_reg_fieldsenum dispc_feat_reg_fieldfunction dispc_write_regfunction dispc_read_regfunction mgr_fld_readfunction mgr_fld_writefunction dispc_get_num_ovlsfunction dispc_get_num_mgrsfunction dispc_get_reg_fieldfunction dispc_has_featurefunction 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_enablefunction dispc_mgr_is_enabledfunction 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_ovl_set_cscfunction 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_zorder
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;
u16 ovl_width_max;
u16 ovl_height_max;
unsigned long max_lcd_pclk;
unsigned long max_tv_pclk;
unsigned int max_downscale;
unsigned int max_line_width;
unsigned int min_pcd;
int (*calc_scaling)(struct dispc_device *dispc,
unsigned long pclk, unsigned long lclk,
const struct videomode *vm,
u16 width, u16 height, u16 out_width, u16 out_height,
u32 fourcc, 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;
const enum dispc_feature_id *features;
unsigned int num_features;
const struct dss_reg_field *reg_fields;
const unsigned int num_reg_fields;
const enum omap_overlay_caps *overlay_caps;
const u32 **supported_color_modes;
const u32 *supported_scaler_color_modes;
unsigned int num_mgrs;
unsigned int num_ovls;
unsigned int buffer_size_unit;
unsigned int burst_size_unit;
/* 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;
bool supports_double_pixel:1;
/*
* Field order for VENC is different than HDMI. We should handle this in
* some intelligent manner, but as the SoCs have either HDMI or VENC,
* never both, we can just use this flag for now.
*/
bool reverse_ilace_field_order:1;
bool has_gamma_table:1;
bool has_gamma_i734_bug:1;
};
#define DISPC_MAX_NR_FIFOS 5
#define DISPC_MAX_CHANNEL_GAMMA 4
struct dispc_device {
struct platform_device *pdev;
void __iomem *base;
struct dss_device *dss;
struct dss_debugfs_entry *debugfs;
int irq;
irq_handler_t user_handler;
void *user_data;
unsigned long core_clk_rate;
unsigned long tv_pclk_rate;
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_device`, `struct dispc_features`, `struct dispc_device`, `struct dispc_reg_field`, `struct dispc_gamma_desc`, `struct csc_coef_yuv2rgb`, `struct accu`, `enum omap_burst_size`, `enum dispc_feature_id`, `enum omap_color_component`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
- 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.