drivers/gpu/drm/exynos/exynos_hdmi.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/exynos/exynos_hdmi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/exynos/exynos_hdmi.c- Extension
.c- Size
- 57918 bytes
- Lines
- 2140
- 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
drm/exynos_drm.hlinux/clk.hlinux/component.hlinux/delay.hlinux/gpio/consumer.hlinux/hdmi.hlinux/i2c.hlinux/interrupt.hlinux/io.hlinux/irq.hlinux/kernel.hlinux/mfd/syscon.hlinux/of.hlinux/of_address.hlinux/of_graph.hlinux/platform_device.hlinux/pm_runtime.hlinux/regmap.hlinux/regulator/consumer.hlinux/wait.hsound/hdmi-codec.hmedia/cec-notifier.hdrm/drm_atomic_helper.hdrm/drm_bridge.hdrm/drm_edid.hdrm/drm_print.hdrm/drm_probe_helper.hdrm/drm_simple_kms_helper.hexynos_drm_crtc.hregs-hdmi.h
Detected Declarations
struct hdmiphy_configstruct hdmiphy_configsstruct string_array_specstruct hdmi_driver_datastruct hdmi_audiostruct hdmi_contextenum hdmi_typeenum hdmi_mapped_regsfunction hdmi_map_regfunction hdmi_reg_readfunction hdmi_reg_writebfunction hdmi_reg_writevfunction hdmi_reg_write_buffunction hdmi_reg_writemaskfunction hdmiphy_reg_write_buffunction hdmi_clk_enable_gatesfunction hdmi_clk_disable_gatesfunction hdmi_clk_set_parentsfunction hdmi_audio_infoframe_applyfunction hdmi_reg_infoframesfunction hdmi_detectfunction hdmi_connector_destroyfunction hdmi_get_modesfunction hdmi_find_phy_conffunction hdmi_mode_validfunction hdmi_create_connectorfunction hdmi_mode_fixupfunction hdmi_reg_acrfunction hdmi_audio_configfunction hdmi_audio_controlfunction hdmi_startfunction hdmi_conf_initfunction hdmiphy_wait_for_pllfunction hdmi_v13_mode_applyfunction hdmi_v14_mode_applyfunction hdmi_mode_applyfunction hdmiphy_conf_resetfunction hdmiphy_enable_mode_setfunction hdmiphy_conf_applyfunction hdmi_conf_applyfunction hdmi_set_refclkfunction hdmiphy_enablefunction hdmiphy_disablefunction hdmi_enablefunction hdmi_disablefunction hdmi_audio_shutdownfunction hdmi_audio_hw_paramsfunction hdmi_audio_mute
Annotated Snippet
struct hdmiphy_config {
int pixel_clock;
u8 conf[32];
};
struct hdmiphy_configs {
int count;
const struct hdmiphy_config *data;
};
struct string_array_spec {
int count;
const char * const *data;
};
#define INIT_ARRAY_SPEC(a) { .count = ARRAY_SIZE(a), .data = a }
struct hdmi_driver_data {
unsigned int type;
unsigned int is_apb_phy:1;
unsigned int has_sysreg:1;
struct hdmiphy_configs phy_confs;
struct string_array_spec clk_gates;
/*
* Array of triplets (p_off, p_on, clock), where p_off and p_on are
* required parents of clock when HDMI-PHY is respectively off or on.
*/
struct string_array_spec clk_muxes;
};
struct hdmi_audio {
struct platform_device *pdev;
struct hdmi_audio_infoframe infoframe;
struct hdmi_codec_params params;
bool mute;
};
struct hdmi_context {
struct drm_encoder encoder;
struct device *dev;
struct drm_device *drm_dev;
struct drm_connector connector;
bool dvi_mode;
struct delayed_work hotplug_work;
struct cec_notifier *notifier;
const struct hdmi_driver_data *drv_data;
void __iomem *regs;
void __iomem *regs_hdmiphy;
struct i2c_client *hdmiphy_port;
struct i2c_adapter *ddc_adpt;
struct gpio_desc *hpd_gpio;
int irq;
struct regmap *pmureg;
struct regmap *sysreg;
struct clk **clk_gates;
struct clk **clk_muxes;
struct regulator_bulk_data regul_bulk[ARRAY_SIZE(supply)];
struct regulator *reg_hdmi_en;
struct exynos_drm_clk phy_clk;
struct drm_bridge *bridge;
/* mutex protecting subsequent fields below */
struct mutex mutex;
struct hdmi_audio audio;
bool powered;
};
static inline struct hdmi_context *encoder_to_hdmi(struct drm_encoder *e)
{
return container_of(e, struct hdmi_context, encoder);
}
static inline struct hdmi_context *connector_to_hdmi(struct drm_connector *c)
{
return container_of(c, struct hdmi_context, connector);
}
static const struct hdmiphy_config hdmiphy_v13_configs[] = {
{
.pixel_clock = 27000000,
.conf = {
0x01, 0x05, 0x00, 0xD8, 0x10, 0x1C, 0x30, 0x40,
0x6B, 0x10, 0x02, 0x51, 0xDF, 0xF2, 0x54, 0x87,
0x84, 0x00, 0x30, 0x38, 0x00, 0x08, 0x10, 0xE0,
0x22, 0x40, 0xE3, 0x26, 0x00, 0x00, 0x00, 0x80,
},
},
{
.pixel_clock = 27027000,
Annotation
- Immediate include surface: `drm/exynos_drm.h`, `linux/clk.h`, `linux/component.h`, `linux/delay.h`, `linux/gpio/consumer.h`, `linux/hdmi.h`, `linux/i2c.h`, `linux/interrupt.h`.
- Detected declarations: `struct hdmiphy_config`, `struct hdmiphy_configs`, `struct string_array_spec`, `struct hdmi_driver_data`, `struct hdmi_audio`, `struct hdmi_context`, `enum hdmi_type`, `enum hdmi_mapped_regs`, `function hdmi_map_reg`, `function hdmi_reg_read`.
- 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.