diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2022-04-08 10:23:30 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-04-25 21:01:13 +0000 |
commit | 82c07f2cc748b356750329435a161b00ab88bcf7 (patch) | |
tree | fdca4885170513e742479d6f5b5a1aedf5aa211c /OvmfPkg/VirtioGpuDxe/Commands.c | |
parent | 182122914ccb0f3ac268de3d0e863cdc77420f08 (diff) | |
download | edk2-82c07f2cc748b356750329435a161b00ab88bcf7.tar.gz |
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>
Diffstat (limited to 'OvmfPkg/VirtioGpuDxe/Commands.c')
-rw-r--r-- | OvmfPkg/VirtioGpuDxe/Commands.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/OvmfPkg/VirtioGpuDxe/Commands.c b/OvmfPkg/VirtioGpuDxe/Commands.c index b9a3ea9230..4318d3d771 100644 --- a/OvmfPkg/VirtioGpuDxe/Commands.c +++ b/OvmfPkg/VirtioGpuDxe/Commands.c @@ -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
+ );
+}
|