-
Notifications
You must be signed in to change notification settings - Fork 47
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 |
@@ -0,0 +1,992 @@ | |||
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ |
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 check in GPL-2.0-only code! Instead, extract the identifiers you need.
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?
configs/linux.config
Outdated
CONFIG_LD_IS_BFD=y | ||
CONFIG_LD_VERSION=23900 | ||
CONFIG_LD_VERSION=24200 |
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 change the above.
configs/linux.config
Outdated
@@ -92,18 +96,23 @@ CONFIG_TICK_CPU_ACCOUNTING=y | |||
# CONFIG_PSI is not set | |||
# end of CPU/Task time and stats accounting | |||
|
|||
CONFIG_CPU_ISOLATION=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.
Change the configurations which are required. Minimize as possible as you can.
scripts/build-image.sh
Outdated
popd | ||
} | ||
|
||
function do_directfb_examples |
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.
Merge the function into do_directfb
.
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 |
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):