drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c- Extension
.c- Size
- 12260 bytes
- Lines
- 463
- 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
dal_asic_id.hdc_types.hdccg.hclk_mgr_internal.hdc_state_priv.hlink_service.hdce100/dce_clk_mgr.hdce110/dce110_clk_mgr.hdce112/dce112_clk_mgr.hdce120/dce120_clk_mgr.hdcn10/rv1_clk_mgr.hdcn10/rv2_clk_mgr.hdcn20/dcn20_clk_mgr.hdcn21/rn_clk_mgr.hdcn201/dcn201_clk_mgr.hdcn30/dcn30_clk_mgr.hdcn301/vg_clk_mgr.hdcn31/dcn31_clk_mgr.hdcn314/dcn314_clk_mgr.hdcn315/dcn315_clk_mgr.hdcn316/dcn316_clk_mgr.hdcn32/dcn32_clk_mgr.hdcn35/dcn35_clk_mgr.hdcn401/dcn401_clk_mgr.hdcn42/dcn42_clk_mgr.hdcn42b/dcn42b_clk_mgr.h
Detected Declarations
function filesfunction clk_mgr_helper_get_active_plane_cntfunction clk_mgr_exit_optimized_pwr_statefunction clk_mgr_optimize_pwr_statefunction dc_destroy_clk_mgr
Annotated Snippet
if (clk_mgr == NULL) {
BREAK_TO_DEBUGGER();
return NULL;
}
dce_clk_mgr_construct(ctx, clk_mgr);
return &clk_mgr->base;
}
case FAMILY_CZ: {
struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr);
if (clk_mgr == NULL) {
BREAK_TO_DEBUGGER();
return NULL;
}
dce110_clk_mgr_construct(ctx, clk_mgr);
return &clk_mgr->base;
}
case FAMILY_VI: {
struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr);
if (clk_mgr == NULL) {
BREAK_TO_DEBUGGER();
return NULL;
}
if (ASIC_REV_IS_TONGA_P(asic_id.hw_internal_rev) ||
ASIC_REV_IS_FIJI_P(asic_id.hw_internal_rev)) {
dce_clk_mgr_construct(ctx, clk_mgr);
return &clk_mgr->base;
}
if (ASIC_REV_IS_POLARIS10_P(asic_id.hw_internal_rev) ||
ASIC_REV_IS_POLARIS11_M(asic_id.hw_internal_rev) ||
ASIC_REV_IS_POLARIS12_V(asic_id.hw_internal_rev)) {
dce112_clk_mgr_construct(ctx, clk_mgr);
return &clk_mgr->base;
}
if (ASIC_REV_IS_VEGAM(asic_id.hw_internal_rev)) {
dce112_clk_mgr_construct(ctx, clk_mgr);
return &clk_mgr->base;
}
return &clk_mgr->base;
}
case FAMILY_AI: {
struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr);
if (clk_mgr == NULL) {
BREAK_TO_DEBUGGER();
return NULL;
}
if (ASICREV_IS_VEGA20_P(asic_id.hw_internal_rev))
dce121_clk_mgr_construct(ctx, clk_mgr);
else
dce120_clk_mgr_construct(ctx, clk_mgr);
return &clk_mgr->base;
}
#if defined(CONFIG_DRM_AMD_DC_FP)
case FAMILY_RV: {
struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr);
if (clk_mgr == NULL) {
BREAK_TO_DEBUGGER();
return NULL;
}
if (ASICREV_IS_RENOIR(asic_id.hw_internal_rev)) {
rn_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
return &clk_mgr->base;
}
if (ASICREV_IS_GREEN_SARDINE(asic_id.hw_internal_rev)) {
rn_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
return &clk_mgr->base;
}
if (ASICREV_IS_RAVEN2(asic_id.hw_internal_rev)) {
rv2_clk_mgr_construct(ctx, clk_mgr, pp_smu);
return &clk_mgr->base;
}
if (ASICREV_IS_RAVEN(asic_id.hw_internal_rev) ||
ASICREV_IS_PICASSO(asic_id.hw_internal_rev)) {
rv1_clk_mgr_construct(ctx, clk_mgr, pp_smu);
return &clk_mgr->base;
}
return &clk_mgr->base;
}
case FAMILY_NV: {
struct clk_mgr_internal *clk_mgr = kzalloc_obj(*clk_mgr);
if (clk_mgr == NULL) {
BREAK_TO_DEBUGGER();
return NULL;
}
Annotation
- Immediate include surface: `dal_asic_id.h`, `dc_types.h`, `dccg.h`, `clk_mgr_internal.h`, `dc_state_priv.h`, `link_service.h`, `dce100/dce_clk_mgr.h`, `dce110/dce110_clk_mgr.h`.
- Detected declarations: `function files`, `function clk_mgr_helper_get_active_plane_cnt`, `function clk_mgr_exit_optimized_pwr_state`, `function clk_mgr_optimize_pwr_state`, `function dc_destroy_clk_mgr`.
- 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.