Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp406207imm; Fri, 5 Oct 2018 05:52:59 -0700 (PDT) X-Google-Smtp-Source: ACcGV626LJDvkev1IcWtOVrROSwQyJhTablcXxNAWc5rpQGdAdgUTTEnR6S1LmrGn8PiYr2A5GEG X-Received: by 2002:a62:968a:: with SMTP id s10-v6mr11643528pfk.191.1538743979017; Fri, 05 Oct 2018 05:52:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538743978; cv=none; d=google.com; s=arc-20160816; b=UPU9kaJXuXHmL572NyTqNYV6Vz7gkKaM8i0uzMSCSsMSw1s9RxpmLs3qK625pop3FI oVGAwq/T6ROCLBM1/d2oIWQaRDYhNf85V3cqua7aFDDErrxI9RDgluJz/07cNbMDioQV 5oumyCmd+MlSxLvpuxUqeMzleP6FZBfPrXvJJUKGcv/T0d4udu9WjGIHl6ilFs7UCfSC lbJxD2f4BVrORwoLydG/UjfCYRtUD+Wn/eSxUJnqSM+M3hXAPqe3HLyYVSZ+EPYp8W2g lKfjPvWjo8gwVc6ZMQHRw4jKTfXwFjpQHOFmT/8Ga6/KuetCvj4UyYvxSqWod05YuF9H RimA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=U8uF+eDA5vnpcjX+bZ6SqIgFCXmqR+aL5XgElbmOdt4=; b=xCi3VA/vXhzaqzZVMHwLNmpI0T3PFS+AWc2DrsDejgJHo4h10yoyeSJ7AnogZNmMBG OOTQFM20zdJs4gWCxeGSYvLGsb5gyYpzi9BRn/TnP+tvz602RfdmIVlU3yqnC2VNemBU ybqK1GrTx9hsRNvVKWWjmroYhLwZcWtl2YIJYNlBeE93lRTbBOO4VEmdUia3egF9DT61 CxT+V8DHNyLL5WU+VmP4qtTT64RtmSj4JkYUCDY66Kvq+MFCtPbKTg+iQan9Mc6idneB +78WiVtX/hPcH06oNFutniR/v6ZeOm32s+aYh41Nt/NjS/ta+b8A2JN93MN1hSzKCLi0 29+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e18-v6si6631116pgh.388.2018.10.05.05.52.42; Fri, 05 Oct 2018 05:52:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728459AbeJETvI (ORCPT + 99 others); Fri, 5 Oct 2018 15:51:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59426 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727701AbeJETvI (ORCPT ); Fri, 5 Oct 2018 15:51:08 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AE4227F6B0; Fri, 5 Oct 2018 12:52:32 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-29.ams2.redhat.com [10.36.116.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id D5B1E5D9C8; Fri, 5 Oct 2018 12:52:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0A989982BD; Fri, 5 Oct 2018 14:52:25 +0200 (CEST) From: Gerd Hoffmann To: virtio-dev@redhat.com Cc: kvm@vger.kernel.org, dri-devel@lists.freedesktop.org, Gerd Hoffmann , David Airlie , "Michael S. Tsirkin" , Jason Wang , virtualization@lists.linux-foundation.org (open list:VIRTIO GPU DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature Date: Fri, 5 Oct 2018 14:51:54 +0200 Message-Id: <20181005125154.19824-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 05 Oct 2018 12:52:32 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The feature allows the guest request an EDID blob (describing monitor capabilities) for a given scanout (aka virtual monitor connector). It brings a new command message, which has just a scanout field (beside the standard virtio-gpu header) and a response message which carries the EDID data. Signed-off-by: Gerd Hoffmann --- include/uapi/linux/virtio_gpu.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h index f43c3c6171..1cef1ff339 100644 --- a/include/uapi/linux/virtio_gpu.h +++ b/include/uapi/linux/virtio_gpu.h @@ -41,6 +41,7 @@ #include #define VIRTIO_GPU_F_VIRGL 0 +#define VIRTIO_GPU_F_EDID 1 enum virtio_gpu_ctrl_type { VIRTIO_GPU_UNDEFINED = 0, @@ -56,6 +57,7 @@ enum virtio_gpu_ctrl_type { VIRTIO_GPU_CMD_RESOURCE_DETACH_BACKING, VIRTIO_GPU_CMD_GET_CAPSET_INFO, VIRTIO_GPU_CMD_GET_CAPSET, + VIRTIO_GPU_CMD_GET_EDID, /* 3d commands */ VIRTIO_GPU_CMD_CTX_CREATE = 0x0200, @@ -76,6 +78,7 @@ enum virtio_gpu_ctrl_type { VIRTIO_GPU_RESP_OK_DISPLAY_INFO, VIRTIO_GPU_RESP_OK_CAPSET_INFO, VIRTIO_GPU_RESP_OK_CAPSET, + VIRTIO_GPU_RESP_OK_EDID, /* error responses */ VIRTIO_GPU_RESP_ERR_UNSPEC = 0x1200, @@ -291,6 +294,20 @@ struct virtio_gpu_resp_capset { __u8 capset_data[]; }; +/* VIRTIO_GPU_CMD_GET_EDID */ +struct virtio_gpu_get_edid { + struct virtio_gpu_ctrl_hdr hdr; + __le32 scanout; +}; + +/* VIRTIO_GPU_RESP_OK_EDID */ +struct virtio_gpu_resp_edid { + struct virtio_gpu_ctrl_hdr hdr; + __le32 scanout; + __le32 size; + __u8 edid[1024]; +}; + #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0) struct virtio_gpu_config { -- 2.9.3