drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c- Extension
.c- Size
- 62926 bytes
- Lines
- 1837
- 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.
- 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.hclk_mgr.hreg_helper.hdcn10/dcn10_hubbub.habm.hhubp.hdchubbub.htiming_generator.hopp.hipp.hmpc.hmcif_wb.hdc_dmub_srv.hdcn35_hwseq.hdcn35/dcn35_dccg.hlink_hwss.hdpcd_defs.hdce/dmub_outbox.hlink_service.hdcn10/dcn10_hwseq.hinc/link_enc_cfg.hdcn30/dcn30_vpg.hdce/dce_i2c_hw.hdsc.hdio/dcn10/dcn10_dio.hdcn20/dcn20_optc.hdcn30/dcn30_cm_common.h
Detected Declarations
function filesfunction print_pg_statusfunction dcn35_set_dmu_fgcgfunction dcn35_setup_hpo_hw_controlfunction dcn35_init_hwfunction update_dsc_on_streamfunction get_odm_configfunction dcn35_update_odmfunction dcn35_dpp_root_clock_controlfunction dcn35_dpstream_root_clock_controlfunction dcn35_hdmistream_root_clock_controlfunction dcn35_physymclk_root_clock_controlfunction dcn35_power_down_on_bootfunction dcn35_apply_idle_power_optimizationsfunction dcn35_z10_restorefunction dcn35_init_pipesfunction dcn35_enable_planefunction dcn35_plane_atomic_disablefunction dcn35_disable_planefunction dcn35_calc_blocks_to_gatefunction dcn35_calc_blocks_to_ungatefunction dcn35_hw_block_power_downfunction dcn35_hw_block_power_upfunction dcn35_root_clock_controlfunction dcn35_prepare_bandwidthfunction dcn35_optimize_bandwidthfunction dcn35_set_drrfunction dcn35_set_static_screen_controlfunction dcn35_set_long_vblankfunction should_avoid_empty_tufunction dcn35_is_dp_dig_pixel_rate_div_policyfunction dcn35_calc_blocks_to_ungate_for_hw_releasefunction dcn35_hardware_releasefunction dcn35_abort_cursor_offload_updatefunction dcn35_begin_cursor_offload_updatefunction dcn35_commit_cursor_offload_updatefunction dcn35_update_cursor_offload_pipefunction dcn35_notify_cursor_offload_drr_updatefunction dcn35_program_cursor_offload_nowfunction disable_link_output_symclk_on_tx_offfunction dcn35_disable_link_output
Annotated Snippet
if (dc->debug.disable_dmcu || dc->config.disable_dmcu) {
REG_UPDATE(DMU_MEM_PWR_CNTL, DMCU_ERAM_MEM_PWR_FORCE, 3);
}
}
/*dcn35 has default MEM_PWR enabled, make sure wake them up*/
// Set default OPTC memory power states
if (dc->debug.enable_mem_low_power.bits.optc) {
// Shutdown when unassigned and light sleep in VBLANK
REG_SET_2(ODM_MEM_PWR_CTRL3, 0, ODM_MEM_UNASSIGNED_PWR_MODE, 3, ODM_MEM_VBLANK_PWR_MODE, 1);
}
if (dc->debug.enable_mem_low_power.bits.vga) {
// Power down VGA memory
REG_UPDATE(MMHUBBUB_MEM_PWR_CNTL, VGA_MEM_PWR_FORCE, 1);
}
if (dc->debug.enable_mem_low_power.bits.mpc &&
dc->res_pool->mpc->funcs->set_mpc_mem_lp_mode)
dc->res_pool->mpc->funcs->set_mpc_mem_lp_mode(dc->res_pool->mpc);
if (dc->debug.enable_mem_low_power.bits.vpg && dc->res_pool->stream_enc[0]->vpg->funcs->vpg_powerdown) {
// Power down VPGs
for (i = 0; i < dc->res_pool->stream_enc_count; i++)
dc->res_pool->stream_enc[i]->vpg->funcs->vpg_powerdown(dc->res_pool->stream_enc[i]->vpg);
#if defined(CONFIG_DRM_AMD_DC_DP2_0)
for (i = 0; i < dc->res_pool->hpo_dp_stream_enc_count; i++)
dc->res_pool->hpo_dp_stream_enc[i]->vpg->funcs->vpg_powerdown(dc->res_pool->hpo_dp_stream_enc[i]->vpg);
#endif
for (i = 0; i < dc->res_pool->hpo_frl_stream_enc_count; i++)
dc->res_pool->hpo_frl_stream_enc[i]->vpg->funcs->vpg_powerdown(dc->res_pool->hpo_frl_stream_enc[i]->vpg);
}
}
#endif
static void print_pg_status(struct dc *dc, const char *debug_func, const char *debug_log)
{
if (dc->debug.enable_pg_cntl_debug_logs && dc->res_pool->pg_cntl) {
if (dc->res_pool->pg_cntl->funcs->print_pg_status)
dc->res_pool->pg_cntl->funcs->print_pg_status(dc->res_pool->pg_cntl, debug_func, debug_log);
}
}
void dcn35_set_dmu_fgcg(struct dce_hwseq *hws, bool enable)
{
REG_UPDATE_3(DMU_CLK_CNTL,
RBBMIF_FGCG_REP_DIS, !enable,
IHC_FGCG_REP_DIS, !enable,
LONO_FGCG_REP_DIS, !enable
);
}
void dcn35_setup_hpo_hw_control(const struct dce_hwseq *hws, bool enable)
{
REG_UPDATE(HPO_TOP_HW_CONTROL, HPO_IO_EN, !!enable);
}
void dcn35_init_hw(struct dc *dc)
{
struct abm **abms = dc->res_pool->multiple_abms;
struct dce_hwseq *hws = dc->hwseq;
struct dc_bios *dcb = dc->ctx->dc_bios;
struct resource_pool *res_pool = dc->res_pool;
uint32_t backlight = MAX_BACKLIGHT_LEVEL;
uint32_t user_level = MAX_BACKLIGHT_LEVEL;
unsigned int i;
print_pg_status(dc, __func__, ": start");
if (dc->clk_mgr && dc->clk_mgr->funcs->init_clocks)
dc->clk_mgr->funcs->init_clocks(dc->clk_mgr);
//dcn35_set_dmu_fgcg(hws, dc->debug.enable_fine_grain_clock_gating.bits.dmu);
if (!dcb->funcs->is_accelerated_mode(dcb)) {
/*this calls into dmubfw to do the init*/
hws->funcs.bios_golden_init(dc);
}
// Initialize the dccg
if (res_pool->dccg->funcs->dccg_init)
res_pool->dccg->funcs->dccg_init(res_pool->dccg);
//enable_memory_low_power(dc);
if (dc->ctx->dc_bios->fw_info_valid) {
res_pool->ref_clocks.xtalin_clock_inKhz =
dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
if (res_pool->hubbub) {
Annotation
- Immediate include surface: `dm_services.h`, `dm_helpers.h`, `core_types.h`, `resource.h`, `dccg.h`, `dce/dce_hwseq.h`, `clk_mgr.h`, `reg_helper.h`.
- Detected declarations: `function files`, `function print_pg_status`, `function dcn35_set_dmu_fgcg`, `function dcn35_setup_hpo_hw_control`, `function dcn35_init_hw`, `function update_dsc_on_stream`, `function get_odm_config`, `function dcn35_update_odm`, `function dcn35_dpp_root_clock_control`, `function dcn35_dpstream_root_clock_control`.
- 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.