1
0
forked from clan/clan-core

rutabaga_gfx_ffi: unstable-2023-12-05 -> unstable-2023-12-20

This commit is contained in:
Jörg Thalheim 2023-12-21 15:46:31 +01:00
parent b6ecb0b2e2
commit 55f91079c7
4 changed files with 25 additions and 18 deletions

View File

@ -1,4 +1,4 @@
From 7ca362d01f265ef7eac0532e0e2b3b8acce1287c Mon Sep 17 00:00:00 2001
From 4cbcc9a9dab2a88d864e19000fdffd7623540002 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Thu, 7 Dec 2023 17:09:28 +0100
Subject: [PATCH 1/3] rutabaga_gfx: don't clone wayland memfd file descriptor
@ -51,10 +51,10 @@ index d15fe81bd..885c6c9d8 100644
map_info: u32,
) -> RutabagaResult<MemoryMapping> {
diff --git a/rutabaga_gfx/src/rutabaga_os/sys/linux/memory_mapping.rs b/rutabaga_gfx/src/rutabaga_os/sys/linux/memory_mapping.rs
index 73e5db169..f18e3b80a 100644
index 7eeb33f40..6d9f19124 100644
--- a/rutabaga_gfx/src/rutabaga_os/sys/linux/memory_mapping.rs
+++ b/rutabaga_gfx/src/rutabaga_os/sys/linux/memory_mapping.rs
@@ -38,7 +38,7 @@ fn drop(&mut self) {
@@ -39,7 +39,7 @@ fn drop(&mut self) {
impl MemoryMapping {
pub fn from_safe_descriptor(

View File

@ -1,4 +1,4 @@
From 76c69111118b9a63cde378f754897f8bdaf123dd Mon Sep 17 00:00:00 2001
From cfeedccee6c6e7c309369b5dc37b6525aac859b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Thu, 7 Dec 2023 18:45:37 +0100
Subject: [PATCH 2/3] rutabaga_gfx: super ugly workaround to get private
@ -9,11 +9,11 @@ Content-Transfer-Encoding: 8bit
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
---
.../rutabaga_os/sys/linux/memory_mapping.rs | 35 +++++++++++++++++--
1 file changed, 33 insertions(+), 2 deletions(-)
.../rutabaga_os/sys/linux/memory_mapping.rs | 34 +++++++++++++++++--
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/rutabaga_gfx/src/rutabaga_os/sys/linux/memory_mapping.rs b/rutabaga_gfx/src/rutabaga_os/sys/linux/memory_mapping.rs
index f18e3b80a..fe5eb684e 100644
index 6d9f19124..afd8771c8 100644
--- a/rutabaga_gfx/src/rutabaga_os/sys/linux/memory_mapping.rs
+++ b/rutabaga_gfx/src/rutabaga_os/sys/linux/memory_mapping.rs
@@ -9,6 +9,7 @@
@ -24,11 +24,9 @@ index f18e3b80a..fe5eb684e 100644
use crate::rutabaga_os::descriptor::SafeDescriptor;
use crate::rutabaga_utils::RutabagaError;
@@ -51,15 +52,45 @@ pub fn from_safe_descriptor(
};
if let Some(non_zero_size) = non_zero_opt {
+
@@ -55,14 +56,43 @@ pub fn from_safe_descriptor(
// TODO(b/315870313): Add safety comment
#[allow(clippy::undocumented_unsafe_blocks)]
let addr = unsafe {
- mmap(
+ let mut res = mmap(

View File

@ -1,4 +1,4 @@
From 37d51bb5bcf329bd098a0365dcbfbafc2222fddf Mon Sep 17 00:00:00 2001
From 83d8aa249fb4cd221aa7dbb75403553d5c96e04b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Thu, 14 Dec 2023 14:54:51 +0100
Subject: [PATCH 3/3] rutabaga_gfx: fix stale cross-domain keymap resources
@ -16,7 +16,7 @@ Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
1 file changed, 68 insertions(+), 87 deletions(-)
diff --git a/rutabaga_gfx/src/cross_domain/mod.rs b/rutabaga_gfx/src/cross_domain/mod.rs
index 6eb7ec988..34b51d4da 100644
index 260c1b6b7..2a1fb00e3 100644
--- a/rutabaga_gfx/src/cross_domain/mod.rs
+++ b/rutabaga_gfx/src/cross_domain/mod.rs
@@ -69,7 +69,7 @@ pub enum CrossDomainToken {

View File

@ -4,17 +4,18 @@
, pkg-config
, gfxstream
, libdrm
, lib
}:
rustPlatform.buildRustPackage {
pname = "rutabaga_gfx_ffi";
version = "unstable-2023-12-05";
version = "unstable-2023-12-20";
src = fetchFromGitHub {
owner = "google";
repo = "crosvm";
rev = "65b30e2ecede8056fdbfe8adbe52e9ff51d2a4e2";
hash = "sha256-9jzLFBqMGw3wYCL5006+7b9l/f1N2Jy3rw5rEzOr4M0=";
rev = "46279a0c03f8892f22ebd8c0dc19e4a6dc8aac41";
hash = "sha256-xHT3uWPGVqXFr5G08jliti5RXSsZLb6fH8eiy8cyzNY=";
fetchSubmodules = true;
};
@ -33,8 +34,16 @@ rustPlatform.buildRustPackage {
make install prefix=$out
'';
cargoHash = "sha256-jEhobp/ZNx5t20hBjisXR8SSn0776Jehy+RJZNSd2iA=";
cargoHash = "sha256-lOC0bK/nePSQCkxKHjD6xAVyvx0xGRFm/5+2jEKfwQs=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ gfxstream aemu libdrm ];
meta = with lib; {
description = "FFI bindings for rutabaga_gfx";
homepage = "https://crosvm.dev/book/appendix/rutabaga_gfx.html";
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = with maintainers; [ mic92 ];
};
}