OvmfPkg/VirtioGpuDxe: add VirtioGpuGetDisplayInfo

Add support for sending a GetDisplayInfo command.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
Gerd Hoffmann 2022-04-08 10:23:30 +02:00 committed by mergify[bot]
parent 182122914c
commit 82c07f2cc7
2 changed files with 26 additions and 0 deletions

View File

@ -828,3 +828,23 @@ VirtioGpuResourceFlush (
sizeof Request
);
}
EFI_STATUS
VirtioGpuGetDisplayInfo (
IN OUT VGPU_DEV *VgpuDev,
volatile VIRTIO_GPU_RESP_DISPLAY_INFO *Response
)
{
volatile VIRTIO_GPU_CONTROL_HEADER Request;
return VirtioGpuSendCommandWithReply (
VgpuDev,
VirtioGpuCmdGetDisplayInfo,
FALSE, // Fence
&Request,
sizeof Request,
VirtioGpuRespOkDisplayInfo,
&Response->Header,
sizeof *Response
);
}

View File

@ -366,6 +366,12 @@ VirtioGpuResourceFlush (
IN UINT32 ResourceId
);
EFI_STATUS
VirtioGpuGetDisplayInfo (
IN OUT VGPU_DEV *VgpuDev,
volatile VIRTIO_GPU_RESP_DISPLAY_INFO *Response
);
/**
Release guest-side and host-side resources that are related to an initialized
VGPU_GOP.Gop.