This change provides a route to the host side "cross domain"
allocator, which is specialized for resource sharing across domain
boundaries. It uses the upcoming CONTEXT_INIT ioctl to initialize
the backend when available, and multiple timelines to perform
metadata queries.
While it would be awesome to use the revolutionary Address Space
Graphics (ASG) algorithm for metadata queries, it would be
non-trivial to pull off in minigbm.
Key aspects of the cross-domain allocator are:
* Intelligently falls back to OpenGL texture allocation host-side
when external memory is not available. The fallback path is
named "virgl", even though it encompasses gfxstream and 2D mode.
More refactorings will be added in the future for further
clarity.
* Uses host Vulkan or minigbm to perform metadata query, and uses
a cache to minimize vmexits.
* No shadow memory. Only zero-copy blobs will be supported if the
blob is mappable. Shareable blobs may be compressed or tiled if
not mappable.
* A commitment to sharing code across Google projects and
cross-platform GPU virtualization.
The main goal here is to enable faster interation/testing, so this
code is just a prototype. It should be fine to merge via minigbm,
since the project has a very chill philosophy and even proudly
accepts code that doesn't make any sense (crrev.com/c/2583188)
[so long as existing users are not broken].
BUG=b:173630595
TEST=launch virtual machine with 2D mode
TEST=launch virtual machine with 3D mode
Change-Id: Ie33a46f19e5cdd82a2ac03bcf2351f4a8f294970
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2691716
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
This is an ABI-compatible change and the kernel gets exactly the same
ioctl number and args than before.
BUG=b:177238493
TEST=none
Change-Id: I5797164e48ffd634c1e5c07dd2e0875efa16f1e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2622849
Reviewed-by: David Riley <davidriley@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Chia-I Wu <olv@google.com>
Commit-Queue: Chia-I Wu <olv@google.com>
This updates it to keep it in sync with the latest i915 driver code in
the v5.4 kernel where protected buffer allocation is used.
BUG=b:153111783,b:155511259
TEST=Protected buffers work w/ latest kernel
Change-Id: I0a511371bf69d4009ddfa0f951c7d16ba6b2c8d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2585681
Commit-Queue: Jeffrey Kardatzke <jkardatzke@google.com>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Jeffrey Kardatzke <jkardatzke@google.com>
Auto-Submit: Jeffrey Kardatzke <jkardatzke@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Taken from libdrm. Mainly so we can have local header for
development purposes.
BUG=b:153111783,b:155511259
TEST=Protected playback works w/ associated Chrome OS changes
Change-Id: I947ab11d5fbc0c2b62dbaf8806e7897d2df79621
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2459530
Reviewed-by: Jeffrey Kardatzke <jkardatzke@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Jeffrey Kardatzke <jkardatzke@google.com>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Some SW intensive apps could benefit from this.
This should decrease power consumption when playing a Youtube
1080p60fps video by 10%.
BUG=chromium:924405
TEST=mmap_test
Change-Id: I80bb08a95b7387eb8af58e1f0d30beb695fc3e74
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/1804914
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Lingfeng Yang <lfy@google.com>
Reviewed-by: Jason Macnak <natsu@google.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>