drivers/gpu/drm/amd/display/dc/resource/dcn42b/dcn42b_resource.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/resource/dcn42b/dcn42b_resource.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/resource/dcn42b/dcn42b_resource.c- Extension
.c- Size
- 77149 bytes
- Lines
- 2405
- 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.hdcn32/dcn32_init.hdcn42/dcn42_init.hdcn42b/dcn42b_init.hresource.hinclude/irq_service_interface.hdcn42b_resource.hdcn20/dcn20_resource.hdcn30/dcn30_resource.hdcn31/dcn31_resource.hdcn32/dcn32_resource.hdcn35/dcn35_resource.hdcn321/dcn321_resource.hdcn401/dcn401_resource.hdcn42/dcn42_resource_fpu.hdcn10/dcn10_ipp.hdcn35/dcn35_hubbub.hdcn42/dcn42_hubbub.hdcn401/dcn401_mpc.hdcn42/dcn42_mpc.hdcn35/dcn35_hubp.hdcn42/dcn42_hubp.hirq/dcn42/irq_service_dcn42.hdcn42/dcn42_dpp.hdcn401/dcn401_dsc.hdcn42/dcn42_optc.hdcn20/dcn20_hwseq.hdcn30/dcn30_hwseq.hdce110/dce110_hwseq.hdcn35/dcn35_opp.hdcn30/dcn30_vpg.h
Detected Declarations
enum dcn401_clk_src_array_idfunction dcn42b_get_preferred_eng_id_dpiafunction dcn42b_dpp_destroyfunction read_dce_strapsfunction dcn42b_dsc_destroyfunction dcn42b_resource_destructfunction dcn42b_build_pipe_pix_clk_paramsfunction dcn42b_dwbc_createfunction dcn42b_mmhubbub_initfunction dcn42b_mmhubbub_createfunction dcn42b_destroy_resource_poolfunction dcn42b_update_bw_bounding_box_fpufunction dcn42b_update_bw_bounding_boxfunction dcn42b_validate_bandwidthfunction dcn42b_prepare_mcache_programmingfunction dcn42b_get_panel_config_defaultsfunction dcn42b_get_max_hw_cursor_sizefunction dcn42b_resource_construct
Annotated Snippet
if (pool->base.stream_enc[i] != NULL) {
if (pool->base.stream_enc[i]->vpg != NULL) {
kfree(DCN31_VPG_FROM_VPG(pool->base.stream_enc[i]->vpg));
pool->base.stream_enc[i]->vpg = NULL;
}
if (pool->base.stream_enc[i]->apg != NULL) {
kfree(DCN31_APG_FROM_APG(pool->base.stream_enc[i]->apg));
pool->base.stream_enc[i]->apg = NULL;
}
kfree(DCN10STRENC_FROM_STRENC(pool->base.stream_enc[i]));
pool->base.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(DCN31_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)
dcn42b_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)
dcn42b_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_aux; i++) {
if (pool->base.engines[i] != NULL)
dce110_engine_destroy(&pool->base.engines[i]);
}
for (i = 0; i < (unsigned int)pool->base.res_cap->num_ddc; 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`, `dcn32/dcn32_init.h`, `dcn42/dcn42_init.h`, `dcn42b/dcn42b_init.h`, `resource.h`, `include/irq_service_interface.h`, `dcn42b_resource.h`.
- Detected declarations: `enum dcn401_clk_src_array_id`, `function dcn42b_get_preferred_eng_id_dpia`, `function dcn42b_dpp_destroy`, `function read_dce_straps`, `function dcn42b_dsc_destroy`, `function dcn42b_resource_destruct`, `function dcn42b_build_pipe_pix_clk_params`, `function dcn42b_dwbc_create`, `function dcn42b_mmhubbub_init`, `function dcn42b_mmhubbub_create`.
- 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.