Open Xtr126 opened 3 months ago
I915 is the driver for Intel GPU, in crosvm we uses Virtio GPU, do they relate?
I915 is the driver for Intel GPU, in crosvm we uses Virtio GPU, do they relate?
Sorry, I forgot to mention that it is libminigbm on host and not on the guest, rutabaga_gfx/build.rs in crosvm source code builds libminigbm as a static library. So I use CFLAGS=-DDRV_I915 cargo build --features gpu,virgl_renderer,wl-dmabuf --release
when building crosvm.
And patching third_party/virglrenderer to enable minigbm_allocation:
diff --git a/meson.build b/meson.build
index de6d16b5..26c6816a 100644
--- a/meson.build
+++ b/meson.build
@@ -274,7 +274,10 @@ with_render_server_worker = get_option('render-server-worker')
render_server_install_dir = get_option('prefix') / get_option('libexecdir')
if with_venus
if with_minigbm_allocation
- gbm_dep = dependency('gbm')
+ gbm_dep = declare_dependency(
+ dependencies : cc.find_library('minigbm.pie', dirs : [meson.current_build_dir() / '../minigbm']),
+ include_directories : include_directories('../minigbm'),
+ )
endif
venus_dep = dependency('vulkan')
Patching rutabaga_gfx/build.rs
diff --git a/rutabaga_gfx/build.rs b/rutabaga_gfx/build.rs
index 3acb58ea4..674c8b482 100644
--- a/rutabaga_gfx/build.rs
+++ b/rutabaga_gfx/build.rs
@@ -185,6 +185,9 @@ fn build_and_probe_virglrenderer(out_dir: &Path) -> Result<()> {
.args(get_meson_cross_args())
.arg(format!("-Dplatforms={}", platforms.join(",")))
.arg("-Ddefault_library=static")
+ .arg("-Dminigbm_allocation=true")
+ .arg("-Dvenus=true")
+ .arg("-Dbuildtype=release")
.arg(out_dir.as_os_str());
let setup_status = setup.status()?;
@@ -194,6 +197,7 @@ fn build_and_probe_virglrenderer(out_dir: &Path) -> Result<()> {
let mut compile = Command::new("meson");
compile
+ .env("CPATH", "../../../../../../third_party")
.arg("compile")
.arg("src/virglrenderer")
.current_dir(out_dir);
oh, I got it. so, My host has a amdgpu, I specified DRV_AMDGPU instead of DRV_I915, applied your patches, built and ran it, sadly the color still looks the same...
whoops, my bad, I've ran a older build instead of the new build...
on the new crosvm build, I can't see the window popping up and this appears:
[2024-09-08T09:57:25.364386741+00:00 ERROR devices::virtio::gpu] failed to open display: unsupported by the implementation
UPDATE: I missed "x" in features... After it's booted, it's still looking the same
whoops, my bad, I've ran a older build instead of the new build...
on the new crosvm build, I can't see the window popping up and this appears:
[2024-09-08T09:57:25.364386741+00:00 ERROR devices::virtio::gpu] failed to open display: unsupported by the implementation
UPDATE: I missed "x" in features... After it's booted, it's still looking the same
I only tested wayland display using --wayland-sock=, with X11 the color issue remains unresolved even with the patch.
When running Android-x86 (Bliss OS) in crosvm, I found that it has the color issue only when libminigbm is not compiled with native DRI backend (
CFLAGS=-DDRV_I915
)