drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c- Extension
.c- Size
- 75505 bytes
- Lines
- 2808
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
dm_services.hdc.hdcn30/dcn30_init.hresource.hinclude/irq_service_interface.hdcn20/dcn20_resource.hdcn30_resource.hdcn10/dcn10_ipp.hdcn30/dcn30_hubbub.hdcn30/dcn30_mpc.hdcn30/dcn30_hubp.hirq/dcn30/irq_service_dcn30.hdcn30/dcn30_dpp.hdcn30/dcn30_optc.hdcn20/dcn20_hwseq.hdcn30/dcn30_hwseq.hdce110/dce110_hwseq.hdcn30/dcn30_opp.hdcn20/dcn20_dsc.hdcn30/dcn30_vpg.hdcn30/dcn30_afmt.hdcn30/dcn30_dio_stream_encoder.hdcn30/dcn30_hpo_frl_stream_encoder.hdcn30/dcn30_hpo_frl_link_encoder.hdcn30/dcn30_dio_link_encoder.hdce/dce_clock_source.hdce/dce_audio.hdce/dce_hwseq.hclk_mgr.hdio/virtual/virtual_stream_encoder.hdce110/dce110_resource.hdml/display_mode_vba.h
Detected Declarations
enum dcn30_clk_src_array_idfunction dcn30_dpp_destroyfunction read_dce_strapsfunction dcn30_resource_destructfunction dcn30_dwbc_createfunction dcn30_mmhubbub_createfunction dcn30_add_stream_to_ctxfunction dcn30_destroy_resource_poolfunction dcn30_populate_dml_pipes_from_contextfunction dcn30_populate_dml_writeback_from_contextfunction dcn30_calc_max_scaled_timefunction dcn30_set_mcif_arb_paramsfunction dcn30_acquire_post_bldn_3dlutfunction dcn30_release_post_bldn_3dlutfunction is_soc_bounding_box_validfunction init_soc_bounding_boxfunction dcn30_split_stream_for_mpc_or_odmfunction dcn30_internal_validate_bwfunction get_refresh_ratefunction get_frame_rate_at_max_stretch_100hzfunction is_refresh_rate_support_mclk_switch_using_fw_based_vblank_stretchfunction dcn30_can_support_mclk_switch_using_fw_based_vblank_stretchfunction dcn30_setup_mclk_switch_using_fw_based_vblank_stretchfunction dcn30_update_soc_for_wm_afunction dcn30_calculate_wm_and_dlgfunction dcn30_validate_bandwidthfunction dcn30_update_bw_bounding_boxfunction dcn30_get_panel_config_defaultsfunction read_pipe_fusesfunction dcn30_resource_construct
Annotated Snippet
if (pool->base.stream_enc[i] != NULL) {
if (pool->base.stream_enc[i]->vpg != NULL) {
kfree(DCN30_VPG_FROM_VPG(pool->base.stream_enc[i]->vpg));
pool->base.stream_enc[i]->vpg = NULL;
}
if (pool->base.stream_enc[i]->afmt != NULL) {
kfree(DCN30_AFMT_FROM_AFMT(pool->base.stream_enc[i]->afmt));
pool->base.stream_enc[i]->afmt = NULL;
}
kfree(DCN10STRENC_FROM_STRENC(pool->base.stream_enc[i]));
pool->base.stream_enc[i] = NULL;
}
}
for (i = 0; i < pool->base.hpo_frl_stream_enc_count; i++) {
if (pool->base.hpo_frl_stream_enc[i] != NULL) {
if (pool->base.hpo_frl_stream_enc[i]->vpg != NULL) {
kfree(DCN30_VPG_FROM_VPG(pool->base.hpo_frl_stream_enc[i]->vpg));
pool->base.hpo_frl_stream_enc[i]->vpg = NULL;
}
if (pool->base.hpo_frl_stream_enc[i]->afmt != NULL) {
kfree(DCN30_AFMT_FROM_AFMT(pool->base.hpo_frl_stream_enc[i]->afmt));
pool->base.hpo_frl_stream_enc[i]->afmt = NULL;
}
kfree(DCN30_HPO_FRL_STRENC_FROM_HPO_FRL_STRENC(pool->base.hpo_frl_stream_enc[i]));
pool->base.hpo_frl_stream_enc[i] = NULL;
}
}
for (i = 0; i < (unsigned int)pool->base.res_cap->num_dsc; i++) {
if (pool->base.dscs[i] != NULL)
dcn20_dsc_destroy(&pool->base.dscs[i]);
}
if (pool->base.mpc != NULL) {
kfree(TO_DCN20_MPC(pool->base.mpc));
pool->base.mpc = NULL;
}
if (pool->base.hubbub != NULL) {
kfree(pool->base.hubbub);
pool->base.hubbub = NULL;
}
if (pool->base.dio != NULL) {
kfree(TO_DCN10_DIO(pool->base.dio));
pool->base.dio = NULL;
}
for (i = 0; i < pool->base.pipe_count; i++) {
if (pool->base.dpps[i] != NULL)
dcn30_dpp_destroy(&pool->base.dpps[i]);
if (pool->base.ipps[i] != NULL)
pool->base.ipps[i]->funcs->ipp_destroy(&pool->base.ipps[i]);
if (pool->base.hubps[i] != NULL) {
kfree(TO_DCN20_HUBP(pool->base.hubps[i]));
pool->base.hubps[i] = NULL;
}
if (pool->base.irqs != NULL) {
dal_irq_service_destroy(&pool->base.irqs);
}
}
for (i = 0; i < (unsigned int)pool->base.res_cap->num_ddc; i++) {
if (pool->base.engines[i] != NULL)
dce110_engine_destroy(&pool->base.engines[i]);
if (pool->base.hw_i2cs[i] != NULL) {
kfree(pool->base.hw_i2cs[i]);
pool->base.hw_i2cs[i] = NULL;
}
if (pool->base.sw_i2cs[i] != NULL) {
kfree(pool->base.sw_i2cs[i]);
pool->base.sw_i2cs[i] = NULL;
}
}
for (i = 0; i < (unsigned int)pool->base.res_cap->num_opp; i++) {
if (pool->base.opps[i] != NULL)
pool->base.opps[i]->funcs->opp_destroy(&pool->base.opps[i]);
}
for (i = 0; i < (unsigned int)pool->base.res_cap->num_timing_generator; i++) {
if (pool->base.timing_generators[i] != NULL) {
kfree(DCN10TG_FROM_TG(pool->base.timing_generators[i]));
pool->base.timing_generators[i] = NULL;
}
Annotation
- Immediate include surface: `dm_services.h`, `dc.h`, `dcn30/dcn30_init.h`, `resource.h`, `include/irq_service_interface.h`, `dcn20/dcn20_resource.h`, `dcn30_resource.h`, `dcn10/dcn10_ipp.h`.
- Detected declarations: `enum dcn30_clk_src_array_id`, `function dcn30_dpp_destroy`, `function read_dce_straps`, `function dcn30_resource_destruct`, `function dcn30_dwbc_create`, `function dcn30_mmhubbub_create`, `function dcn30_add_stream_to_ctx`, `function dcn30_destroy_resource_pool`, `function dcn30_populate_dml_pipes_from_context`, `function dcn30_populate_dml_writeback_from_context`.
- 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.