]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/VirtioGpuDxe: add GetDisplayInfo to virtio-gpu spec header.
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 8 Apr 2022 08:23:29 +0000 (10:23 +0200)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 25 Apr 2022 21:01:13 +0000 (21:01 +0000)
Add GetDisplayInfo command, reply and data struct to the
virtio-gpu specification header file.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
OvmfPkg/Include/IndustryStandard/VirtioGpu.h

index 12559ccef5b101c788f630c1892c65e81c43493b..13f719d4c0f2da4bcda316b75e115750a85f61f0 100644 (file)
@@ -37,6 +37,7 @@ typedef enum {
   //\r
   // - create/release a host-side 2D resource,\r
   //\r
+  VirtioGpuCmdGetDisplayInfo   = 0x0100,\r
   VirtioGpuCmdResourceCreate2d = 0x0101,\r
   VirtioGpuCmdResourceUnref    = 0x0102,\r
   //\r
@@ -64,7 +65,8 @@ typedef enum {
   //\r
   // Success code for all of the above commands.\r
   //\r
-  VirtioGpuRespOkNodata = 0x1100,\r
+  VirtioGpuRespOkNodata      = 0x1100,\r
+  VirtioGpuRespOkDisplayInfo = 0x1101,\r
 } VIRTIO_GPU_CONTROL_TYPE;\r
 \r
 //\r
@@ -207,4 +209,19 @@ typedef struct {
 } VIRTIO_GPU_RESOURCE_FLUSH;\r
 #pragma pack ()\r
 \r
+//\r
+// Response structure for VirtioGpuCmdGetDisplayInfo\r
+//\r
+#define VIRTIO_GPU_MAX_SCANOUTS  16\r
+#pragma pack (1)\r
+typedef struct {\r
+  VIRTIO_GPU_CONTROL_HEADER    Header;\r
+  struct {\r
+    VIRTIO_GPU_RECTANGLE    Rectangle;\r
+    UINT32                  Enabled;\r
+    UINT32                  Flags;\r
+  } Pmodes[VIRTIO_GPU_MAX_SCANOUTS];\r
+} VIRTIO_GPU_RESP_DISPLAY_INFO;\r
+#pragma pack ()\r
+\r
 #endif // _VIRTIO_GPU_H_\r