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).
We do not currently have automated integration tests. Behavior changes in this driver must be validated using this manual test.
Launch a QEMU-based emulator.
ffx emu start --engine qemu
Launch the squares demo in the display-tool test utility.
ffx target ssh display-tool squares
Add the following footer to your CL description, to document having performed the test.
Test: ffx target ssh display-tool squares
These instructions will work with a workbench_eng.x64 build that includes the //src/graphics/display:tools GN target. The //src/graphics/display:tests target is also recommended, as it builds the automated unit tests.
fx set workbench_eng.x64 --with //src/graphics/display:tools \ --with //src/graphics/display:tests