drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c- Extension
.c- Size
- 18284 bytes
- Lines
- 681
- 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.
- 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/clk.hlinux/hw_bitfield.hlinux/mfd/syscon.hlinux/module.hlinux/platform_device.hlinux/phy/phy.hlinux/regmap.hlinux/regulator/consumer.hdrm/bridge/dw_hdmi.hdrm/drm_edid.hdrm/drm_of.hdrm/drm_probe_helper.hdrm/drm_simple_kms_helper.hrockchip_drm_drv.h
Detected Declarations
struct rockchip_hdmi_chip_datastruct rockchip_hdmifunction rockchip_hdmi_parse_dtfunction dw_hdmi_rockchip_mode_validfunction dw_hdmi_rockchip_encoder_disablefunction dw_hdmi_rockchip_encoder_mode_setfunction dw_hdmi_rockchip_encoder_enablefunction dw_hdmi_rockchip_encoder_atomic_checkfunction dw_hdmi_rockchip_genphy_initfunction dw_hdmi_rockchip_genphy_disablefunction dw_hdmi_rk3228_setup_hpdfunction dw_hdmi_rk3328_read_hpdfunction dw_hdmi_rk3328_setup_hpdfunction dw_hdmi_rockchip_bindfunction dw_hdmi_bindfunction dw_hdmi_rockchip_unbindfunction dw_hdmi_rockchip_probefunction dw_hdmi_rockchip_removefunction dw_hdmi_rockchip_resume
Annotated Snippet
struct rockchip_hdmi_chip_data {
int lcdsel_grf_reg;
u32 lcdsel_big;
u32 lcdsel_lit;
int max_tmds_clock;
};
struct rockchip_hdmi {
struct device *dev;
struct regmap *regmap;
struct rockchip_encoder encoder;
const struct rockchip_hdmi_chip_data *chip_data;
const struct dw_hdmi_plat_data *plat_data;
struct clk *hdmiphy_clk;
struct clk *ref_clk;
struct clk *grf_clk;
struct dw_hdmi *hdmi;
struct phy *phy;
};
static struct rockchip_hdmi *to_rockchip_hdmi(struct drm_encoder *encoder)
{
struct rockchip_encoder *rkencoder = to_rockchip_encoder(encoder);
return container_of(rkencoder, struct rockchip_hdmi, encoder);
}
static const struct dw_hdmi_mpll_config rockchip_mpll_cfg[] = {
{
30666000, {
{ 0x00b3, 0x0000 },
{ 0x2153, 0x0000 },
{ 0x40f3, 0x0000 },
},
}, {
36800000, {
{ 0x00b3, 0x0000 },
{ 0x2153, 0x0000 },
{ 0x40a2, 0x0001 },
},
}, {
46000000, {
{ 0x00b3, 0x0000 },
{ 0x2142, 0x0001 },
{ 0x40a2, 0x0001 },
},
}, {
61333000, {
{ 0x0072, 0x0001 },
{ 0x2142, 0x0001 },
{ 0x40a2, 0x0001 },
},
}, {
73600000, {
{ 0x0072, 0x0001 },
{ 0x2142, 0x0001 },
{ 0x4061, 0x0002 },
},
}, {
92000000, {
{ 0x0072, 0x0001 },
{ 0x2145, 0x0002 },
{ 0x4061, 0x0002 },
},
}, {
122666000, {
{ 0x0051, 0x0002 },
{ 0x2145, 0x0002 },
{ 0x4061, 0x0002 },
},
}, {
147200000, {
{ 0x0051, 0x0002 },
{ 0x2145, 0x0002 },
{ 0x4064, 0x0003 },
},
}, {
184000000, {
{ 0x0051, 0x0002 },
{ 0x214c, 0x0003 },
{ 0x4064, 0x0003 },
},
}, {
226666000, {
{ 0x0040, 0x0003 },
{ 0x214c, 0x0003 },
{ 0x4064, 0x0003 },
},
}, {
272000000, {
Annotation
- Immediate include surface: `linux/clk.h`, `linux/hw_bitfield.h`, `linux/mfd/syscon.h`, `linux/module.h`, `linux/platform_device.h`, `linux/phy/phy.h`, `linux/regmap.h`, `linux/regulator/consumer.h`.
- Detected declarations: `struct rockchip_hdmi_chip_data`, `struct rockchip_hdmi`, `function rockchip_hdmi_parse_dt`, `function dw_hdmi_rockchip_mode_valid`, `function dw_hdmi_rockchip_encoder_disable`, `function dw_hdmi_rockchip_encoder_mode_set`, `function dw_hdmi_rockchip_encoder_enable`, `function dw_hdmi_rockchip_encoder_atomic_check`, `function dw_hdmi_rockchip_genphy_init`, `function dw_hdmi_rockchip_genphy_disable`.
- 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.