drivers/gpu/drm/radeon/r600_hdmi.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/radeon/r600_hdmi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/radeon/r600_hdmi.c- Extension
.c- Size
- 15112 bytes
- Lines
- 515
- 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/hdmi.hlinux/gcd.hdrm/radeon_drm.hradeon.hradeon_asic.hradeon_audio.hr600.hr600d.hatom.h
Detected Declarations
enum r600_hdmi_color_formatenum r600_hdmi_iec_status_bitsfunction r600_audio_statusfunction r600_audio_update_hdmifunction list_for_each_entryfunction r600_audio_enablefunction r600_hdmi_update_acrfunction r600_set_avi_packetfunction r600_hdmi_update_audio_infoframefunction r600_hdmi_is_audio_buffer_filledfunction r600_hdmi_buffer_status_changedfunction r600_hdmi_audio_set_dtofunction r600_set_vbi_packetfunction r600_set_audio_packetfunction r600_set_mutefunction r600_hdmi_update_audio_settingsfunction r600_hdmi_enable
Annotated Snippet
switch (radeon_encoder->encoder_id) {
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1:
if (enable) {
WREG32_OR(AVIVO_TMDSA_CNTL, AVIVO_TMDSA_CNTL_HDMI_EN);
hdmi |= HDMI0_STREAM(HDMI0_STREAM_TMDSA);
} else {
WREG32_AND(AVIVO_TMDSA_CNTL, ~AVIVO_TMDSA_CNTL_HDMI_EN);
}
break;
case ENCODER_OBJECT_ID_INTERNAL_LVTM1:
if (enable) {
WREG32_OR(AVIVO_LVTMA_CNTL, AVIVO_LVTMA_CNTL_HDMI_EN);
hdmi |= HDMI0_STREAM(HDMI0_STREAM_LVTMA);
} else {
WREG32_AND(AVIVO_LVTMA_CNTL, ~AVIVO_LVTMA_CNTL_HDMI_EN);
}
break;
case ENCODER_OBJECT_ID_INTERNAL_DDI:
if (enable) {
WREG32_OR(DDIA_CNTL, DDIA_HDMI_EN);
hdmi |= HDMI0_STREAM(HDMI0_STREAM_DDIA);
} else {
WREG32_AND(DDIA_CNTL, ~DDIA_HDMI_EN);
}
break;
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
if (enable)
hdmi |= HDMI0_STREAM(HDMI0_STREAM_DVOA);
break;
default:
dev_err(rdev->dev, "Invalid encoder for HDMI: 0x%X\n",
radeon_encoder->encoder_id);
break;
}
WREG32(HDMI0_CONTROL + dig->afmt->offset, hdmi);
}
if (rdev->irq.installed) {
/* if irq is available use it */
/* XXX: shouldn't need this on any asics. Double check DCE2/3 */
if (enable)
radeon_irq_kms_enable_afmt(rdev, dig->afmt->id);
else
radeon_irq_kms_disable_afmt(rdev, dig->afmt->id);
}
dig->afmt->enabled = enable;
DRM_DEBUG("%sabling HDMI interface @ 0x%04X for encoder 0x%x\n",
enable ? "En" : "Dis", dig->afmt->offset, radeon_encoder->encoder_id);
}
Annotation
- Immediate include surface: `linux/hdmi.h`, `linux/gcd.h`, `drm/radeon_drm.h`, `radeon.h`, `radeon_asic.h`, `radeon_audio.h`, `r600.h`, `r600d.h`.
- Detected declarations: `enum r600_hdmi_color_format`, `enum r600_hdmi_iec_status_bits`, `function r600_audio_status`, `function r600_audio_update_hdmi`, `function list_for_each_entry`, `function r600_audio_enable`, `function r600_hdmi_update_acr`, `function r600_set_avi_packet`, `function r600_hdmi_update_audio_infoframe`, `function r600_hdmi_is_audio_buffer_filled`.
- 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.