drivers/gpu/drm/vmwgfx/vmwgfx_prime.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/vmwgfx/vmwgfx_prime.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/vmwgfx/vmwgfx_prime.c- Extension
.c- Size
- 3793 bytes
- Lines
- 125
- 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
vmwgfx_drv.hvmwgfx_bo.httm_object.hlinux/dma-buf.h
Detected Declarations
function Copyrightfunction vmw_prime_map_detachfunction vmw_prime_unmap_dma_buffunction vmw_prime_fd_to_handlefunction vmw_prime_handle_to_fd
Annotated Snippet
if (vbo && vbo->is_dumb) {
ret = drm_gem_prime_handle_to_fd(dev, file_priv, handle,
flags, prime_fd);
} else {
surf_handle = vmw_lookup_surface_handle_for_buffer(vmw,
vbo,
handle);
if (surf_handle > 0)
ret = ttm_prime_handle_to_fd(tfile, surf_handle,
flags, prime_fd);
else
ret = drm_gem_prime_handle_to_fd(dev, file_priv,
handle, flags,
prime_fd);
}
vmw_user_bo_unref(&vbo);
}
return ret;
}
Annotation
- Immediate include surface: `vmwgfx_drv.h`, `vmwgfx_bo.h`, `ttm_object.h`, `linux/dma-buf.h`.
- Detected declarations: `function Copyright`, `function vmw_prime_map_detach`, `function vmw_prime_unmap_dma_buf`, `function vmw_prime_fd_to_handle`, `function vmw_prime_handle_to_fd`.
- 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.