drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_interfaces.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_interfaces.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_interfaces.c- Extension
.c- Size
- 1335 bytes
- Lines
- 51
- 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
dml_top.hdml2_internal_shared_types.hdml2_top_soc15.h
Detected Declarations
function dml2_get_instance_size_bytesfunction dml2_initialize_instancefunction dml2_check_mode_supportedfunction dml2_build_mode_programmingfunction dml2_build_mcache_programming
Annotated Snippet
// SPDX-License-Identifier: MIT
//
// Copyright 2024 Advanced Micro Devices, Inc.
#include "dml_top.h"
#include "dml2_internal_shared_types.h"
#include "dml2_top_soc15.h"
unsigned int dml2_get_instance_size_bytes(void)
{
return sizeof(struct dml2_instance);
}
bool dml2_initialize_instance(struct dml2_initialize_instance_in_out *in_out)
{
switch (in_out->options.project_id) {
case dml2_project_dcn4x_stage1:
case dml2_project_dcn4x_stage2:
case dml2_project_dcn4x_stage2_auto_drr_svp:
case dml2_project_dcn42:
return dml2_top_soc15_initialize_instance(in_out);
case dml2_project_invalid:
default:
return false;
}
}
bool dml2_check_mode_supported(struct dml2_check_mode_supported_in_out *in_out)
{
if (!in_out->dml2_instance->funcs.check_mode_supported)
return false;
return in_out->dml2_instance->funcs.check_mode_supported(in_out);
}
bool dml2_build_mode_programming(struct dml2_build_mode_programming_in_out *in_out)
{
if (!in_out->dml2_instance->funcs.build_mode_programming)
return false;
return in_out->dml2_instance->funcs.build_mode_programming(in_out);
}
bool dml2_build_mcache_programming(struct dml2_build_mcache_programming_in_out *in_out)
{
if (!in_out->dml2_instance->funcs.build_mcache_programming)
return false;
return in_out->dml2_instance->funcs.build_mcache_programming(in_out);
}
Annotation
- Immediate include surface: `dml_top.h`, `dml2_internal_shared_types.h`, `dml2_top_soc15.h`.
- Detected declarations: `function dml2_get_instance_size_bytes`, `function dml2_initialize_instance`, `function dml2_check_mode_supported`, `function dml2_build_mode_programming`, `function dml2_build_mcache_programming`.
- 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.