Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp588823imm; Fri, 5 Oct 2018 08:34:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV63nOupiwMXMTr78ePx0wKhq4wblQFn/JfsXMcObNF29IlrUeoT1RO4ugbLWfscv+/StAraM X-Received: by 2002:a65:6249:: with SMTP id q9-v6mr10570422pgv.392.1538753679455; Fri, 05 Oct 2018 08:34:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538753679; cv=none; d=google.com; s=arc-20160816; b=Ny98jKoVjIoRUphuvkfyVJ9CACM8ue3Y9Ty78sP/eFLPRpbz1XtTcMeNNFfxsRjSA+ o2Eza5qmqhPLbCl4RmqLbCGj/EEnLhu0KhEYHH1PO3N4+7eZ2XS4IHpW4iDZsP2CTqwZ JjT7ry6jNOCzueBnmZFBZwC9AB97R8o8bTVHLvUdQvvd9EjVz2S8EbCqrj4SBTaYjMst ITmkQMTO/wb7c2fWtk1FpvD+gkLb26m3RAKrlqSCZ6PlCF/FHnRJI4mbmUBGNCdAErr/ PpfU4auAa6LqjIHvi1EeA//IrwRVdGRjpSWj3h9cKhEFX42avG98vE/W8ltrkqCZ0zdv CkUw== 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=+GpS6Y5OjK0W9Byi7F4Swx2vluhJwc0tdTn8R/zK8qw=; b=GXS6bNnXnCTJEyDf8qnaRZetl2b28M1C1rIgiEg/6FQDxPAT0DfZVs6MPLEVbF16ep 6Er/r5O7huG4zg90y1SF1CfDgXto2ar5V4jGrJmjW4U+INzWSx1YjxYmPD7lKUzzHHQX G3aITI+i9/ZnLl7gn885eSc6xBYHKEunvDInIfAjB3R94xCFrDeVzlZS60j4vis427+i 0O025Hegx5zxEplXWg5yPRq2vN9WpeWAB1X+oE42p53Hiq92AN+r2yxXqEhsQJ5oFwvM ni7tK1Ba3Q2hjKXgeE30WNFeKP2aOgl+a9lNhDwLIOwuRaA/XoaRvie/o6mvXgc0FuiX GiKQ== 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 t19-v6si9812758pfm.152.2018.10.05.08.34.24; Fri, 05 Oct 2018 08:34:39 -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 S1728614AbeJEWdI convert rfc822-to-8bit (ORCPT + 99 others); Fri, 5 Oct 2018 18:33:08 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:42150 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727572AbeJEWdI (ORCPT ); Fri, 5 Oct 2018 18:33:08 -0400 Received: by mail-ed1-f66.google.com with SMTP id b7-v6so5424819edd.9 for ; Fri, 05 Oct 2018 08:33:55 -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=vfD2hkc6A7Ng/TUG8sg5MrzsrxO0H6pNnp7VTDvolys=; b=fe7mw9OGkAwcl1ShcvHz00wyagdAMxoiROy/q0DGACZU9a+A9jb+gXllxe9D8eO37M KglrvvrYjBJ/OWDnlcnUQwX+LsR+e0uAjSdk6snRhx8LgA1OA/xuvGAkAmQChO0E6xl3 IpQiw1sbCE0Pk2nTzQo6EANV8BLu5Tsu1bSg89smAMXvfOohHTp9DDahFNh3T+0aRWYr +B+tIRbW0LzvEPbBELPq07uJDlExOLdOXUFsI2lnsesw76Jn86t69k/DAADA9jd4RuFc 8BgzJarbnLRhnrQ7JBvZ8U9NwGWgkrnXiCC0AcPHZDO3AENSrIvJrdwbE0EY6cQEwF+r lhrQ== X-Gm-Message-State: ABuFfog872xiA+tvop20FNUH66beVJNVyMiYD60L2oi0s5S0iFCLFgE3 fPEyxLFevkgZQnHODekSnYizlQ== X-Received: by 2002:a50:9886:: with SMTP id j6-v6mr15323831edb.160.1538753634472; Fri, 05 Oct 2018 08:33:54 -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 z33-v6sm2670913edb.85.2018.10.05.08.33.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Oct 2018 08:33:53 -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: <20181005144127.GE31561@phenom.ffwll.local> Date: Fri, 5 Oct 2018 17:33:50 +0200 Cc: Gerd Hoffmann , kvm@vger.kernel.org, "Michael S. Tsirkin" , David Airlie , open list , Jason Wang , virtio-dev@redhat.com, dri-devel@lists.freedesktop.org, "open list:VIRTIO GPU DRIVER" Content-Transfer-Encoding: 8BIT Message-Id: <2CB183E2-B7ED-481C-9899-CA908558D39F@redhat.com> References: <20181005125154.19824-1-kraxel@redhat.com> <1BA83F18-87E5-4B01-A2D9-01777078B637@redhat.com> <20181005144127.GE31561@phenom.ffwll.local> To: Daniel Vetter 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 16:41, Daniel Vetter wrote: > > On Fri, Oct 05, 2018 at 04:38:11PM +0200, Christophe de Dinechin wrote: >> >> >>> 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. > > EDID in the wild can be up to 512 bytes. Does this return a physical EDID? I thought it would be made-up by virtio-gpu. Thanks, Christophe > >> >>> +}; >>> + >>> #define VIRTIO_GPU_EVENT_DISPLAY (1 << 0) >>> >>> struct virtio_gpu_config { >>> -- >>> 2.9.3 >>> >> >> _______________________________________________ >> dri-devel mailing list >> dri-devel@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/dri-devel > > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch