drivers/gpu/drm/omapdrm/dss/dss.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/omapdrm/dss/dss.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/omapdrm/dss/dss.c- Extension
.c- Size
- 36946 bytes
- Lines
- 1642
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- 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/debugfs.hlinux/dma-mapping.hlinux/kernel.hlinux/module.hlinux/io.hlinux/export.hlinux/err.hlinux/delay.hlinux/seq_file.hlinux/clk.hlinux/pinctrl/consumer.hlinux/platform_device.hlinux/pm_runtime.hlinux/property.hlinux/gfp.hlinux/sizes.hlinux/mfd/syscon.hlinux/regmap.hlinux/of.hlinux/of_platform.hlinux/of_graph.hlinux/regulator/consumer.hlinux/suspend.hlinux/component.hlinux/sys_soc.homapdss.hdss.h
Detected Declarations
struct dss_regstruct dss_opsstruct dss_featuresstruct dss_debugfs_entrystruct dss_component_match_datafunction dss_write_regfunction dss_read_regfunction dss_save_contextfunction dss_restore_contextfunction dss_ctrl_pll_enablefunction dss_ctrl_pll_set_control_muxfunction dss_sdi_initfunction dss_sdi_enablefunction dss_sdi_disablefunction dss_dump_clocksfunction dss_dump_regsfunction dss_debug_dump_clocksfunction dss_get_channel_indexfunction dss_select_dispc_clk_sourcefunction dss_select_dsi_clk_sourcefunction dss_lcd_clk_mux_dra7function dss_lcd_clk_mux_omap5function dss_lcd_clk_mux_omap4function dss_select_lcd_clk_sourcefunction dss_get_dispc_clk_sourcefunction dss_get_dsi_clk_sourcefunction dss_get_lcd_clk_sourcefunction dss_div_calcfunction dss_set_fck_ratefunction dss_get_dispc_clk_ratefunction dss_get_max_fck_ratefunction dss_setup_default_clockfunction dss_set_venc_outputfunction dss_set_dac_pwrdn_bgzfunction dss_select_hdmi_venc_clk_sourcefunction dss_dpi_select_source_omap2_omap3function dss_dpi_select_source_omap4function dss_dpi_select_source_omap5function dss_dpi_select_source_dra7xxfunction dss_dpi_select_sourcefunction dss_get_clocksfunction dss_put_clocksfunction dss_runtime_getfunction dss_runtime_putfunction dss_initialize_debugfsfunction dss_uninitialize_debugfsfunction dss_debug_openfunction dss_debugfs_create_file
Annotated Snippet
static const struct file_operations dss_debug_fops = {
.open = dss_debug_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
struct dss_debugfs_entry *
dss_debugfs_create_file(struct dss_device *dss, const char *name,
int (*show_fn)(struct seq_file *s, void *data),
void *data)
{
struct dss_debugfs_entry *entry;
entry = kzalloc_obj(*entry);
if (!entry)
return ERR_PTR(-ENOMEM);
entry->show_fn = show_fn;
entry->data = data;
entry->dentry = debugfs_create_file(name, 0444, dss->debugfs.root,
entry, &dss_debug_fops);
return entry;
}
void dss_debugfs_remove_file(struct dss_debugfs_entry *entry)
{
if (IS_ERR_OR_NULL(entry))
return;
debugfs_remove(entry->dentry);
kfree(entry);
}
#else /* CONFIG_OMAP2_DSS_DEBUGFS */
static inline int dss_initialize_debugfs(struct dss_device *dss)
{
return 0;
}
static inline void dss_uninitialize_debugfs(struct dss_device *dss)
{
}
#endif /* CONFIG_OMAP2_DSS_DEBUGFS */
static const struct dss_ops dss_ops_omap2_omap3 = {
.dpi_select_source = &dss_dpi_select_source_omap2_omap3,
};
static const struct dss_ops dss_ops_omap4 = {
.dpi_select_source = &dss_dpi_select_source_omap4,
.select_lcd_source = &dss_lcd_clk_mux_omap4,
};
static const struct dss_ops dss_ops_omap5 = {
.dpi_select_source = &dss_dpi_select_source_omap5,
.select_lcd_source = &dss_lcd_clk_mux_omap5,
};
static const struct dss_ops dss_ops_dra7 = {
.dpi_select_source = &dss_dpi_select_source_dra7xx,
.select_lcd_source = &dss_lcd_clk_mux_dra7,
};
static const enum omap_display_type omap2plus_ports[] = {
OMAP_DISPLAY_TYPE_DPI,
};
static const enum omap_display_type omap34xx_ports[] = {
OMAP_DISPLAY_TYPE_DPI,
OMAP_DISPLAY_TYPE_SDI,
};
static const enum omap_display_type dra7xx_ports[] = {
OMAP_DISPLAY_TYPE_DPI,
OMAP_DISPLAY_TYPE_DPI,
OMAP_DISPLAY_TYPE_DPI,
};
static const enum omap_dss_output_id omap2_dss_supported_outputs[] = {
/* OMAP_DSS_CHANNEL_LCD */
OMAP_DSS_OUTPUT_DPI | OMAP_DSS_OUTPUT_DBI,
/* OMAP_DSS_CHANNEL_DIGIT */
OMAP_DSS_OUTPUT_VENC,
};
static const enum omap_dss_output_id omap3430_dss_supported_outputs[] = {
/* OMAP_DSS_CHANNEL_LCD */
OMAP_DSS_OUTPUT_DPI | OMAP_DSS_OUTPUT_DBI |
Annotation
- Immediate include surface: `linux/debugfs.h`, `linux/dma-mapping.h`, `linux/kernel.h`, `linux/module.h`, `linux/io.h`, `linux/export.h`, `linux/err.h`, `linux/delay.h`.
- Detected declarations: `struct dss_reg`, `struct dss_ops`, `struct dss_features`, `struct dss_debugfs_entry`, `struct dss_component_match_data`, `function dss_write_reg`, `function dss_read_reg`, `function dss_save_context`, `function dss_restore_context`, `function dss_ctrl_pll_enable`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: pattern implementation candidate.
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.