drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c- Extension
.c- Size
- 44886 bytes
- Lines
- 1785
- 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.hdcn301/dcn301_init.hresource.hinclude/irq_service_interface.hdcn30/dcn30_resource.hdcn301_resource.hdcn20/dcn20_resource.hdcn10/dcn10_ipp.hdcn301/dcn301_hubbub.hdcn30/dcn30_mpc.hdcn30/dcn30_hubp.hirq/dcn30/irq_service_dcn30.hdcn30/dcn30_dpp.hdcn301/dcn301_optc.hdcn20/dcn20_hwseq.hdcn30/dcn30_hwseq.hdce110/dce110_hwseq.hdcn30/dcn30_opp.hdcn20/dcn20_dsc.hdcn30/dcn30_vpg.hdcn30/dcn30_afmt.hdce/dce_clock_source.hdce/dce_audio.hdce/dce_hwseq.hclk_mgr.hdio/virtual/virtual_stream_encoder.hdce110/dce110_resource.hdml/display_mode_vba.hdcn301/dcn301_dccg.hdcn10/dcn10_resource.hdio/dcn10/dcn10_dio.h
Detected Declarations
enum dcn301_clk_src_array_idfunction dcn301_dpp_destroyfunction read_pipe_fusesfunction read_dce_strapsfunction dcn301_destructfunction dcn301_dwbc_createfunction dcn301_mmhubbub_createfunction dcn301_destroy_resource_poolfunction is_soc_bounding_box_validfunction init_soc_bounding_boxfunction set_wm_rangesfunction dcn301_update_bw_bounding_boxfunction dcn301_calculate_wm_and_dlgfunction dcn301_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 < (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)
dcn301_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;
}
}
for (i = 0; i < (unsigned int)pool->base.res_cap->num_dwb; i++) {
if (pool->base.dwbc[i] != NULL) {
kfree(TO_DCN30_DWBC(pool->base.dwbc[i]));
pool->base.dwbc[i] = NULL;
}
if (pool->base.mcif_wb[i] != NULL) {
kfree(TO_DCN30_MMHUBBUB(pool->base.mcif_wb[i]));
pool->base.mcif_wb[i] = NULL;
}
}
for (i = 0; i < pool->base.audio_count; i++) {
if (pool->base.audios[i])
dce_aud_destroy(&pool->base.audios[i]);
}
Annotation
- Immediate include surface: `dm_services.h`, `dc.h`, `dcn301/dcn301_init.h`, `resource.h`, `include/irq_service_interface.h`, `dcn30/dcn30_resource.h`, `dcn301_resource.h`, `dcn20/dcn20_resource.h`.
- Detected declarations: `enum dcn301_clk_src_array_id`, `function dcn301_dpp_destroy`, `function read_pipe_fuses`, `function read_dce_straps`, `function dcn301_destruct`, `function dcn301_dwbc_create`, `function dcn301_mmhubbub_create`, `function dcn301_destroy_resource_pool`, `function is_soc_bounding_box_valid`, `function init_soc_bounding_box`.
- 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.