drivers/gpu/drm/amd/display/dc/dio/dcn10/dcn10_stream_encoder.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/dio/dcn10/dcn10_stream_encoder.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/dio/dcn10/dcn10_stream_encoder.c- Extension
.c- Size
- 47256 bytes
- Lines
- 1630
- 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
dm_services.hdc_bios_types.hdcn10_stream_encoder.hreg_helper.hhw_shared.hlink_service.hdpcd_defs.hdcn30/dcn30_afmt.hinclude/audio_types.h
Detected Declarations
function enc1_update_generic_info_packetfunction enc1_update_hdmi_info_packetfunction enc1_stream_encoder_dp_set_stream_attributefunction enc1_stream_encoder_set_stream_attribute_helperfunction enc1_stream_encoder_hdmi_set_stream_attributefunction enc1_stream_encoder_dvi_set_stream_attributefunction enc1_stream_encoder_set_throttled_vcp_sizefunction enc1_stream_encoder_update_hdmi_info_packetsfunction enc1_stream_encoder_stop_hdmi_info_packetsfunction enc1_stream_encoder_update_dp_info_packetsfunction enc1_stream_encoder_send_immediate_sdp_messagefunction enc1_stream_encoder_stop_dp_info_packetsfunction enc1_stream_encoder_dp_blankfunction enc1_stream_encoder_dp_unblankfunction enc1_stream_encoder_set_avmutefunction enc1_reset_hdmi_stream_attributefunction speakers_to_channelsfunction get_audio_clock_infofunction enc1_se_audio_setupfunction enc1_se_setup_hdmi_audiofunction enc1_se_setup_dp_audiofunction enc1_se_enable_audio_clockfunction enc1_se_enable_dp_audiofunction enc1_se_disable_dp_audiofunction enc1_se_audio_mute_controlfunction enc1_se_dp_audio_setupfunction enc1_se_dp_audio_enablefunction enc1_se_dp_audio_disablefunction enc1_se_hdmi_audio_setupfunction enc1_se_hdmi_audio_disablefunction enc1_setup_stereo_syncfunction enc1_dig_connect_to_otgfunction enc1_dig_source_otgfunction enc1_stream_encoder_dp_get_pixel_formatfunction dcn10_stream_encoder_construct
Annotated Snippet
if (crtc_timing->pixel_encoding == PIXEL_ENCODING_YCBCR422) {
REG_UPDATE_2(HDMI_CONTROL,
HDMI_DEEP_COLOR_DEPTH, 1,
HDMI_DEEP_COLOR_ENABLE, 0);
DC_LOG_DEBUG("HDMI source 30BPP deep color depth" \
"disabled for YCBCR422 pixel encoding\n");
} else {
REG_UPDATE_2(HDMI_CONTROL,
HDMI_DEEP_COLOR_DEPTH, 1,
HDMI_DEEP_COLOR_ENABLE, 1);
DC_LOG_DEBUG("HDMI source 30BPP deep color depth" \
"enabled for YCBCR422 non-pixel encoding\n");
}
break;
case COLOR_DEPTH_121212:
if (crtc_timing->pixel_encoding == PIXEL_ENCODING_YCBCR422) {
REG_UPDATE_2(HDMI_CONTROL,
HDMI_DEEP_COLOR_DEPTH, 2,
HDMI_DEEP_COLOR_ENABLE, 0);
DC_LOG_DEBUG("HDMI source 36BPP deep color depth" \
"disabled for YCBCR422 pixel encoding\n");
} else {
REG_UPDATE_2(HDMI_CONTROL,
HDMI_DEEP_COLOR_DEPTH, 2,
HDMI_DEEP_COLOR_ENABLE, 1);
DC_LOG_DEBUG("HDMI source 36BPP deep color depth" \
"enabled for non-pixel YCBCR422 encoding\n");
}
break;
case COLOR_DEPTH_161616:
REG_UPDATE_2(HDMI_CONTROL,
HDMI_DEEP_COLOR_DEPTH, 3,
HDMI_DEEP_COLOR_ENABLE, 1);
DC_LOG_DEBUG("HDMI source deep color depth enabled in" \
"reserved mode\n");
break;
default:
break;
}
if (actual_pix_clk_khz >= HDMI_CLOCK_CHANNEL_RATE_MORE_340M) {
/* enable HDMI data scrambler
* HDMI_CLOCK_CHANNEL_RATE_MORE_340M
* Clock channel frequency is 1/4 of character rate.
*/
REG_UPDATE_2(HDMI_CONTROL,
HDMI_DATA_SCRAMBLE_EN, 1,
HDMI_CLOCK_CHANNEL_RATE, 1);
} else if (crtc_timing->flags.LTE_340MCSC_SCRAMBLE) {
/* TODO: New feature for DCE11, still need to implement */
/* enable HDMI data scrambler
* HDMI_CLOCK_CHANNEL_FREQ_EQUAL_TO_CHAR_RATE
* Clock channel frequency is the same
* as character rate
*/
REG_UPDATE_2(HDMI_CONTROL,
HDMI_DATA_SCRAMBLE_EN, 1,
HDMI_CLOCK_CHANNEL_RATE, 0);
}
REG_UPDATE_3(HDMI_VBI_PACKET_CONTROL,
HDMI_GC_CONT, 1,
HDMI_GC_SEND, 1,
HDMI_NULL_SEND, 1);
REG_UPDATE(HDMI_VBI_PACKET_CONTROL, HDMI_ACP_SEND, 0);
/* following belongs to audio */
REG_UPDATE(HDMI_INFOFRAME_CONTROL0, HDMI_AUDIO_INFO_SEND, 1);
REG_UPDATE(AFMT_INFOFRAME_CONTROL0, AFMT_AUDIO_INFO_UPDATE, 1);
REG_UPDATE(HDMI_INFOFRAME_CONTROL1, HDMI_AUDIO_INFO_LINE,
VBI_LINE_0 + 2);
REG_UPDATE(HDMI_GC, HDMI_GC_AVMUTE, 0);
}
/* setup stream encoder in dvi mode */
void enc1_stream_encoder_dvi_set_stream_attribute(
struct stream_encoder *enc,
struct dc_crtc_timing *crtc_timing,
bool is_dual_link)
{
struct dcn10_stream_encoder *enc1 = DCN10STRENC_FROM_STRENC(enc);
struct bp_encoder_control cntl = {0};
Annotation
- Immediate include surface: `dm_services.h`, `dc_bios_types.h`, `dcn10_stream_encoder.h`, `reg_helper.h`, `hw_shared.h`, `link_service.h`, `dpcd_defs.h`, `dcn30/dcn30_afmt.h`.
- Detected declarations: `function enc1_update_generic_info_packet`, `function enc1_update_hdmi_info_packet`, `function enc1_stream_encoder_dp_set_stream_attribute`, `function enc1_stream_encoder_set_stream_attribute_helper`, `function enc1_stream_encoder_hdmi_set_stream_attribute`, `function enc1_stream_encoder_dvi_set_stream_attribute`, `function enc1_stream_encoder_set_throttled_vcp_size`, `function enc1_stream_encoder_update_hdmi_info_packets`, `function enc1_stream_encoder_stop_hdmi_info_packets`, `function enc1_stream_encoder_update_dp_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.