Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3287029ybv; Mon, 24 Feb 2020 22:16:36 -0800 (PST) X-Google-Smtp-Source: APXvYqyIDSmzdFfzt2ef388LQixEf5/sWxI0xuOEdy6F0NkMWdwUkd/b0s2Cwivnnk8kQkVgfAxz X-Received: by 2002:aca:50cd:: with SMTP id e196mr2204452oib.178.1582611396524; Mon, 24 Feb 2020 22:16:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582611396; cv=none; d=google.com; s=arc-20160816; b=wtzNFyxoQdCMI64fr1iEAkRLHzoGHlTl3sP6a2+KEsleqm5Y87gfKrEQKPtoDHwHDl pdnJjEEAwIV0MgHkMZaN0DzyLbT5J2l6o0wTw2p2rXYTj4Jvs8kGtRKdAOpnWgr7u/wA ldIqRmpvwzY5/k8Wl41ULq9/7TUTGr2nzyX7Sxuv5GXjYjeyBB/VO30Jt+nySSiIm4AI n7zXIkt8bjQvaF3qVyG4Mop6r3TKhwkVJFIrDgEq7LGima8ptsUhPM7Y1vLOJt65QcTC VWNLDP/uLER5EDVtHwx+HAXliVDQ5lQy/7nFiHLm2DzkdY7obWw0hHArXaMPptEaSnrA WkOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=hDZAej/jLK8gD+nYYr2L2sjjutU8DKWcsuwzak4gi7I=; b=U9Sd1ote5ADkBL50rZPcNhz6a7qidzhwHvJ/bKxtT6KN1vrPvAQBEQ4vTsMNc+iBMm xF1Lps/sirpJQBzscYGZYo910K1p5ok1KEUqS9eS5yHZEAt5BzK02AilDtNzEIiYeJp/ n7qbkpU+iu0nKXdC2W0H64fF/oGxGOOmexN+z1Deam11BSEUZHfdgTmgMZK2lfvr3XdA iMB2D0IQHZm3n6t+UjTv/dWVL9TmLb3gq76e3Bxc7pOoA0n1yHjkrTbPvUPgCeduWwWg SD/yjDtBiYnYp8ZpO0lLaTLCLLAoap1xANVEe6Nehga1H02x1VTuDFe9kdk+Dc8Uj6Nn szQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FRatEjkG; 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=pass (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 p23si7843808otk.119.2020.02.24.22.16.24; Mon, 24 Feb 2020 22:16:36 -0800 (PST) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FRatEjkG; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728931AbgBYGPs (ORCPT + 99 others); Tue, 25 Feb 2020 01:15:48 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:37120 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725837AbgBYGPs (ORCPT ); Tue, 25 Feb 2020 01:15:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582611347; 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: in-reply-to:in-reply-to:references:references; bh=hDZAej/jLK8gD+nYYr2L2sjjutU8DKWcsuwzak4gi7I=; b=FRatEjkGVSyYmRQICZzOlBxie83oppEe/P8RKOgRJNpW4vliY8tjO6bxV+wBjF3tYQ9Fsq o5ltoByZPqVlZycsmvciykw9dbNJrzw5JZeIonHwNaFhZls91dhYVpUQ6TxeL6LRydAv8W WadBonzrCgFiJIWc19UZd2PBSN0lqPE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-360-2nRtSc6BMcuaowpCU87-3A-1; Tue, 25 Feb 2020 01:15:43 -0500 X-MC-Unique: 2nRtSc6BMcuaowpCU87-3A-1 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 281051005512; Tue, 25 Feb 2020 06:15:42 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-87.ams2.redhat.com [10.36.116.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id 42A105D9CD; Tue, 25 Feb 2020 06:15:39 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 7CFCF1747F; Tue, 25 Feb 2020 07:15:38 +0100 (CET) Date: Tue, 25 Feb 2020 07:15:38 +0100 From: Gerd Hoffmann To: David Stevens Cc: David Airlie , Daniel Vetter , "Michael S . Tsirkin" , Jason Wang , Sumit Semwal , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, virtio-dev@lists.oasis-open.org Subject: Re: [PATCH 2/2] drm/virtio: Support virtgpu exported resources Message-ID: <20200225061538.2qlkhfbhv2pl3oku@sirius.home.kraxel.org> References: <20200219080637.61312-1-stevensd@chromium.org> <20200219080637.61312-3-stevensd@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200219080637.61312-3-stevensd@chromium.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > +struct dma_buf *virtgpu_gem_prime_export(struct drm_gem_object *obj, > + int flags) > +{ [ ... ] > +} > + > +struct drm_gem_object *virtgpu_gem_prime_import(struct drm_device *dev, > + struct dma_buf *buf) > +{ [ ... ] > +} More code duplication. > diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h > index 0c85914d9369..9c428ef03060 100644 > --- a/include/uapi/linux/virtio_gpu.h > +++ b/include/uapi/linux/virtio_gpu.h API change should go to a separate patch. > +/* > + * VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID > + */ > +#define VIRTIO_GPU_F_CROSS_DEVICE 2 Hmm, how about VIRTIO_GPU_F_RESOURCE_UUID ? > @@ -87,6 +92,7 @@ enum virtio_gpu_ctrl_type { > VIRTIO_GPU_RESP_OK_CAPSET_INFO, > VIRTIO_GPU_RESP_OK_CAPSET, > VIRTIO_GPU_RESP_OK_EDID, > + VIRTIO_GPU_RESP_OK_RESOURCE_ASSIGN_UUID, The "assign" doesn't make sense in the reply. I'd name that VIRTIO_GPU_RESP_OK_RESOURCE_UUID or just VIRTIO_GPU_RESP_OK_UUID, > +/* VIRTIO_GPU_RESP_OK_RESOURCE_ASSIGN_UUID */ > +struct virtio_gpu_resp_resource_assign_uuid { > + struct virtio_gpu_ctrl_hdr hdr; > + __u8 uuid[16]; > +}; Same here. cheers, Gerd