summary refs log tree commit diff
path: root/gpu_display
diff options
context:
space:
mode:
authorJason Macnak <natsu@google.com>2020-01-10 12:45:36 -0800
committerCommit Bot <commit-bot@chromium.org>2020-02-03 11:14:22 +0000
commit327fc2454cdfe36fb612c73c9994435b8602c81a (patch)
treea1fc9a44068612168c1db7884189714d9e4f78ee /gpu_display
parentbc499ec2780510083f001bef569449808ad55850 (diff)
downloadcrosvm-327fc2454cdfe36fb612c73c9994435b8602c81a.tar
crosvm-327fc2454cdfe36fb612c73c9994435b8602c81a.tar.gz
crosvm-327fc2454cdfe36fb612c73c9994435b8602c81a.tar.bz2
crosvm-327fc2454cdfe36fb612c73c9994435b8602c81a.tar.lz
crosvm-327fc2454cdfe36fb612c73c9994435b8602c81a.tar.xz
crosvm-327fc2454cdfe36fb612c73c9994435b8602c81a.tar.zst
crosvm-327fc2454cdfe36fb612c73c9994435b8602c81a.zip
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 <natsu@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Lingfeng Yang <lfy@google.com>
Diffstat (limited to 'gpu_display')
-rw-r--r--gpu_display/src/gpu_display_wl.rs2
1 files changed, 1 insertions, 1 deletions
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
     }
 }