drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/soc_and_ip_translator.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/soc_and_ip_translator.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/soc_and_ip_translator.c- Extension
.c- Size
- 1180 bytes
- Lines
- 43
- 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
soc_and_ip_translator.hsoc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.hsoc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.h
Detected Declarations
function dc_construct_soc_and_ip_translatorfunction dc_destroy_soc_and_ip_translator
Annotated Snippet
// SPDX-License-Identifier: MIT
//
// Copyright 2025 Advanced Micro Devices, Inc.
#include "soc_and_ip_translator.h"
#include "soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.h"
#include "soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.h"
static void dc_construct_soc_and_ip_translator(struct soc_and_ip_translator *soc_and_ip_translator,
enum dce_version dc_version)
{
switch (dc_version) {
case DCN_VERSION_4_01:
dcn401_construct_soc_and_ip_translator(soc_and_ip_translator);
break;
case DCN_VERSION_4_2:
case DCN_VERSION_4_2B:
dcn42_construct_soc_and_ip_translator(soc_and_ip_translator);
break;
default:
break;
}
}
struct soc_and_ip_translator *dc_create_soc_and_ip_translator(enum dce_version dc_version)
{
struct soc_and_ip_translator *soc_and_ip_translator;
soc_and_ip_translator = kzalloc_obj(*soc_and_ip_translator);
if (!soc_and_ip_translator)
return NULL;
dc_construct_soc_and_ip_translator(soc_and_ip_translator, dc_version);
return soc_and_ip_translator;
}
void dc_destroy_soc_and_ip_translator(struct soc_and_ip_translator **soc_and_ip_translator)
{
kfree(*soc_and_ip_translator);
*soc_and_ip_translator = NULL;
}
Annotation
- Immediate include surface: `soc_and_ip_translator.h`, `soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.h`, `soc_and_ip_translator/dcn42/dcn42_soc_and_ip_translator.h`.
- Detected declarations: `function dc_construct_soc_and_ip_translator`, `function dc_destroy_soc_and_ip_translator`.
- 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.