public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gerd Hoffmann" <kraxel@redhat.com>
To: devel@edk2.groups.io
Cc: Pawel Polawski <ppolawsk@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>
Subject: [PATCH v2 2/6] OvmfPkg/VirtioGpuDxe: add GetDisplayInfo to virtio-gpu spec header.
Date: Fri, 11 Mar 2022 06:43:11 +0100	[thread overview]
Message-ID: <20220311054315.876774-3-kraxel@redhat.com> (raw)
In-Reply-To: <20220311054315.876774-1-kraxel@redhat.com>

Add GetDisplayInfo command, reply and data struct to the
virtio-gpu specification header file.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 OvmfPkg/Include/IndustryStandard/VirtioGpu.h | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

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


  parent reply	other threads:[~2022-03-11  5:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11  5:43 [PATCH v2 0/6] OvmfPkg/VirtioGpuDxe: use host display resolution Gerd Hoffmann
2022-03-11  5:43 ` [PATCH v2 1/6] OvmfPkg/VirtioGpuDxe: add VirtioGpuSendCommandWithReply Gerd Hoffmann
2022-03-11  5:43 ` Gerd Hoffmann [this message]
2022-03-11  5:43 ` [PATCH v2 3/6] OvmfPkg/VirtioGpuDxe: add VirtioGpuGetDisplayInfo Gerd Hoffmann
2022-03-11  5:43 ` [PATCH v2 4/6] OvmfPkg/VirtioGpuDxe: use GopQueryMode in GopSetMode Gerd Hoffmann
2022-03-11  5:43 ` [PATCH v2 5/6] OvmfPkg/VirtioGpuDxe: move code to GopInitialize Gerd Hoffmann
2022-03-11  5:43 ` [PATCH v2 6/6] OvmfPkg/VirtioGpuDxe: query native display resolution from host Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220311054315.876774-3-kraxel@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox