From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web12.2688.1646977404586362066 for ; Thu, 10 Mar 2022 21:43:24 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZNpjFZpo; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646977403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9cdSnGsg8KgWaYrVBb70qAy6BgYKIHcDUkZ++UTxyeY=; b=ZNpjFZpo91HRdTbA7mUpR79Jei3QQmMekp8g2FMVToOaLMUxD5wRgNJdhYe6ttXPthgErO hbG/KshGXjtPHyvAk+ivImZwGqTS9REOzHOSY/4xqnZphxka0yTKXG2+xON6bCPSXL50q1 KW6Ff9fVXF3Ry/w/10qIK9A+5aStXzo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-484-IJ2QhngDN6ebz0fKKMpq5w-1; Fri, 11 Mar 2022 00:43:21 -0500 X-MC-Unique: IJ2QhngDN6ebz0fKKMpq5w-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8AA7C51DC for ; Fri, 11 Mar 2022 05:43:20 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.196.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 44D0F5DBA9; Fri, 11 Mar 2022 05:43:20 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B02B81800612; Fri, 11 Mar 2022 06:43:15 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Pawel Polawski , Gerd Hoffmann Subject: [PATCH v2 3/6] OvmfPkg/VirtioGpuDxe: add VirtioGpuGetDisplayInfo Date: Fri, 11 Mar 2022 06:43:12 +0100 Message-Id: <20220311054315.876774-4-kraxel@redhat.com> In-Reply-To: <20220311054315.876774-1-kraxel@redhat.com> References: <20220311054315.876774-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Add support for sending a GetDisplayInfo command. Signed-off-by: Gerd Hoffmann --- 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