drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c- Extension
.c- Size
- 91605 bytes
- Lines
- 3113
- 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
dc_types.hdm_services.hdc.hdcn32/dcn32_init.hresource.hinclude/irq_service_interface.hdcn32_resource.hdcn20/dcn20_resource.hdcn30/dcn30_resource.hdcn10/dcn10_ipp.hdcn30/dcn30_hubbub.hdcn31/dcn31_hubbub.hdcn32/dcn32_hubbub.hdcn32/dcn32_mpc.hdcn32/dcn32_hubp.hirq/dcn32/irq_service_dcn32.hdcn32/dcn32_dpp.hdcn32/dcn32_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.hdcn32/dcn32_dio_stream_encoder.hdcn30/dcn30_hpo_frl_stream_encoder.hdcn30/dcn30_hpo_frl_link_encoder.hdcn31/dcn31_hpo_dp_stream_encoder.hdcn31/dcn31_hpo_dp_link_encoder.hdcn32/dcn32_hpo_dp_link_encoder.h
Detected Declarations
enum dcn32_clk_src_array_idfunction dcn32_dpp_destroyfunction read_dce_strapsfunction dcn32_resource_destructfunction dcn32_dwbc_createfunction dcn32_mmhubbub_createfunction dcn32_destroy_resource_poolfunction dcn32_acquire_post_bldn_3dlutfunction dcn32_release_post_bldn_3dlutfunction dcn32_enable_phantom_planefunction dcn32_add_phantom_pipesfunction dcn32_validate_bandwidthfunction dcn32_populate_dml_pipes_from_contextfunction dcn32_calculate_mall_ways_from_bytesfunction dcn32_calculate_wm_and_dlgfunction dcn32_update_bw_bounding_boxfunction dcn32_get_max_hw_cursor_sizefunction read_pipe_fusesfunction dcn32_resource_constructfunction dcn32_find_optimal_free_pipe_as_secondary_dpp_pipefunction sidefunction find_optimal_free_pipe_as_secondary_opp_headfunction dcn32_calc_num_avail_chans_for_mall
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 < pool->base.hpo_dp_stream_enc_count; i++) {
if (pool->base.hpo_dp_stream_enc[i] != NULL) {
if (pool->base.hpo_dp_stream_enc[i]->vpg != NULL) {
kfree(DCN30_VPG_FROM_VPG(pool->base.hpo_dp_stream_enc[i]->vpg));
pool->base.hpo_dp_stream_enc[i]->vpg = NULL;
}
if (pool->base.hpo_dp_stream_enc[i]->apg != NULL) {
kfree(DCN31_APG_FROM_APG(pool->base.hpo_dp_stream_enc[i]->apg));
pool->base.hpo_dp_stream_enc[i]->apg = NULL;
}
kfree(DCN3_1_HPO_DP_STREAM_ENC_FROM_HPO_STREAM_ENC(pool->base.hpo_dp_stream_enc[i]));
pool->base.hpo_dp_stream_enc[i] = NULL;
}
}
for (i = 0; i < pool->base.hpo_dp_link_enc_count; i++) {
if (pool->base.hpo_dp_link_enc[i] != NULL) {
kfree(DCN3_1_HPO_DP_LINK_ENC_FROM_HPO_LINK_ENC(pool->base.hpo_dp_link_enc[i]));
pool->base.hpo_dp_link_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(TO_DCN20_HUBBUB(pool->base.hubbub));
pool->base.hubbub = NULL;
}
for (i = 0; i < pool->base.pipe_count; i++) {
if (pool->base.dpps[i] != NULL)
dcn32_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;
}
Annotation
- Immediate include surface: `dc_types.h`, `dm_services.h`, `dc.h`, `dcn32/dcn32_init.h`, `resource.h`, `include/irq_service_interface.h`, `dcn32_resource.h`, `dcn20/dcn20_resource.h`.
- Detected declarations: `enum dcn32_clk_src_array_id`, `function dcn32_dpp_destroy`, `function read_dce_straps`, `function dcn32_resource_destruct`, `function dcn32_dwbc_create`, `function dcn32_mmhubbub_create`, `function dcn32_destroy_resource_pool`, `function dcn32_acquire_post_bldn_3dlut`, `function dcn32_release_post_bldn_3dlut`, `function dcn32_enable_phantom_plane`.
- 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.