Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp524163imm; Fri, 5 Oct 2018 07:38:40 -0700 (PDT) X-Google-Smtp-Source: ACcGV62FUJPdla/esDvJXu9wuaMVFqzh9gm/QgSyl5HMKjOh80EMn26/TYs/3LPxZfYPLU7Sa7Xz X-Received: by 2002:a63:211a:: with SMTP id h26-v6mr6667390pgh.161.1538750320161; Fri, 05 Oct 2018 07:38:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538750320; cv=none; d=google.com; s=arc-20160816; b=RvKle+8xidQW+zm8ajG4/xBV9PtFKwrY4nHxNFZFN4BkcNypDMC+bgPFG14bdU1yqZ ZJMDrC3cLPTmYq67I4K2cAgzjCdBCbDSA3urxCAw+5+l1pXltnqC+5FPb3vH+90Gtw3N GTDefY0Qn3IhtZ5CBvZXQP3VekTxr9VVclkxQopfSynjz/oXMxbNIEJeWh1GzESWRxKH HnGtQxrKqDtv5LkN41KOOOd+vsz5EzGAD6F6D5nD7jyUYcLi8/pwjxtpokbHoyeggxcc weJ+SmDHW7dzRTuZPbQFwP27DbvA8t1UpZ5qrGRcqlM8qABYQWwac3PG9Tz0N1QihQWb e3eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=oRpjLWHavUM26t+fT0VFniydG/NJNe4bCMyQZgW8aKI=; b=A3GyTtHfi3t+8RGoyfO97WVNXKMfgOnL8NM2S3zMUtg2Juw+vK681OtxW9BYhEmsmz d49g6jijhJfGRtD/uKRpmoBXuasngDXH1tgXG8pCIGGt445GXAjwfIOMI9OtIhR+6Wfl Hs7l0bYXrIoHkzEt6Rq3b9N8seHd8xlfx0M0FaksXWaO4EgRcc/HpqzDS4XjWCzXKzmZ QAh1vLp4MV+Fxj4euH9c/xtAvVdgMCHc1hRxm3kOhrqBBycAvVTRBbka/MGxVIzSt3NW ia9nUEYd5sXVoUVvYpE67bXoUgA+oXhC2XdA/JvdTDgIWhM035LVRD9IfAph4nRUskcE dWRw== 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 14-v6si3766666ple.236.2018.10.05.07.38.25; Fri, 05 Oct 2018 07:38:40 -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 S1729139AbeJEVhT convert rfc822-to-8bit (ORCPT + 99 others); Fri, 5 Oct 2018 17:37:19 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:34044 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728916AbeJEVhS (ORCPT ); Fri, 5 Oct 2018 17:37:18 -0400 Received: by mail-ed1-f66.google.com with SMTP id q19-v6so11890080edr.1 for ; Fri, 05 Oct 2018 07:38:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=9bOZnsmtI+qRo/nGXvCHQTb73ss/mKqxcOZr5ubuhsQ=; b=KuXIJ0NgZuR1woVSx1mwhHS6EKd2FEKo7nmMTdc9V7JEtu2DTWlAziFtAraVA/aJZP qxwZuYTFkpsO4yjRg58ogtfYrpHgty94dwEIerySJFSKvxorGwvcZK9PK59uzZ2IEnlU VRRz/gZc2k15Adph5NIdsmMbP/byVnmLFGRabFR6+xFjYTxDaNteWfDpJT3rxn5zDuKK CTEPK9IeXS8tQBMtP9pwvggq/L7u1io39UGdOG0Q9eVx+4z3FNLbZs/nSw7fkCe3CTjM ZYCsSHwnSj+3w/MpeZtl7dB35Ib2qTnlrL8L4J1SvcVLrMKyDGjbAloBt+IY/Vt3q84D XZKw== X-Gm-Message-State: ABuFfojTsy59X+GyjATWFVYkNp3rkS4bTCxzrzoNjEVSfVBep8ZhRd7B TWL9Ldnf9K6wqcGExdUSAIg4Lg== X-Received: by 2002:a05:6402:1602:: with SMTP id f2mr14669119edv.35.1538750296640; Fri, 05 Oct 2018 07:38:16 -0700 (PDT) Received: from [192.168.77.22] (val06-1-88-182-161-34.fbx.proxad.net. [88.182.161.34]) by smtp.gmail.com with ESMTPSA id d38-v6sm2390877edb.16.2018.10.05.07.38.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Oct 2018 07:38:15 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature From: Christophe de Dinechin In-Reply-To: <20181005125154.19824-1-kraxel@redhat.com> Date: Fri, 5 Oct 2018 16:38:11 +0200 Cc: virtio-dev@redhat.com, kvm@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , "Michael S. Tsirkin" , Jason Wang , "open list:VIRTIO GPU DRIVER" , open list Content-Transfer-Encoding: 8BIT Message-Id: <1BA83F18-87E5-4B01-A2D9-01777078B637@redhat.com> References: <20181005125154.19824-1-kraxel@redhat.com> To: Gerd Hoffmann X-Mailer: Apple Mail (2.3445.9.1) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On 5 Oct 2018, at 14:51, Gerd Hoffmann wrote: > > 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]; Wouldn’t it be enough to stick to EDID 2.0 (256 bytes)? If not, maybe add comment to explain why you chose 1024. > +}; > + > #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0) > > struct virtio_gpu_config { > -- > 2.9.3 >