drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h- Extension
.h- Size
- 4541 bytes
- Lines
- 173
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/interconnect.hdrm/drm_drv.hmsm_drv.hmsm_kms.hmsm_mmu.hmsm_gem.hdpu_hw_catalog.hdpu_hw_ctl.hdpu_hw_lm.hdpu_hw_interrupts.hdpu_hw_top.hdpu_rm.hdpu_core_perf.h
Detected Declarations
struct dpu_kmsstruct vsync_infostruct dpu_global_state
Annotated Snippet
struct dpu_kms {
struct msm_kms base;
struct drm_device *dev;
const struct dpu_mdss_cfg *catalog;
const struct qcom_ubwc_cfg_data *mdss;
/* io/register spaces: */
void __iomem *mmio, *vbif;
struct regulator *vdd;
struct regulator *mmagic;
struct regulator *venus;
struct dpu_hw_intr *hw_intr;
struct dpu_core_perf perf;
/*
* Global private object state, Do not access directly, use
* dpu_kms_global_get_state()
*/
struct drm_private_obj global_state;
struct dpu_rm rm;
struct dpu_hw_vbif *hw_vbif;
struct dpu_hw_mdp *hw_mdp;
bool has_danger_ctrl;
struct platform_device *pdev;
bool rpm_enabled;
struct clk_bulk_data *clocks;
size_t num_clocks;
/* reference count bandwidth requests, so we know when we can
* release bandwidth. Each atomic update increments, and frame-
* done event decrements. Additionally, for video mode, the
* reference is incremented when crtc is enabled, and decremented
* when disabled.
*/
atomic_t bandwidth_ref;
struct icc_path *path[2];
u32 num_paths;
};
struct vsync_info {
u32 frame_count;
u32 line_count;
};
#define DPU_ENC_WR_PTR_START_TIMEOUT_US 20000
#define DPU_ENC_MAX_POLL_TIMEOUT_US 2000
#define to_dpu_kms(x) container_of(x, struct dpu_kms, base)
#define to_dpu_global_state(x) container_of(x, struct dpu_global_state, base)
/* Global private object state for tracking resources that are shared across
* multiple kms objects (planes/crtcs/etc).
*/
struct dpu_global_state {
struct drm_private_state base;
struct dpu_rm *rm;
uint32_t pingpong_to_crtc_id[PINGPONG_MAX - PINGPONG_0];
uint32_t mixer_to_crtc_id[LM_MAX - LM_0];
uint32_t ctl_to_crtc_id[CTL_MAX - CTL_0];
uint32_t dspp_to_crtc_id[DSPP_MAX - DSPP_0];
uint32_t dsc_to_crtc_id[DSC_MAX - DSC_0];
uint32_t cdm_to_crtc_id;
uint32_t sspp_to_crtc_id[SSPP_MAX - SSPP_NONE];
uint32_t cwb_to_crtc_id[CWB_MAX - CWB_0];
};
struct dpu_global_state
*dpu_kms_get_existing_global_state(struct dpu_kms *dpu_kms);
struct dpu_global_state
*__must_check dpu_kms_get_global_state(struct drm_atomic_commit *s);
/**
* Debugfs functions - extra helper functions for debugfs support
*
* Main debugfs documentation is located at,
*
* Documentation/filesystems/debugfs.rst
Annotation
- Immediate include surface: `linux/interconnect.h`, `drm/drm_drv.h`, `msm_drv.h`, `msm_kms.h`, `msm_mmu.h`, `msm_gem.h`, `dpu_hw_catalog.h`, `dpu_hw_ctl.h`.
- Detected declarations: `struct dpu_kms`, `struct vsync_info`, `struct dpu_global_state`.
- 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.
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.