drivers/gpu/drm/amd/include/amd_pcie_helpers.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/include/amd_pcie_helpers.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/include/amd_pcie_helpers.h- Extension
.h- Size
- 3969 bytes
- Lines
- 142
- 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.
Dependency Surface
amd_pcie.h
Detected Declarations
function filesfunction is_pcie_gen2_supportedfunction get_pcie_gen_supportfunction get_pcie_lane_support
Annotated Snippet
if (ns_pcie_lanes == pcie_lanes[i]) {
if (pcie_lane_width_cap & (0x10000 << i)) {
break;
} else {
for (j = i - 1; j >= 0; j--) {
if (pcie_lane_width_cap & (0x10000 << j)) {
new_pcie_lanes = pcie_lanes[j];
break;
}
}
if (j < 0) {
for (j = i + 1; j < 7; j++) {
if (pcie_lane_width_cap & (0x10000 << j)) {
new_pcie_lanes = pcie_lanes[j];
break;
}
}
if (j > 7)
pr_err("Cannot find a valid PCIE lane width!\n");
}
}
break;
}
}
break;
}
return new_pcie_lanes;
}
#endif
Annotation
- Immediate include surface: `amd_pcie.h`.
- Detected declarations: `function files`, `function is_pcie_gen2_supported`, `function get_pcie_gen_support`, `function get_pcie_lane_support`.
- 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.