drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c- Extension
.c- Size
- 43866 bytes
- Lines
- 1746
- 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
core_status.hdm_services.hdc.hdcn10/dcn10_init.hresource.hinclude/irq_service_interface.hdcn10/dcn10_resource.hdcn10/dcn10_ipp.hdcn10/dcn10_mpc.hdcn10/dcn10_dwb.hirq/dcn10/irq_service_dcn10.hdcn10/dcn10_dpp.hdcn10/dcn10_optc.hdcn10/dcn10_hwseq.hdce110/dce110_hwseq.hdcn10/dcn10_opp.hdcn10/dcn10_link_encoder.hdcn10/dcn10_stream_encoder.hdce/dce_clock_source.hdce/dce_audio.hdce/dce_hwseq.hdio/virtual/virtual_stream_encoder.hdce110/dce110_resource.hdce112/dce112_resource.hdcn10/dcn10_hubp.hdcn10/dcn10_hubbub.hdce/dce_panel_cntl.hsoc15_hw_ip.hvega10_ip_offset.hdcn/dcn_1_0_offset.hdcn/dcn_1_0_sh_mask.hnbio/nbio_7_0_offset.h
Detected Declarations
enum dcn10_clk_src_array_idfunction map_transmitter_id_to_phy_instancefunction dcn10_dpp_destroyfunction read_dce_strapsfunction dcn10_clock_source_destroyfunction dcn10_resource_destructfunction get_pixel_clock_parametersfunction build_clamping_paramsfunction build_pipe_hw_paramfunction build_mapped_resourcefunction dcn10_add_stream_to_ctxfunction dcn10_get_dcc_compression_capfunction dcn10_destroy_resource_poolfunction dcn10_validate_bandwidthfunction dcn10_validate_planefunction dcn10_validate_globalfunction dcn10_patch_unknown_plane_statefunction dcn10_get_vstartup_for_pipefunction dcn10_get_default_tiling_infofunction read_pipe_fusesfunction verify_clock_valuesfunction dcn10_resource_construct
Annotated Snippet
switch (ctx->asic_id.pci_revision_id) {
case PRID_POLLOCK_94:
case PRID_POLLOCK_95:
case PRID_POLLOCK_E9:
case PRID_POLLOCK_EA:
case PRID_POLLOCK_EB:
hws->wa.wait_hubpret_read_start_during_mpo_transition = true;
break;
default:
hws->wa.wait_hubpret_read_start_during_mpo_transition = false;
break;
}
}
return hws;
}
static const struct resource_create_funcs res_create_funcs = {
.read_dce_straps = read_dce_straps,
.create_audio = create_audio,
.create_stream_encoder = dcn10_stream_encoder_create,
.create_hwseq = dcn10_hwseq_create,
};
static void dcn10_clock_source_destroy(struct clock_source **clk_src)
{
kfree(TO_DCE110_CLK_SRC(*clk_src));
*clk_src = NULL;
}
static struct pp_smu_funcs *dcn10_pp_smu_create(struct dc_context *ctx)
{
struct pp_smu_funcs *pp_smu = kzalloc_obj(*pp_smu);
if (!pp_smu)
return pp_smu;
dm_pp_get_funcs(ctx, pp_smu);
return pp_smu;
}
static void dcn10_resource_destruct(struct dcn10_resource_pool *pool)
{
unsigned int i;
for (i = 0; i < pool->base.stream_enc_count; i++) {
if (pool->base.stream_enc[i] != NULL) {
kfree(DCN10STRENC_FROM_STRENC(pool->base.stream_enc[i]));
pool->base.stream_enc[i] = NULL;
}
}
if (pool->base.mpc != NULL) {
kfree(TO_DCN10_MPC(pool->base.mpc));
pool->base.mpc = 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.opps[i] != NULL)
pool->base.opps[i]->funcs->opp_destroy(&pool->base.opps[i]);
if (pool->base.dpps[i] != NULL)
dcn10_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_DCN10_HUBP(pool->base.hubps[i]));
pool->base.hubps[i] = NULL;
}
if (pool->base.irqs != NULL) {
dal_irq_service_destroy(&pool->base.irqs);
}
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_ddc; i++) {
Annotation
- Immediate include surface: `core_status.h`, `dm_services.h`, `dc.h`, `dcn10/dcn10_init.h`, `resource.h`, `include/irq_service_interface.h`, `dcn10/dcn10_resource.h`, `dcn10/dcn10_ipp.h`.
- Detected declarations: `enum dcn10_clk_src_array_id`, `function map_transmitter_id_to_phy_instance`, `function dcn10_dpp_destroy`, `function read_dce_straps`, `function dcn10_clock_source_destroy`, `function dcn10_resource_destruct`, `function get_pixel_clock_parameters`, `function build_clamping_params`, `function build_pipe_hw_param`, `function build_mapped_resource`.
- 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.