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.web11.2676.1646977403404310924 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=cQAF8j9Y; 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=1646977402; 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=0Wg6bAtyWBxK1xM64PfK/6dlcKdh0Ns2OtOwRtgBFzI=; b=cQAF8j9Yo029Waa2yxIkeYdE+CLA4G9zyrHj/endh8nK8tXUaaiDeqRu/yeZwTIrd/KFem RO0OpC7CHJdGf0Wqp79c2Q+tlTYRNy/ihWoaA4V44A1JscaAS7ZOJInExJMdTJYEqqJUoU 24ZjC/8XM9imhJAtF0JIgW1wtk/973c= 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-R2wfLcT5OliXhuFEYMz94A-1; Fri, 11 Mar 2022 00:43:21 -0500 X-MC-Unique: R2wfLcT5OliXhuFEYMz94A-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 850CF801AFC 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 400F55DBA2; Fri, 11 Mar 2022 05:43:20 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id AA8491800608; 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 2/6] OvmfPkg/VirtioGpuDxe: add GetDisplayInfo to virtio-gpu spec header. Date: Fri, 11 Mar 2022 06:43:11 +0100 Message-Id: <20220311054315.876774-3-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 GetDisplayInfo command, reply and data struct to the virtio-gpu specification header file. Signed-off-by: Gerd Hoffmann --- 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