drivers/video/fbdev/omap2/omapfb/dss/dss.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/omap2/omapfb/dss/dss.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/omap2/omapfb/dss/dss.c- Extension
.c- Size
- 27288 bytes
- Lines
- 1297
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/module.hlinux/io.hlinux/export.hlinux/err.hlinux/delay.hlinux/seq_file.hlinux/clk.hlinux/platform_device.hlinux/pm_runtime.hlinux/gfp.hlinux/sizes.hlinux/mfd/syscon.hlinux/regmap.hlinux/of.hlinux/of_graph.hlinux/regulator/consumer.hlinux/suspend.hlinux/component.hlinux/pinctrl/consumer.hvideo/omapfb_dss.hdss.hdss_features.h
Detected Declarations
struct dss_regstruct dss_featuresfunction omapdss_is_initializedfunction 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_select_dispc_clk_sourcefunction dss_select_dsi_clk_sourcefunction 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_setup_default_clockfunction dss_set_venc_outputfunction dss_set_dac_pwrdn_bgzfunction dss_select_hdmi_venc_clk_sourcefunction dss_get_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_debug_dump_clocksfunction dss_init_portsfunction dss_uninit_portsfunction dss_video_pll_probefunction dss_bindfunction dss_unbindfunction dss_add_child_componentfunction dss_probefunction dss_removefunction dss_runtime_suspendfunction dss_runtime_resume
Annotated Snippet
struct dss_reg {
u16 idx;
};
#define DSS_REG(idx) ((const struct dss_reg) { idx })
#define DSS_REVISION DSS_REG(0x0000)
#define DSS_SYSCONFIG DSS_REG(0x0010)
#define DSS_SYSSTATUS DSS_REG(0x0014)
#define DSS_CONTROL DSS_REG(0x0040)
#define DSS_SDI_CONTROL DSS_REG(0x0044)
#define DSS_PLL_CONTROL DSS_REG(0x0048)
#define DSS_SDI_STATUS DSS_REG(0x005C)
#define REG_GET(idx, start, end) \
FLD_GET(dss_read_reg(idx), start, end)
#define REG_FLD_MOD(idx, val, start, end) \
dss_write_reg(idx, FLD_MOD(dss_read_reg(idx), val, start, end))
struct dss_features {
u8 fck_div_max;
u8 dss_fck_multiplier;
const char *parent_clk_name;
const enum omap_display_type *ports;
int num_ports;
int (*dpi_select_source)(int port, enum omap_channel channel);
};
static struct {
struct platform_device *pdev;
void __iomem *base;
struct regmap *syscon_pll_ctrl;
u32 syscon_pll_ctrl_offset;
struct clk *parent_clk;
struct clk *dss_clk;
unsigned long dss_clk_rate;
unsigned long cache_req_pck;
unsigned long cache_prate;
struct dispc_clock_info cache_dispc_cinfo;
enum omap_dss_clk_source dsi_clk_source[MAX_NUM_DSI];
enum omap_dss_clk_source dispc_clk_source;
enum omap_dss_clk_source lcd_clk_source[MAX_DSS_LCD_MANAGERS];
bool ctx_valid;
u32 ctx[DSS_SZ_REGS / sizeof(u32)];
const struct dss_features *feat;
struct dss_pll *video1_pll;
struct dss_pll *video2_pll;
} dss;
static const char * const dss_generic_clk_source_names[] = {
[OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC] = "DSI_PLL_HSDIV_DISPC",
[OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI] = "DSI_PLL_HSDIV_DSI",
[OMAP_DSS_CLK_SRC_FCK] = "DSS_FCK",
[OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC] = "DSI_PLL2_HSDIV_DISPC",
[OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI] = "DSI_PLL2_HSDIV_DSI",
};
static bool dss_initialized;
bool omapdss_is_initialized(void)
{
return dss_initialized;
}
EXPORT_SYMBOL(omapdss_is_initialized);
static inline void dss_write_reg(const struct dss_reg idx, u32 val)
{
__raw_writel(val, dss.base + idx.idx);
}
static inline u32 dss_read_reg(const struct dss_reg idx)
{
return __raw_readl(dss.base + idx.idx);
}
#define SR(reg) \
dss.ctx[(DSS_##reg).idx / sizeof(u32)] = dss_read_reg(DSS_##reg)
#define RR(reg) \
dss_write_reg(DSS_##reg, dss.ctx[(DSS_##reg).idx / sizeof(u32)])
static void dss_save_context(void)
{
DSSDBG("dss_save_context\n");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/io.h`, `linux/export.h`, `linux/err.h`, `linux/delay.h`, `linux/seq_file.h`, `linux/clk.h`.
- Detected declarations: `struct dss_reg`, `struct dss_features`, `function omapdss_is_initialized`, `function dss_write_reg`, `function dss_read_reg`, `function dss_save_context`, `function dss_restore_context`, `function dss_ctrl_pll_enable`, `function dss_ctrl_pll_set_control_mux`, `function dss_sdi_init`.
- Atlas domain: Driver Families / drivers/video.
- Implementation status: integration 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.