drivers/gpu/drm/amd/pm/powerplay/hwmgr/polaris_baco.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/pm/powerplay/hwmgr/polaris_baco.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/pm/powerplay/hwmgr/polaris_baco.c- Extension
.c- Size
- 11723 bytes
- Lines
- 213
- 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
amdgpu.hpolaris_baco.hgmc/gmc_8_1_d.hgmc/gmc_8_1_sh_mask.hbif/bif_5_0_d.hbif/bif_5_0_sh_mask.hdce/dce_11_0_d.hdce/dce_11_0_sh_mask.hsmu/smu_7_1_3_d.hsmu/smu_7_1_3_sh_mask.h
Detected Declarations
function polaris_baco_set_state
Annotated Snippet
if (hwmgr->chip_id == CHIP_VEGAM) {
baco_program_registers(hwmgr, use_bclk_tbl_vg, ARRAY_SIZE(use_bclk_tbl_vg));
baco_program_registers(hwmgr, turn_off_plls_tbl_vg,
ARRAY_SIZE(turn_off_plls_tbl_vg));
} else {
baco_program_registers(hwmgr, use_bclk_tbl, ARRAY_SIZE(use_bclk_tbl));
baco_program_registers(hwmgr, turn_off_plls_tbl,
ARRAY_SIZE(turn_off_plls_tbl));
}
baco_program_registers(hwmgr, clk_req_b_tbl, ARRAY_SIZE(clk_req_b_tbl));
if (baco_program_registers(hwmgr, enter_baco_tbl,
ARRAY_SIZE(enter_baco_tbl)))
return 0;
} else if (state == BACO_STATE_OUT) {
/* HW requires at least 20ms between regulator off and on */
msleep(20);
/* Execute Hardware BACO exit sequence */
if (baco_program_registers(hwmgr, exit_baco_tbl,
ARRAY_SIZE(exit_baco_tbl))) {
if (baco_program_registers(hwmgr, clean_baco_tbl,
ARRAY_SIZE(clean_baco_tbl)))
return 0;
}
}
return -EINVAL;
}
Annotation
- Immediate include surface: `amdgpu.h`, `polaris_baco.h`, `gmc/gmc_8_1_d.h`, `gmc/gmc_8_1_sh_mask.h`, `bif/bif_5_0_d.h`, `bif/bif_5_0_sh_mask.h`, `dce/dce_11_0_d.h`, `dce/dce_11_0_sh_mask.h`.
- Detected declarations: `function polaris_baco_set_state`.
- 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.