drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c- Extension
.c- Size
- 15364 bytes
- Lines
- 551
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/firmware.hlinux/module.hlinux/debugfs.hdrm/drm_exec.hdrm/drm_drv.hamdgpu.hamdgpu_umsch_mm.humsch_mm_v4_0.h
Detected Declarations
function amdgpu_umsch_mm_submit_pktfunction amdgpu_umsch_mm_query_fencefunction umsch_mm_ring_set_wptrfunction umsch_mm_ring_get_rptrfunction umsch_mm_ring_get_wptrfunction amdgpu_umsch_mm_ring_initfunction amdgpu_umsch_mm_init_microcodefunction amdgpu_umsch_mm_allocate_ucode_bufferfunction amdgpu_umsch_mm_allocate_ucode_data_bufferfunction amdgpu_umsch_mm_psp_execute_cmd_buffunction umsch_mm_agdb_index_initfunction umsch_mm_initfunction umsch_mm_early_initfunction umsch_mm_late_initfunction umsch_mm_sw_initfunction umsch_mm_sw_finifunction umsch_mm_hw_initfunction umsch_mm_hw_finifunction umsch_mm_suspendfunction umsch_mm_resumefunction amdgpu_umsch_fwlog_initfunction amdgpu_debugfs_umsch_fwlog_readfunction amdgpu_debugfs_umsch_fwlog_init
Annotated Snippet
static const struct file_operations amdgpu_debugfs_umschfwlog_fops = {
.owner = THIS_MODULE,
.read = amdgpu_debugfs_umsch_fwlog_read,
.llseek = default_llseek
};
#endif
void amdgpu_debugfs_umsch_fwlog_init(struct amdgpu_device *adev,
struct amdgpu_umsch_mm *umsch_mm)
{
#if defined(CONFIG_DEBUG_FS)
struct drm_minor *minor = adev_to_drm(adev)->primary;
struct dentry *root = minor->debugfs_root;
char name[32];
sprintf(name, "amdgpu_umsch_fwlog");
debugfs_create_file_size(name, S_IFREG | 0444, root, umsch_mm,
&amdgpu_debugfs_umschfwlog_fops,
AMDGPU_UMSCHFW_LOG_SIZE);
#endif
}
static const struct amd_ip_funcs umsch_mm_v4_0_ip_funcs = {
.name = "umsch_mm_v4_0",
.early_init = umsch_mm_early_init,
.late_init = umsch_mm_late_init,
.sw_init = umsch_mm_sw_init,
.sw_fini = umsch_mm_sw_fini,
.hw_init = umsch_mm_hw_init,
.hw_fini = umsch_mm_hw_fini,
.suspend = umsch_mm_suspend,
.resume = umsch_mm_resume,
};
const struct amdgpu_ip_block_version umsch_mm_v4_0_ip_block = {
.type = AMD_IP_BLOCK_TYPE_UMSCH_MM,
.major = 4,
.minor = 0,
.rev = 0,
.funcs = &umsch_mm_v4_0_ip_funcs,
};
Annotation
- Immediate include surface: `linux/firmware.h`, `linux/module.h`, `linux/debugfs.h`, `drm/drm_exec.h`, `drm/drm_drv.h`, `amdgpu.h`, `amdgpu_umsch_mm.h`, `umsch_mm_v4_0.h`.
- Detected declarations: `function amdgpu_umsch_mm_submit_pkt`, `function amdgpu_umsch_mm_query_fence`, `function umsch_mm_ring_set_wptr`, `function umsch_mm_ring_get_rptr`, `function umsch_mm_ring_get_wptr`, `function amdgpu_umsch_mm_ring_init`, `function amdgpu_umsch_mm_init_microcode`, `function amdgpu_umsch_mm_allocate_ucode_buffer`, `function amdgpu_umsch_mm_allocate_ucode_data_buffer`, `function amdgpu_umsch_mm_psp_execute_cmd_buf`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: pattern implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
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.