include/uapi/linux/virtio_gpu.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/virtio_gpu.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/virtio_gpu.h- Extension
.h- Size
- 11887 bytes
- Lines
- 470
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.h
Detected Declarations
struct virtio_gpu_ctrl_hdrstruct virtio_gpu_cursor_posstruct virtio_gpu_update_cursorstruct virtio_gpu_rectstruct virtio_gpu_resource_unrefstruct virtio_gpu_resource_create_2dstruct virtio_gpu_set_scanoutstruct virtio_gpu_resource_flushstruct virtio_gpu_transfer_to_host_2dstruct virtio_gpu_mem_entrystruct virtio_gpu_resource_attach_backingstruct virtio_gpu_resource_detach_backingstruct virtio_gpu_resp_display_infostruct virtio_gpu_display_onestruct virtio_gpu_boxstruct virtio_gpu_transfer_host_3dstruct virtio_gpu_resource_create_3dstruct virtio_gpu_ctx_createstruct virtio_gpu_ctx_destroystruct virtio_gpu_ctx_resourcestruct virtio_gpu_cmd_submitstruct virtio_gpu_get_capset_infostruct virtio_gpu_resp_capset_infostruct virtio_gpu_get_capsetstruct virtio_gpu_resp_capsetstruct virtio_gpu_cmd_get_edidstruct virtio_gpu_resp_edidstruct virtio_gpu_configstruct virtio_gpu_resource_assign_uuidstruct virtio_gpu_resp_resource_uuidstruct virtio_gpu_resource_create_blobstruct virtio_gpu_set_scanout_blobstruct virtio_gpu_resource_map_blobstruct virtio_gpu_resp_map_infostruct virtio_gpu_resource_unmap_blobenum virtio_gpu_ctrl_typeenum virtio_gpu_shm_idenum virtio_gpu_formats
Annotated Snippet
struct virtio_gpu_ctrl_hdr {
__le32 type;
__le32 flags;
__le64 fence_id;
__le32 ctx_id;
__u8 ring_idx;
__u8 padding[3];
};
/* data passed in the cursor vq */
struct virtio_gpu_cursor_pos {
__le32 scanout_id;
__le32 x;
__le32 y;
__le32 padding;
};
/* VIRTIO_GPU_CMD_UPDATE_CURSOR, VIRTIO_GPU_CMD_MOVE_CURSOR */
struct virtio_gpu_update_cursor {
struct virtio_gpu_ctrl_hdr hdr;
struct virtio_gpu_cursor_pos pos; /* update & move */
__le32 resource_id; /* update only */
__le32 hot_x; /* update only */
__le32 hot_y; /* update only */
__le32 padding;
};
/* data passed in the control vq, 2d related */
struct virtio_gpu_rect {
__le32 x;
__le32 y;
__le32 width;
__le32 height;
};
/* VIRTIO_GPU_CMD_RESOURCE_UNREF */
struct virtio_gpu_resource_unref {
struct virtio_gpu_ctrl_hdr hdr;
__le32 resource_id;
__le32 padding;
};
/* VIRTIO_GPU_CMD_RESOURCE_CREATE_2D: create a 2d resource with a format */
struct virtio_gpu_resource_create_2d {
struct virtio_gpu_ctrl_hdr hdr;
__le32 resource_id;
__le32 format;
__le32 width;
__le32 height;
};
/* VIRTIO_GPU_CMD_SET_SCANOUT */
struct virtio_gpu_set_scanout {
struct virtio_gpu_ctrl_hdr hdr;
struct virtio_gpu_rect r;
__le32 scanout_id;
__le32 resource_id;
};
/* VIRTIO_GPU_CMD_RESOURCE_FLUSH */
struct virtio_gpu_resource_flush {
struct virtio_gpu_ctrl_hdr hdr;
struct virtio_gpu_rect r;
__le32 resource_id;
__le32 padding;
};
/* VIRTIO_GPU_CMD_TRANSFER_TO_HOST_2D: simple transfer to_host */
struct virtio_gpu_transfer_to_host_2d {
struct virtio_gpu_ctrl_hdr hdr;
struct virtio_gpu_rect r;
__le64 offset;
__le32 resource_id;
__le32 padding;
};
struct virtio_gpu_mem_entry {
__le64 addr;
__le32 length;
__le32 padding;
};
/* VIRTIO_GPU_CMD_RESOURCE_ATTACH_BACKING */
struct virtio_gpu_resource_attach_backing {
struct virtio_gpu_ctrl_hdr hdr;
__le32 resource_id;
__le32 nr_entries;
};
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct virtio_gpu_ctrl_hdr`, `struct virtio_gpu_cursor_pos`, `struct virtio_gpu_update_cursor`, `struct virtio_gpu_rect`, `struct virtio_gpu_resource_unref`, `struct virtio_gpu_resource_create_2d`, `struct virtio_gpu_set_scanout`, `struct virtio_gpu_resource_flush`, `struct virtio_gpu_transfer_to_host_2d`, `struct virtio_gpu_mem_entry`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.