drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c- Extension
.c- Size
- 109452 bytes
- Lines
- 3282
- 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
linux/delay.hdm_services.hbasics/dc_common.hdm_helpers.hcore_types.hresource.hdcn20/dcn20_resource.hdcn20_hwseq.hdce/dce_hwseq.hdcn20/dcn20_dsc.hdcn20/dcn20_optc.habm.hclk_mgr.hdmcu.hhubp.htiming_generator.hopp.hipp.hmpc.hmcif_wb.hdchubbub.hreg_helper.hdcn10/dcn10_cm_common.hdcn10/dcn10_hubbub.hvm_helper.hdccg.hdc_dmub_srv.hdce/dmub_hw_lock_mgr.hhw_sequencer.hdpcd_defs.hinc/link_enc_cfg.hlink_hwss.h
Detected Declarations
function filesfunction find_free_gsl_groupfunction dcn20_setup_gsl_group_as_lockfunction dcn20_set_flip_control_gslfunction dcn20_enable_power_gating_planefunction dcn20_dccg_initfunction dcn20_disable_vgafunction dcn20_program_triple_bufferfunction dcn20_init_blankfunction dcn20_dsc_pg_controlfunction dcn20_dpp_pg_controlfunction dcn20_hubp_pg_controlfunction dcn20_plane_atomic_disablefunction dcn20_disable_planefunction dcn20_disable_pixel_datafunction calc_mpc_flow_ctrl_cntfunction get_phyd32clk_srcfunction get_odm_segment_countfunction dcn20_enable_stream_timingfunction dcn20_program_output_cscfunction dcn20_set_output_transfer_funcfunction dcn20_set_blend_lutfunction dcn20_set_shaper_3dlutfunction dcn20_set_input_transfer_funcfunction dcn20_update_odmfunction dcn20_blank_pixel_datafunction dcn20_power_on_plane_resourcesfunction dcn20_enable_planefunction dcn20_pipe_control_lockfunction dcn20_detect_pipe_changesfunction dcn20_update_dchubp_dppfunction dcn20_calculate_vready_offset_for_groupfunction dcn20_program_tgfunction dcn20_program_pipefunction dcn20_program_front_end_for_ctxfunction herefunction dcn20_post_unlock_reset_oppfunction dcn20_post_unlock_program_front_endfunction dcn20_prepare_bandwidthfunction dcn20_optimize_bandwidthfunction dcn20_update_bandwidthfunction dcn20_enable_writebackfunction dcn20_disable_writebackfunction dcn20_wait_for_blank_completefunction dcn20_dmdata_status_donefunction dcn20_disable_stream_gatingfunction dcn20_enable_stream_gatingfunction dcn20_set_dmdata_attributes
Annotated Snippet
if (dpp->funcs->dpp_get_gamut_remap) {
dpp->funcs->dpp_get_gamut_remap(dpp, &s.gamut_remap);
is_gamut_remap_available = true;
}
if (!s.is_enabled)
continue;
DTN_INFO("[%2d]: %8s %11s %10s %15s %10s %9s",
dpp->inst,
(s.dgam_lut_mode == 0) ? "Bypass" :
((s.dgam_lut_mode == 1) ? "sRGB" :
((s.dgam_lut_mode == 2) ? "Ycc" :
((s.dgam_lut_mode == 3) ? "RAM" :
((s.dgam_lut_mode == 4) ? "RAM" :
"Unknown")))),
(s.shaper_lut_mode == 1) ? "RAM A" :
((s.shaper_lut_mode == 2) ? "RAM B" :
"Bypass"),
(s.lut3d_mode == 1) ? "RAM A" :
((s.lut3d_mode == 2) ? "RAM B" :
"Bypass"),
(s.lut3d_bit_depth <= 0) ? "12-bit" : "10-bit",
(s.lut3d_size == 0) ? "17x17x17" : "9x9x9",
(s.rgam_lut_mode == 1) ? "RAM A" :
((s.rgam_lut_mode == 1) ? "RAM B" : "Bypass"));
if (is_gamut_remap_available) {
DTN_INFO(" %12s "
"%010lld %010lld %010lld %010lld "
"%010lld %010lld %010lld %010lld "
"%010lld %010lld %010lld %010lld",
(s.gamut_remap.gamut_adjust_type == 0) ? "Bypass" :
((s.gamut_remap.gamut_adjust_type == 1) ? "HW" :
"SW"),
s.gamut_remap.temperature_matrix[0].value,
s.gamut_remap.temperature_matrix[1].value,
s.gamut_remap.temperature_matrix[2].value,
s.gamut_remap.temperature_matrix[3].value,
s.gamut_remap.temperature_matrix[4].value,
s.gamut_remap.temperature_matrix[5].value,
s.gamut_remap.temperature_matrix[6].value,
s.gamut_remap.temperature_matrix[7].value,
s.gamut_remap.temperature_matrix[8].value,
s.gamut_remap.temperature_matrix[9].value,
s.gamut_remap.temperature_matrix[10].value,
s.gamut_remap.temperature_matrix[11].value);
}
DTN_INFO("\n");
}
DTN_INFO("\n");
DTN_INFO("DPP Color Caps: input_lut_shared:%d icsc:%d"
" dgam_ram:%d dgam_rom: srgb:%d,bt2020:%d,gamma2_2:%d,pq:%d,hlg:%d"
" post_csc:%d gamcor:%d dgam_rom_for_yuv:%d 3d_lut:%d"
" blnd_lut:%d oscs:%d\n\n",
dc->caps.color.dpp.input_lut_shared,
dc->caps.color.dpp.icsc,
dc->caps.color.dpp.dgam_ram,
dc->caps.color.dpp.dgam_rom_caps.srgb,
dc->caps.color.dpp.dgam_rom_caps.bt2020,
dc->caps.color.dpp.dgam_rom_caps.gamma2_2,
dc->caps.color.dpp.dgam_rom_caps.pq,
dc->caps.color.dpp.dgam_rom_caps.hlg,
dc->caps.color.dpp.post_csc,
dc->caps.color.dpp.gamma_corr,
dc->caps.color.dpp.dgam_rom_for_yuv,
dc->caps.color.dpp.hw_3d_lut,
dc->caps.color.dpp.ogam_ram,
dc->caps.color.dpp.ocsc);
DTN_INFO("MPCC: OPP DPP MPCCBOT MODE ALPHA_MODE PREMULT OVERLAP_ONLY IDLE"
" OGAM mode\n");
for (i = 0; i < pool->mpcc_count; i++) {
struct mpcc_state s = {0};
pool->mpc->funcs->read_mpcc_state(pool->mpc, i, &s);
if (s.opp_id != 0xf)
DTN_INFO("[%2d]: %2xh %2xh %6xh %4d %10d %7d %12d %4d %9s\n",
i, s.opp_id, s.dpp_id, s.bot_mpcc_id,
s.mode, s.alpha_mode, s.pre_multiplied_alpha, s.overlap_only,
s.idle,
(s.rgam_mode == 1) ? "RAM A" :
((s.rgam_mode == 2) ? "RAM B" :
"Bypass"));
}
DTN_INFO("\n");
DTN_INFO("MPC Color Caps: gamut_remap:%d, 3dlut:%d, ogam_ram:%d, ocsc:%d\n\n",
Annotation
- Immediate include surface: `linux/delay.h`, `dm_services.h`, `basics/dc_common.h`, `dm_helpers.h`, `core_types.h`, `resource.h`, `dcn20/dcn20_resource.h`, `dcn20_hwseq.h`.
- Detected declarations: `function files`, `function find_free_gsl_group`, `function dcn20_setup_gsl_group_as_lock`, `function dcn20_set_flip_control_gsl`, `function dcn20_enable_power_gating_plane`, `function dcn20_dccg_init`, `function dcn20_disable_vga`, `function dcn20_program_triple_buffer`, `function dcn20_init_blank`, `function dcn20_dsc_pg_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.