dm: virtio-gpu: virtual display support

ACRN virtual monitor shown as a GUI system window of service vm.
It can display graphic outputs of guest vm which is stored in
service vm's buffers by virtio-gpu. Display operation is accelerated
by Intel GPU PF(SRIOV) device with SDL(OpenGL ES 2.0 backend) API.
This provides one generic display solution. When the virtio-gpu is
added, it will firstly try to setup the connection to graphics system
and then display the framebuffer from the guest vm in the created
window region.

Tracked-On: #7210
Signed-off-by: Sun, Peng <peng.p.sun@linux.intel.com>
Reviewed-by: Zhao, yakui <yakui.zhao@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
Sun, Peng
2022-02-23 17:55:45 +08:00
committed by acrnsi-robot
parent 37a4cdc2e0
commit bca6464e9f
6 changed files with 672 additions and 0 deletions

View File

@@ -69,6 +69,7 @@
#include "pci_util.h"
#include "vssram.h"
#include "cmd_monitor.h"
#include "vdisplay.h"
#define VM_MAXCPU 16 /* maximum virtual cpus */
@@ -98,6 +99,7 @@ bool ssram;
bool vtpm2;
bool is_winvm;
bool skip_pci_mem64bar_workaround = false;
bool gfx_ui = false;
static int guest_ncpus;
static int virtio_msix = 1;
@@ -1038,6 +1040,10 @@ main(int argc, char *argv[])
exit(1);
}
if (gfx_ui) {
gfx_ui_init();
}
for (;;) {
pr_notice("vm_create: %s\n", vmname);
ctx = vm_create(vmname, (unsigned long)ioreq_buf, &guest_ncpus);
@@ -1156,6 +1162,9 @@ fail:
create_fail:
if (cmd_monitor)
deinit_cmd_monitor();
if (gfx_ui) {
gfx_ui_deinit();
}
uninit_hugetlb();
deinit_loggers();
exit(ret);