drivers/gpu/drm/msm/hdmi/hdmi.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/msm/hdmi/hdmi.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/msm/hdmi/hdmi.h- Extension
.h- Size
- 6051 bytes
- Lines
- 251
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/i2c.hlinux/clk.hlinux/platform_device.hlinux/regulator/consumer.hlinux/gpio/consumer.hlinux/hdmi.hdrm/drm_bridge.hmsm_drv.hhdmi.xml.h
Detected Declarations
struct hdmi_phystruct hdmi_platform_configstruct hdmi_audiostruct hdmi_hdcp_ctrlstruct hdmistruct hdmi_platform_configstruct hdmi_bridgestruct hdmi_phy_cfgstruct hdmi_phystruct hdmi_codec_daifmtstruct hdmi_codec_paramsenum hdmi_phy_typefunction hdmi_writefunction hdmi_readfunction hdmi_qfprom_readfunction hdmi_phy_writefunction hdmi_phy_readfunction msm_hdmi_pll_8960_initfunction msm_hdmi_pll_8996_initfunction msm_hdmi_pll_8998_initfunction msm_hdmi_hdcp_destroy
Annotated Snippet
struct hdmi_audio {
bool enabled;
int rate;
int channels;
};
struct hdmi_hdcp_ctrl;
struct hdmi {
struct drm_device *dev;
struct platform_device *pdev;
const struct hdmi_platform_config *config;
/* audio state: */
struct hdmi_audio audio;
/* video state: */
bool power_on;
bool hpd_enabled;
struct mutex state_mutex; /* protects two booleans */
unsigned long pixclock;
void __iomem *mmio;
void __iomem *qfprom_mmio;
phys_addr_t mmio_phy_addr;
struct regulator_bulk_data *pwr_regs;
struct clk_bulk_data *pwr_clks;
struct clk *extp_clk;
struct gpio_desc *hpd_gpiod;
struct hdmi_phy *phy;
struct device *phy_dev;
struct i2c_adapter *i2c;
struct drm_connector *connector;
struct drm_bridge *bridge;
struct drm_bridge *next_bridge;
/* the encoder we are hooked to (outside of hdmi block) */
struct drm_encoder *encoder;
int irq;
struct workqueue_struct *workq;
struct hdmi_hdcp_ctrl *hdcp_ctrl;
/*
* spinlock to protect registers shared by different execution
* REG_HDMI_CTRL
* REG_HDMI_DDC_ARBITRATION
* REG_HDMI_HDCP_INT_CTRL
* REG_HDMI_HPD_CTRL
*/
spinlock_t reg_lock;
};
/* platform config data (ie. from DT, or pdata) */
struct hdmi_platform_config {
/* regulators that need to be on for screen pwr: */
const char * const *pwr_reg_names;
int pwr_reg_cnt;
/* clks that need to be on: */
const char * const *pwr_clk_names;
int pwr_clk_cnt;
};
struct hdmi_bridge {
struct drm_bridge base;
struct hdmi *hdmi;
struct work_struct hpd_work;
};
#define to_hdmi_bridge(x) container_of(x, struct hdmi_bridge, base)
void msm_hdmi_set_mode(struct hdmi *hdmi, bool power_on);
static inline void hdmi_write(struct hdmi *hdmi, u32 reg, u32 data)
{
writel(data, hdmi->mmio + reg);
}
static inline u32 hdmi_read(struct hdmi *hdmi, u32 reg)
{
return readl(hdmi->mmio + reg);
}
Annotation
- Immediate include surface: `linux/i2c.h`, `linux/clk.h`, `linux/platform_device.h`, `linux/regulator/consumer.h`, `linux/gpio/consumer.h`, `linux/hdmi.h`, `drm/drm_bridge.h`, `msm_drv.h`.
- Detected declarations: `struct hdmi_phy`, `struct hdmi_platform_config`, `struct hdmi_audio`, `struct hdmi_hdcp_ctrl`, `struct hdmi`, `struct hdmi_platform_config`, `struct hdmi_bridge`, `struct hdmi_phy_cfg`, `struct hdmi_phy`, `struct hdmi_codec_daifmt`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source 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.