mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-10 10:41:53 +00:00
vga: add virtio-gl display type for VIRGL
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
a183576e30
commit
6f070e39de
@ -181,7 +181,7 @@ my $vga_fmt = {
|
||||
default => 'std',
|
||||
optional => 1,
|
||||
default_key => 1,
|
||||
enum => [qw(cirrus qxl qxl2 qxl3 qxl4 none serial0 serial1 serial2 serial3 std virtio vmware)],
|
||||
enum => [qw(cirrus qxl qxl2 qxl3 qxl4 none serial0 serial1 serial2 serial3 std virtio virtio-gl vmware)],
|
||||
},
|
||||
memory => {
|
||||
description => "Sets the VGA memory (in MiB). Has no effect with serial display.",
|
||||
@ -1821,6 +1821,7 @@ my $vga_map = {
|
||||
'std' => 'VGA',
|
||||
'vmware' => 'vmware-svga',
|
||||
'virtio' => 'virtio-vga',
|
||||
'virtio-gl' => 'virtio-vga-gl',
|
||||
};
|
||||
|
||||
sub print_vga_device {
|
||||
@ -1848,7 +1849,7 @@ sub print_vga_device {
|
||||
|
||||
my $memory = "";
|
||||
if ($vgamem_mb) {
|
||||
if ($vga->{type} eq 'virtio') {
|
||||
if ($vga->{type} =~ /^virtio/) {
|
||||
my $bytes = PVE::Tools::convert_size($vgamem_mb, "mb" => "b");
|
||||
$memory = ",max_hostmem=$bytes";
|
||||
} elsif ($qxlnum) {
|
||||
@ -3762,6 +3763,9 @@ sub config_to_command {
|
||||
if ($vga->{type} && $vga->{type} !~ m/^serial\d+$/ && $vga->{type} ne 'none'){
|
||||
push @$devices, '-device', print_vga_device(
|
||||
$conf, $vga, $arch, $machine_version, $machine_type, undef, $qxlnum, $bridges);
|
||||
|
||||
push @$cmd, '-display', 'egl-headless,gl=core' if $vga->{type} eq 'virtio-gl'; # VIRGL
|
||||
|
||||
my $socket = PVE::QemuServer::Helpers::vnc_socket($vmid);
|
||||
push @$cmd, '-vnc', "unix:$socket,password=on";
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user