From 327fc2454cdfe36fb612c73c9994435b8602c81a Mon Sep 17 00:00:00 2001 From: Jason Macnak Date: Fri, 10 Jan 2020 12:45:36 -0800 Subject: virtio-gpu: implement 2D GPU Backend ... which does not require virglrenderer (or any renderer). This will allow the Cuttlefish team to use minigbm as its gralloc implementation when both hardware acceleration is available and unavailable. Adds a GPU `Backend` trait with all of the existing methods of the current backend and converts the existing `Backend` into `Virtio3DBackend` which implements the new trait. Adds a `Virtio2DBackend` which creates resources with byte vectors on the host and implements transfers via the old code from gpu_buffer/src/lib.rs. Adds a runtime flag to select between 2D and 3D mode with 3D mode as the default. Moves the process_resource_bridge() function to the `Frontend` and instead expose a export_resource() function on the `Backend` to avoid some code duplication. BUG=b:123764798 TEST=build + launch cuttlefish w/ 2D mode (minigbm + custom hwcomposer) TEST=built + launch cuttlefish w/ 2D mode (minigbm + drm_hwcomposer) TEST=built + launch cuttlefish w/ 3D mode (minigbm + drm_hwcomposer) Change-Id: Ie5b7a6f80f7e0da72a910644ba42d2f34b246be8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1993913 Commit-Queue: Jason Macnak Tested-by: kokoro Reviewed-by: Zach Reizner Reviewed-by: Lingfeng Yang --- gpu_display/src/gpu_display_wl.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gpu_display') diff --git a/gpu_display/src/gpu_display_wl.rs b/gpu_display/src/gpu_display_wl.rs index 04ddb54..b96b8ef 100644 --- a/gpu_display/src/gpu_display_wl.rs +++ b/gpu_display/src/gpu_display_wl.rs @@ -348,7 +348,7 @@ impl DisplayT for DisplayWl { fn release_event_device(&mut self, _event_device_id: u32) { // unsupported } - fn attach_event_device(&mut self, surface_id: u32, event_device_id: u32) { + fn attach_event_device(&mut self, _surface_id: u32, _event_device_id: u32) { // unsupported } } -- cgit 1.4.1