drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c- Extension
.c- Size
- 103230 bytes
- Lines
- 3658
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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/cleanup.hlinux/clk.hlinux/delay.hlinux/err.hlinux/export.hlinux/hdmi.hlinux/i2c.hlinux/irq.hlinux/module.hlinux/mutex.hlinux/of.hlinux/pinctrl/consumer.hlinux/regmap.hlinux/dma-mapping.hlinux/spinlock.hmedia/cec-notifier.hlinux/media-bus-format.hlinux/videodev2.hdrm/bridge/dw_hdmi.hdrm/display/drm_hdmi_helper.hdrm/display/drm_scdc_helper.hdrm/drm_atomic.hdrm/drm_atomic_helper.hdrm/drm_bridge.hdrm/drm_edid.hdrm/drm_of.hdrm/drm_print.hdrm/drm_probe_helper.hdw-hdmi-audio.hdw-hdmi-cec.hdw-hdmi.h
Detected Declarations
struct hdmi_vmodestruct hdmi_data_infostruct dw_hdmi_i2cstruct dw_hdmi_phy_datastruct dw_hdmifunction hdmi_writebfunction hdmi_readbfunction handle_plugged_changefunction dw_hdmi_set_plugged_cbfunction hdmi_modbfunction hdmi_mask_writebfunction dw_hdmi_i2c_initfunction dw_hdmi_i2c_unwedgefunction dw_hdmi_i2c_waitfunction dw_hdmi_i2c_readfunction dw_hdmi_i2c_writefunction dw_hdmi_i2c_xferfunction dw_hdmi_i2c_funcfunction hdmi_set_cts_nfunction hdmi_compute_nfunction DMAfunction hdmi_set_clk_regeneratorfunction hdmi_init_clk_regeneratorfunction hdmi_clk_regenerator_update_pixel_clockfunction dw_hdmi_set_sample_widthfunction dw_hdmi_set_sample_non_pcmfunction dw_hdmi_set_sample_iec958function dw_hdmi_set_sample_ratefunction dw_hdmi_set_channel_countfunction dw_hdmi_set_channel_allocationfunction hdmi_enable_audio_clkfunction dw_hdmi_gp_audio_enablefunction dw_hdmi_gp_audio_disablefunction dw_hdmi_ahb_audio_enablefunction dw_hdmi_ahb_audio_disablefunction dw_hdmi_i2s_audio_enablefunction dw_hdmi_i2s_audio_disablefunction dw_hdmi_audio_enablefunction dw_hdmi_audio_disablefunction hdmi_bus_fmt_is_rgbfunction hdmi_bus_fmt_is_yuv444function hdmi_bus_fmt_is_yuv422function hdmi_bus_fmt_is_yuv420function hdmi_bus_fmt_color_depthfunction hdmi_video_samplefunction is_color_space_conversionfunction is_color_space_decimationfunction is_color_space_interpolation
Annotated Snippet
struct hdmi_vmode {
bool mdataenablepolarity;
unsigned int mpixelclock;
unsigned int mpixelrepetitioninput;
unsigned int mpixelrepetitionoutput;
unsigned int mtmdsclock;
};
struct hdmi_data_info {
unsigned int enc_in_bus_format;
unsigned int enc_out_bus_format;
unsigned int enc_in_encoding;
unsigned int enc_out_encoding;
unsigned int pix_repet_factor;
unsigned int hdcp_enable;
struct hdmi_vmode video_mode;
bool rgb_limited_range;
};
struct dw_hdmi_i2c {
struct i2c_adapter adap;
struct mutex lock; /* used to serialize data transfers */
struct completion cmp;
u8 stat;
u8 slave_reg;
bool is_regaddr;
bool is_segment;
};
struct dw_hdmi_phy_data {
enum dw_hdmi_phy_type type;
const char *name;
unsigned int gen;
bool has_svsret;
int (*configure)(struct dw_hdmi *hdmi,
const struct dw_hdmi_plat_data *pdata,
unsigned long mpixelclock);
};
struct dw_hdmi {
struct drm_connector connector;
struct drm_bridge bridge;
unsigned int version;
struct platform_device *audio;
struct platform_device *cec;
struct device *dev;
struct dw_hdmi_i2c *i2c;
struct hdmi_data_info hdmi_data;
const struct dw_hdmi_plat_data *plat_data;
int vic;
u8 edid[HDMI_EDID_LEN];
struct {
const struct dw_hdmi_phy_ops *ops;
const char *name;
void *data;
bool enabled;
} phy;
struct drm_display_mode previous_mode;
struct i2c_adapter *ddc;
void __iomem *regs;
bool sink_is_hdmi;
bool sink_has_audio;
struct pinctrl *pinctrl;
struct pinctrl_state *default_state;
struct pinctrl_state *unwedge_state;
struct mutex mutex; /* for state below and previous_mode */
enum drm_connector_force force; /* mutex-protected force state */
struct drm_connector *curr_conn;/* current connector (only valid when !disabled) */
bool disabled; /* DRM has disabled our bridge */
bool bridge_is_on; /* indicates the bridge is on */
bool rxsense; /* rxsense state */
u8 phy_mask; /* desired phy int mask settings */
u8 mc_clkdis; /* clock disable register */
spinlock_t audio_lock;
struct mutex audio_mutex;
unsigned int sample_iec958;
Annotation
- Immediate include surface: `linux/cleanup.h`, `linux/clk.h`, `linux/delay.h`, `linux/err.h`, `linux/export.h`, `linux/hdmi.h`, `linux/i2c.h`, `linux/irq.h`.
- Detected declarations: `struct hdmi_vmode`, `struct hdmi_data_info`, `struct dw_hdmi_i2c`, `struct dw_hdmi_phy_data`, `struct dw_hdmi`, `function hdmi_writeb`, `function hdmi_readb`, `function handle_plugged_change`, `function dw_hdmi_set_plugged_cb`, `function hdmi_modb`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: integration 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.