drivers/gpu/drm/msm/dsi/dsi_host.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/msm/dsi/dsi_host.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/msm/dsi/dsi_host.c- Extension
.c- Size
- 72482 bytes
- Lines
- 2705
- 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.
- 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/clk.hlinux/delay.hlinux/dma-mapping.hlinux/err.hlinux/interrupt.hlinux/mfd/syscon.hlinux/of.hlinux/of_graph.hlinux/of_irq.hlinux/pinctrl/consumer.hlinux/pm_opp.hlinux/regmap.hlinux/regulator/consumer.hlinux/spinlock.hvideo/mipi_display.hdrm/display/drm_dsc_helper.hdrm/drm_of.hdsi.hdsi.xml.hsfpb.xml.hdsi_cfg.hmsm_dsc_helper.hmsm_kms.hmsm_gem.hphy/dsi_phy.h
Detected Declarations
struct msm_dsi_hostfunction dsi_get_versionfunction dsi_readfunction dsi_writefunction dsi_get_configfunction dsi_clk_init_v2function dsi_clk_init_6g_v2function dsi_clk_init_6g_v2_9function dsi_clk_initfunction msm_dsi_runtime_suspendfunction msm_dsi_runtime_resumefunction dsi_link_clk_set_rate_6gfunction dsi_link_clk_set_rate_6g_v2_9function dsi_link_clk_enable_6gfunction dsi_link_clk_set_rate_v2function dsi_link_clk_enable_v2function dsi_link_clk_disable_6gfunction dsi_link_clk_disable_v2function dsi_adjust_pclk_for_compressionfunction dsi_get_pclk_ratefunction dsi_byte_clk_get_ratefunction dsi_calc_pclkfunction dsi_calc_clk_rate_6gfunction dsi_calc_clk_rate_v2function dsi_intr_ctrlfunction dsi_get_traffic_modefunction dsi_get_vid_fmtfunction dsi_get_cmd_fmtfunction dsi_ctrl_disablefunction msm_dsi_host_version_geqfunction msm_dsi_host_is_wide_bus_enabledfunction dsi_ctrl_enablefunction dsi_update_dsc_timingfunction dsi_timing_setupfunction dsi_sw_resetfunction dsi_op_mode_configfunction dsi_set_tx_power_modefunction dsi_wait4video_donefunction dsi_wait4video_eng_busyfunction dsi_tx_buf_alloc_6gfunction dsi_tx_buf_alloc_v2function msm_dsi_tx_buf_freefunction dsi_tx_buf_put_6gfunction dsi_cmd_dma_addfunction dsi_short_read1_respfunction dsi_short_read2_respfunction dsi_long_read_respfunction dsi_dma_base_get_6g
Annotated Snippet
struct msm_dsi_host {
struct mipi_dsi_host base;
struct platform_device *pdev;
struct drm_device *dev;
int id;
void __iomem *ctrl_base;
phys_addr_t ctrl_size;
struct regulator_bulk_data *supplies;
int num_bus_clks;
struct clk_bulk_data bus_clks[DSI_BUS_CLK_MAX];
struct clk *byte_clk;
struct clk *esc_clk;
struct clk *pixel_clk;
struct clk *byte_intf_clk;
/*
* Clocks which needs to be properly parented between DISPCC and DSI PHY
* PLL:
*/
struct clk *byte_src_clk;
struct clk *pixel_src_clk;
struct clk *dsi_pll_byte_clk;
struct clk *dsi_pll_pixel_clk;
unsigned long byte_clk_rate;
unsigned long byte_intf_clk_rate;
unsigned long pixel_clk_rate;
unsigned long esc_clk_rate;
/* DSI v2 specific clocks */
struct clk *src_clk;
unsigned long src_clk_rate;
const struct msm_dsi_cfg_handler *cfg_hnd;
struct completion dma_comp;
struct completion video_comp;
struct mutex dev_mutex;
struct mutex cmd_mutex;
spinlock_t intr_lock; /* Protect interrupt ctrl register */
u32 err_work_state;
struct work_struct err_work;
struct workqueue_struct *workqueue;
/* DSI 6G TX buffer*/
struct drm_gem_object *tx_gem_obj;
struct drm_gpuvm *vm;
/* DSI v2 TX buffer */
void *tx_buf;
dma_addr_t tx_buf_paddr;
int tx_size;
u8 *rx_buf;
struct regmap *sfpb;
struct drm_display_mode *mode;
struct drm_dsc_config *dsc;
/* connected device info */
unsigned int channel;
unsigned int lanes;
enum mipi_dsi_pixel_format format;
unsigned long mode_flags;
/* lane data parsed via DT */
int dlane_swap;
int num_data_lanes;
/* from phy DT */
bool cphy_mode;
u32 dma_cmd_ctrl_restore;
bool registered;
bool power_on;
bool enabled;
int irq;
};
static inline u32 dsi_read(struct msm_dsi_host *msm_host, u32 reg)
Annotation
- Immediate include surface: `linux/clk.h`, `linux/delay.h`, `linux/dma-mapping.h`, `linux/err.h`, `linux/interrupt.h`, `linux/mfd/syscon.h`, `linux/of.h`, `linux/of_graph.h`.
- Detected declarations: `struct msm_dsi_host`, `function dsi_get_version`, `function dsi_read`, `function dsi_write`, `function dsi_get_config`, `function dsi_clk_init_v2`, `function dsi_clk_init_6g_v2`, `function dsi_clk_init_6g_v2_9`, `function dsi_clk_init`, `function msm_dsi_runtime_suspend`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source 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.