drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c- Extension
.c- Size
- 52760 bytes
- Lines
- 1569
- 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.hdm_helpers.hcore_types.hresource.hdccg.hdce/dce_hwseq.hdcn30/dcn30_cm_common.hreg_helper.habm.hhubp.hdchubbub.htiming_generator.hopp.hipp.hmpc.hmcif_wb.hdc_dmub_srv.hlink_hwss.hdpcd_defs.hdcn401/dcn401_hwseq.hdcn42_hwseq.hclk_mgr.hdsc.hdcn20/dcn20_optc.hdce/dmub_hw_lock_mgr.hdcn42/dcn42_resource.hlink_service.h../dcn10/dcn10_hwseq.h../dcn20/dcn20_hwseq.hdc_state_priv.hdc_stream_priv.hdcn35/dcn35_hwseq.h
Detected Declarations
function print_pg_statusfunction dcn42_init_hwfunction dcn42_update_mpccfunction dcn42_program_cm_histfunction dc_get_lut_xbarfunction dc_get_lut_modefunction dc_get_lut_formatfunction dc_is_rmcm_3dlut_supportedfunction is_rmcm_3dlut_fl_supportedfunction dcn42_set_mcm_location_post_blendfunction dcn42_get_mcm_lut_xable_from_pipe_ctxfunction fl_get_lut_modefunction dcn42_program_rmcm_lutsfunction dcn42_populate_mcm_lutsfunction is_rmcm_3dlut_fl_supportedfunction dcn42_set_mcm_lutsfunction dcn42_hardware_releasefunction count_active_streamsfunction dcn42_calc_blocks_to_gatefunction dcn42_prepare_bandwidthfunction dcn42_optimize_bandwidthfunction dcn42_calc_blocks_to_ungatefunction dcn42_hw_block_power_downfunction dcn42_hw_block_power_upfunction dcn42_root_clock_controlfunction dcn42_setup_stereofunction dcn42_dmub_hw_control_lockfunction dcn42_dmub_hw_control_lock_fastfunction dcn42_power_down_on_boot
Annotated Snippet
if (res_pool->hubbub) {
(res_pool->dccg->funcs->get_dccg_ref_freq)(res_pool->dccg,
dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency,
&res_pool->ref_clocks.dccg_ref_clock_inKhz);
current_dchub_ref_freq = res_pool->ref_clocks.dchub_ref_clock_inKhz / 1000;
(res_pool->hubbub->funcs->get_dchub_ref_freq)(res_pool->hubbub,
res_pool->ref_clocks.dccg_ref_clock_inKhz,
&res_pool->ref_clocks.dchub_ref_clock_inKhz);
} else {
// Not all ASICs have DCCG sw component
res_pool->ref_clocks.dccg_ref_clock_inKhz =
res_pool->ref_clocks.xtalin_clock_inKhz;
res_pool->ref_clocks.dchub_ref_clock_inKhz =
res_pool->ref_clocks.xtalin_clock_inKhz;
}
} else
ASSERT_CRITICAL(false);
for (i = 0; i < dc->link_count; i++) {
/* Power up AND update implementation according to the
* required signal (which may be different from the
* default signal on connector).
*/
struct dc_link *link = dc->links[i];
if (link->ep_type != DISPLAY_ENDPOINT_PHY)
continue;
link->link_enc->funcs->hw_init(link->link_enc);
/* Check for enabled DIG to identify enabled display */
if (link->link_enc->funcs->is_dig_enabled &&
link->link_enc->funcs->is_dig_enabled(link->link_enc)) {
link->link_status.link_active = true;
link->phy_state.symclk_state = SYMCLK_ON_TX_ON;
if (link->link_enc->funcs->fec_is_active &&
link->link_enc->funcs->fec_is_active(link->link_enc))
link->fec_state = dc_link_fec_enabled;
}
}
/* enable_power_gating_plane before dsc_pg_control because
* FORCEON = 1 with hw default value on bootup, resume from s3
*/
if (hws->funcs.enable_power_gating_plane)
hws->funcs.enable_power_gating_plane(dc->hwseq, true);
/* we want to turn off all dp displays before doing detection */
dc->link_srv->blank_all_dp_displays(dc);
/* If taking control over from VBIOS, we may want to optimize our first
* mode set, so we need to skip powering down pipes until we know which
* pipes we want to use.
* Otherwise, if taking control is not possible, we need to power
* everything down.
*/
if (dcb->funcs->is_accelerated_mode(dcb) || !dc->config.seamless_boot_edp_requested) {
/* Disable boot optimizations means power down everything including PHY, DIG,
* and OTG (i.e. the boot is not optimized because we do a full power down).
*/
if (dc->hwss.enable_accelerated_mode && dc->debug.disable_boot_optimizations)
dc->hwss.enable_accelerated_mode(dc, dc->current_state);
else
hws->funcs.init_pipes(dc, dc->current_state);
if (dc->res_pool->hubbub->funcs->allow_self_refresh_control)
dc->res_pool->hubbub->funcs->allow_self_refresh_control(dc->res_pool->hubbub,
!dc->res_pool->hubbub->ctx->dc->debug.disable_stutter);
}
/* In headless boot cases, DIG may be turned
* on which causes HW/SW discrepancies.
* To avoid this, power down hardware on boot
* if DIG is turned on and seamless boot not enabled
*/
if (!dc->config.seamless_boot_edp_requested) {
struct dc_link *edp_links[MAX_NUM_EDP];
struct dc_link *edp_link;
dc_get_edp_links(dc, edp_links, &edp_num);
if (edp_num) {
for (i = 0; i < edp_num; i++) {
edp_link = edp_links[i];
if (edp_link->link_enc->funcs->is_dig_enabled &&
edp_link->link_enc->funcs->is_dig_enabled(edp_link->link_enc) &&
dc->hwss.edp_backlight_control &&
hws->funcs.power_down &&
Annotation
- Immediate include surface: `dm_services.h`, `dm_helpers.h`, `core_types.h`, `resource.h`, `dccg.h`, `dce/dce_hwseq.h`, `dcn30/dcn30_cm_common.h`, `reg_helper.h`.
- Detected declarations: `function print_pg_status`, `function dcn42_init_hw`, `function dcn42_update_mpcc`, `function dcn42_program_cm_hist`, `function dc_get_lut_xbar`, `function dc_get_lut_mode`, `function dc_get_lut_format`, `function dc_is_rmcm_3dlut_supported`, `function is_rmcm_3dlut_fl_supported`, `function dcn42_set_mcm_location_post_blend`.
- 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.