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 | |
parent | 182122914ccb0f3ac268de3d0e863cdc77420f08 (diff) | |
download | edk2-82c07f2cc748b356750329435a161b00ab88bcf7.tar.gz edk2-82c07f2cc748b356750329435a161b00ab88bcf7.tar.bz2 edk2-82c07f2cc748b356750329435a161b00ab88bcf7.zip |
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')
-rw-r--r-- | OvmfPkg/VirtioGpuDxe/Commands.c | 20 | ||||
-rw-r--r-- | OvmfPkg/VirtioGpuDxe/VirtioGpu.h | 6 |
2 files changed, 26 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
+ );
+}
diff --git a/OvmfPkg/VirtioGpuDxe/VirtioGpu.h b/OvmfPkg/VirtioGpuDxe/VirtioGpu.h index 2155b261d4..1d781088bb 100644 --- a/OvmfPkg/VirtioGpuDxe/VirtioGpu.h +++ b/OvmfPkg/VirtioGpuDxe/VirtioGpu.h @@ -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.
|