drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c- Extension
.c- Size
- 47197 bytes
- Lines
- 1603
- 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
dc_bios_types.hdce_stream_encoder.hreg_helper.hhw_shared.hinclude/audio_types.h
Detected Declarations
function dce110_update_generic_info_packetfunction dce110_update_hdmi_info_packetfunction dce110_stream_encoder_dp_set_stream_attributefunction dce110_stream_encoder_set_stream_attribute_helperfunction dce110_stream_encoder_hdmi_set_stream_attributefunction dce110_stream_encoder_dvi_set_stream_attributefunction dce110_stream_encoder_lvds_set_stream_attributefunction dce110_stream_encoder_set_throttled_vcp_sizefunction dce110_stream_encoder_update_hdmi_info_packetsfunction dce110_stream_encoder_stop_hdmi_info_packetsfunction dce110_stream_encoder_update_dp_info_packetsfunction dce110_stream_encoder_stop_dp_info_packetsfunction dce110_stream_encoder_dp_blankfunction dce110_stream_encoder_dp_unblankfunction dce110_stream_encoder_set_avmutefunction dce110_reset_hdmi_stream_attributefunction speakers_to_channelsfunction calc_max_audio_packets_per_linefunction get_audio_clock_infofunction dce110_se_audio_setupfunction dce110_se_setup_hdmi_audiofunction dce110_se_setup_dp_audiofunction dce110_se_enable_audio_clockfunction dce110_se_enable_dp_audiofunction dce110_se_disable_dp_audiofunction dce110_se_audio_mute_controlfunction dce110_se_dp_audio_setupfunction dce110_se_dp_audio_enablefunction dce110_se_dp_audio_disablefunction dce110_se_hdmi_audio_setupfunction dce110_se_hdmi_audio_disablefunction setup_stereo_syncfunction dig_connect_to_otgfunction dig_source_otgfunction dce110_stream_encoder_constructfunction dce110_analog_stream_encoder_construct
Annotated Snippet
switch (packet_index) {
case 0:
REG_UPDATE(AFMT_VBI_PACKET_CONTROL1,
AFMT_GENERIC0_FRAME_UPDATE, 1);
break;
case 1:
REG_UPDATE(AFMT_VBI_PACKET_CONTROL1,
AFMT_GENERIC1_FRAME_UPDATE, 1);
break;
case 2:
REG_UPDATE(AFMT_VBI_PACKET_CONTROL1,
AFMT_GENERIC2_FRAME_UPDATE, 1);
break;
case 3:
REG_UPDATE(AFMT_VBI_PACKET_CONTROL1,
AFMT_GENERIC3_FRAME_UPDATE, 1);
break;
case 4:
REG_UPDATE(AFMT_VBI_PACKET_CONTROL1,
AFMT_GENERIC4_FRAME_UPDATE, 1);
break;
case 5:
REG_UPDATE(AFMT_VBI_PACKET_CONTROL1,
AFMT_GENERIC5_FRAME_UPDATE, 1);
break;
case 6:
REG_UPDATE(AFMT_VBI_PACKET_CONTROL1,
AFMT_GENERIC6_FRAME_UPDATE, 1);
break;
case 7:
REG_UPDATE(AFMT_VBI_PACKET_CONTROL1,
AFMT_GENERIC7_FRAME_UPDATE, 1);
break;
default:
break;
}
}
}
static void dce110_update_hdmi_info_packet(
struct dce110_stream_encoder *enc110,
uint32_t packet_index,
const struct dc_info_packet *info_packet)
{
uint32_t cont, send, line;
if (info_packet->valid) {
dce110_update_generic_info_packet(
enc110,
packet_index,
info_packet);
/* enable transmission of packet(s) -
* packet transmission begins on the next frame */
cont = 1;
/* send packet(s) every frame */
send = 1;
/* select line number to send packets on */
line = 2;
} else {
cont = 0;
send = 0;
line = 0;
}
/* choose which generic packet control to use */
switch (packet_index) {
case 0:
REG_UPDATE_3(HDMI_GENERIC_PACKET_CONTROL0,
HDMI_GENERIC0_CONT, cont,
HDMI_GENERIC0_SEND, send,
HDMI_GENERIC0_LINE, line);
break;
case 1:
REG_UPDATE_3(HDMI_GENERIC_PACKET_CONTROL0,
HDMI_GENERIC1_CONT, cont,
HDMI_GENERIC1_SEND, send,
HDMI_GENERIC1_LINE, line);
break;
case 2:
REG_UPDATE_3(HDMI_GENERIC_PACKET_CONTROL1,
HDMI_GENERIC0_CONT, cont,
HDMI_GENERIC0_SEND, send,
HDMI_GENERIC0_LINE, line);
break;
case 3:
REG_UPDATE_3(HDMI_GENERIC_PACKET_CONTROL1,
HDMI_GENERIC1_CONT, cont,
HDMI_GENERIC1_SEND, send,
HDMI_GENERIC1_LINE, line);
Annotation
- Immediate include surface: `dc_bios_types.h`, `dce_stream_encoder.h`, `reg_helper.h`, `hw_shared.h`, `include/audio_types.h`.
- Detected declarations: `function dce110_update_generic_info_packet`, `function dce110_update_hdmi_info_packet`, `function dce110_stream_encoder_dp_set_stream_attribute`, `function dce110_stream_encoder_set_stream_attribute_helper`, `function dce110_stream_encoder_hdmi_set_stream_attribute`, `function dce110_stream_encoder_dvi_set_stream_attribute`, `function dce110_stream_encoder_lvds_set_stream_attribute`, `function dce110_stream_encoder_set_throttled_vcp_size`, `function dce110_stream_encoder_update_hdmi_info_packets`, `function dce110_stream_encoder_stop_hdmi_info_packets`.
- 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.