-
Notifications
You must be signed in to change notification settings - Fork 60
Implement VirtIO GPU and input devices #34
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
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 |
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.
This comment was marked as resolved.
This comment was marked as resolved.
1d6ac07
to
a5d1866
Compare
@jserv : |
b163cb3
to
2d60050
Compare
|
||
# virtio-gpu and virgl | ||
ENABLE_VIRTIOGPU ?= 1 | ||
ENABLE_VIRGL ?= 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.
It is confusing to have VirGL here. Add comments.
configs/buildroot.config
Outdated
BR2_PACKAGE_XORG7=y | ||
BR2_PACKAGE_XSERVER_XORG_SERVER=y | ||
BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR=y | ||
BR2_PACKAGE_XLIB_LIBX11=y | ||
BR2_PACKAGE_XAPP_TWM=y | ||
BR2_PACKAGE_XAPP_XAUTH=y | ||
BR2_PACKAGE_XAPP_XCLOCK=y | ||
BR2_PACKAGE_XAPP_XINIT=y | ||
BR2_PACKAGE_XDRIVER_XF86_INPUT_LIBINPUT=y | ||
BR2_PACKAGE_XDRIVER_XF86_VIDEO_FBDEV=y | ||
BR2_PACKAGE_XTERM=y |
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.
Don't build X11 specific packages.
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.
Introduced --x11
flag in scripts/build-image.sh
for optional building.
Follow the installation guide from: https://gitlab.freedesktop.org/virgl/virglrenderer Prerequisite: `sudo apt install libepoxy-dev`
Summary
This pull request introduces initial support for
virtio-gpu
andvirtio-input
devices insemu
, conforming to the VirtIO specification 1.3.VirtIO-GPU
VirtIO MMIO transport layer
(i.e., Linux platform device)VirtIO-Input
Prerequisites
Build kernel image and test rootfs image
$ make rootfs.cpio # Download prebuilt minimal rootfs for initrd $ ./scripts/build-image.sh --all --x11 --external-root --extra-packages
Use
--x11
for full setup; omit it for a minimal setup.Run
X11
semu
:startx
X11
shows up, launch the benchmark programs:Run
DirectFB2
semu
:X11
(Skip if--x11
is not used)run.sh
:$ source ./run.sh
DirectFB2
test programs:Run
kmscube
semu
:X11
(Skip if--x11
is not used)kmscube
Run
modetest
The simplest method to test VirtIO-GPU.
Enable
BR2_PACKAGE_LIBDRM_INSTALL_TESTS
in the Buildroot then rebuild the image.Launch
semu
:modetest
programA test image should then show up in the display window.