drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c- Extension
.c- Size
- 18435 bytes
- Lines
- 599
- 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.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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
linux/printk.hlinux/slab.hlinux/uaccess.hkfd_priv.hkfd_mqd_manager.hv11_structs.hgc/gc_11_0_0_offset.hgc/gc_11_0_0_sh_mask.hamdgpu_amdkfd.h
Detected Declarations
function filesfunction update_cu_maskfunction set_priorityfunction init_mqdfunction load_mqdfunction update_mqdfunction check_preemption_failedfunction get_wave_statefunction checkpoint_mqdfunction restore_mqdfunction checkpoint_mqd_sdmafunction restore_mqd_sdmafunction init_mqd_hiqfunction destroy_hiq_mqdfunction init_mqd_sdmafunction update_mqd_sdmafunction debugfs_show_mqdfunction debugfs_show_mqd_sdma
Annotated Snippet
if (dev->kfd->shared_resources.enable_mes) {
mqd->allocate_mqd = allocate_mqd;
mqd->free_mqd = kfd_free_mqd_cp;
}
pr_debug("%s@%i\n", __func__, __LINE__);
break;
default:
kfree(mqd);
return NULL;
}
return mqd;
}
Annotation
- Immediate include surface: `linux/printk.h`, `linux/slab.h`, `linux/uaccess.h`, `kfd_priv.h`, `kfd_mqd_manager.h`, `v11_structs.h`, `gc/gc_11_0_0_offset.h`, `gc/gc_11_0_0_sh_mask.h`.
- Detected declarations: `function files`, `function update_cu_mask`, `function set_priority`, `function init_mqd`, `function load_mqd`, `function update_mqd`, `function check_preemption_failed`, `function get_wave_state`, `function checkpoint_mqd`, `function restore_mqd`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.