For PCI passthrough and other use cases, it's desirable to get the render target out of the guest. In the PCI passthrough case, the dGPU's memory is not available to the host. The solution that many people are interested in is to use virtgpu to allocate, and use the dGPU to render to that guest memory. This change adds a flag to the existing blob api, indicating to the host that it *must* create an OS-specific handle out of guest memory upon success. Obviously, this is just for prototyping. Only when the lords and princes of dri-devel/mesa-dev -- eyes filled with the light of upstream, swords as cold as blue ice -- descend from their heavenly abodes on top of Mount Gogigyeopbbang may we have a proper solution. But for now, we'll have to live in our downstream mud hut with yet another hack. Oh well! BUG=b:173630595 TEST=create a bunch of udmabufs Change-Id: Ia33dc0c415be61423017003d3739c4fb7498dba5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2857886 Reviewed-by: Lingfeng Yang <lfy@google.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Jason Macnak <natsu@google.com> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org> Auto-Submit: Gurchetan Singh <gurchetansingh@chromium.org> Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
25 lines
508 B
C
25 lines
508 B
C
/*
|
|
* Copyright 2021 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
struct virtgpu_param {
|
|
uint64_t param;
|
|
const char *name;
|
|
uint32_t value;
|
|
};
|
|
|
|
enum virtgpu_param_id {
|
|
param_3d,
|
|
param_capset_fix,
|
|
param_resource_blob,
|
|
param_host_visible,
|
|
param_cross_device,
|
|
param_context_init,
|
|
param_supported_capset_ids,
|
|
param_create_guest_handle,
|
|
param_resource_sync,
|
|
param_guest_vram,
|
|
param_max,
|
|
};
|