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 3/6] OvmfPkg/VirtioGpuDxe: add VirtioGpuGetDisplayInfo
Date: Fri, 11 Mar 2022 06:43:12 +0100 [thread overview]
Message-ID: <20220311054315.876774-4-kraxel@redhat.com> (raw)
In-Reply-To: <20220311054315.876774-1-kraxel@redhat.com>
Add support for sending a GetDisplayInfo command.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
OvmfPkg/VirtioGpuDxe/VirtioGpu.h | 6 ++++++
OvmfPkg/VirtioGpuDxe/Commands.c | 20 ++++++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/OvmfPkg/VirtioGpuDxe/VirtioGpu.h b/OvmfPkg/VirtioGpuDxe/VirtioGpu.h
index 2155b261d43e..1d781088bb3f 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.
diff --git a/OvmfPkg/VirtioGpuDxe/Commands.c b/OvmfPkg/VirtioGpuDxe/Commands.c
index b9a3ea923021..4318d3d771c5 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
+ );
+}
--
2.35.1
next prev 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 ` [PATCH v2 2/6] OvmfPkg/VirtioGpuDxe: add GetDisplayInfo to virtio-gpu spec header Gerd Hoffmann
2022-03-11 5:43 ` Gerd Hoffmann [this message]
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-4-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