drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_factory.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_factory.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_factory.c- Extension
.c- Size
- 1284 bytes
- Lines
- 48
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
dml2_core_factory.hdml2_core_dcn4.hdml2_external_lib_deps.h
Detected Declarations
function dml2_core_create
Annotated Snippet
// SPDX-License-Identifier: MIT
//
// Copyright 2024 Advanced Micro Devices, Inc.
#include "dml2_core_factory.h"
#include "dml2_core_dcn4.h"
#include "dml2_external_lib_deps.h"
bool dml2_core_create(enum dml2_project_id project_id, struct dml2_core_instance *out)
{
bool result = false;
if (!out)
return false;
memset(out, 0, sizeof(struct dml2_core_instance));
out->project_id = project_id;
switch (project_id) {
case dml2_project_dcn4x_stage1:
result = false;
break;
case dml2_project_dcn4x_stage2:
case dml2_project_dcn4x_stage2_auto_drr_svp:
out->initialize = &core_dcn4_initialize;
out->mode_support = &core_dcn4_mode_support;
out->mode_programming = &core_dcn4_mode_programming;
out->populate_informative = &core_dcn4_populate_informative;
out->calculate_mcache_allocation = &core_dcn4_calculate_mcache_allocation;
result = true;
break;
case dml2_project_dcn42:
out->initialize = &core_dcn42_initialize;
out->mode_support = &core_dcn4_mode_support;
out->mode_programming = &core_dcn4_mode_programming;
out->populate_informative = &core_dcn4_populate_informative;
out->calculate_mcache_allocation = &core_dcn4_calculate_mcache_allocation;
result = true;
break;
case dml2_project_invalid:
default:
break;
}
return result;
}
Annotation
- Immediate include surface: `dml2_core_factory.h`, `dml2_core_dcn4.h`, `dml2_external_lib_deps.h`.
- Detected declarations: `function dml2_core_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.