This is a display driver for the virtio-gpu device described in the virtio specification.
Conceptually, the virtio-gpu device is a combination of a display engine and a GPU.
The virtio_gpu_ctrl_type enumeration in the [“Device Operation: Request header” section][virtio-spec-gpu-request-section] lists all the commands implemented by the virtio-gpu device. Conceptually, the 2D commands and the cursor commands map to the display engine, while the 3D commands map to the GPU.
The display guest driver (this driver) binds to the virtio-gpu device, and mediates the GPU guest driver's access to the virtio-gpu device.
Blob resources may be supported by the virtio-gpu device. If supported, the driver prefers blob resources because the image stride can be specified for scanout (otherwise, stride is assumed to be packed).
These instructions work with a workbench_eng.x64 build that includes the GN targets mentioned below. Debug builds are recommended for iterating on the driver code.
fx set workbench_eng.x64 --debug --with //src/graphics/display:tools \ --with //src/graphics/display:tests
Follow the virtio-spec processing guide to prepare a Markdown version of the virtio specification in the local/virtio-spec/ directory.
Follow the change validation guide to quickly check your change under QEMU.
We do not currently have automated integration tests.
Before uploading a behavior-changing CL for review, follow the manual testing process to ensure that the CL doesn't regress key development workflows.
The code contains references to the following documents.