-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement VirtIO GPU and input devices #34
base: master
Are you sure you want to change the base?
Conversation
How about using virglrenderer? |
Yes, I do plan to support VirGL for acceleration. As far as I know, the offloading of rendering operations to the host GPU is called 3D mode by VirtIO's spec, whereas this pull request only implemented 2D mode due to the overall complexity. Before implementing 3D rendering mode with VirGL, I think we need to configure the Buildroot to have a minimal desktop environment or set the Mesa benchmark tools without a desktop manager (I'm not sure if this is feasible). In conclusion, I'll recommend first merging this pull request as a checkpoint for virtio-gpu and then adding support for VirGL in a later pull request. |
e87c823
to
f77276f
Compare
e549465
to
8459dc3
Compare
Rather than relying on Xvfb as a heavy-duty solution for validating Linux DRM/framebuffer, it might be more efficient to use lighter tools like drm-framebuffer. This tool, designed for testing drm devices, takes data from stdin and displays it, offering a simpler and more straightforward approach. |
Actually, the intention of using Xvfb here is to make sure the SDL window can be launched in the CI environment by GitHub Action. |
Merely executing |
3efbef0
to
bb98469
Compare
This is done by enforcing DirectFB2 to run with
|
endif | ||
|
||
ifeq ($(ENABLE_SDL),1) | ||
ifeq ($(ENABLE_VIRTIOGPU),1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you check ENABLE_SDL
here?
A change to the DirectFB2 is proposed for resolving the issue: Note: The issue is now resolved as the pull request is accepted. |
Follow the installation guide from: https://gitlab.freedesktop.org/virgl/virglrenderer Prerequisite: `sudo apt install libepoxy-dev`
Opened issue caramelli/yagears#4 to discuss using yagears as a test program for integrating Simultaneously, a pull request caramelli/yagears#3 is submitted to |
kmscube can be built directly with Buildroot. The log message indicates that kmscube is using
Since Mesa3D in Buildroot can be configured with VirGL support, further testing is needed to enable a hardware-accelerated pipeline. This might be achievable by setting:
# ls /usr/lib/dri/
kms_swrast_dri.so swrast_dri.so virtio_gpu_dri.so However, kmscube currently tends to hang, requiring further investigation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase the latest master
branch to pass CI pipeline for macOS.
Overview
This pull request adds basic virtio-gpu support for semu (conformed to spec. 1.2), which comprises the following changes:
libdrm
from Buildroot settingImplemented Commands
VIRTIO_GPU_CMD_GET_DISPLAY_INFO
: Notifying the guest about the display size and state (i.e., enabled or disabled).VIRTIO_GPU_CMD_RESOURCE_CREATE_2D
: Notifying the host to prepare data structure for storing image.VIRTIO_GPU_CMD_RESOURCE_UNREF
: Notifying the host to destroy data structure of a 2D resource.VIRTIO_GPU_CMD_GET_EDID
: Notifying the guest about the virtual connector's information (i.e., display).VIRTIO_GPU_CMD_GET_CAPSET_INFO
: Notifying the guest the display capability sets.VIRTIO_GPU_CMD_SET_SCANOUT
: Notifying the host to know which scanout (i.e., display) should link to which 2D resource.VIRTIO_GPU_CMD_RESOURCE_FLUSH
: Notifying the host that the image data is ready to render.VIRTIO_GPU_CMD_TRANSFER_TO_HOST_2D
: Notifying the host to copy the image data from the guest.VIRTIO_GPU_CMD_RESOURCE_ATTACH_BACKING
: Notifying the host to record some memory pages (for storing image) for a 2D resource.Test Procedures
semu
:$ cd semu/ $ make
semu
:semu
is launched, log in and executerun.sh
to load the modules:$ mkdir mnt $ mount /dev/vda mnt $ cd mnt $ sh ./run.sh
A test image should then show up in the display window.
Reference output (text-only):