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.

Dependency Surface

Detected Declarations

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

Implementation Notes