From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753614AbdESI5Q convert rfc822-to-8bit (ORCPT ); Fri, 19 May 2017 04:57:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59774 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753396AbdESI5L (ORCPT ); Fri, 19 May 2017 04:57:11 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 501F680C01 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 501F680C01 Message-ID: <1495184222.627.46.camel@redhat.com> Subject: Re: [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf From: Gerd Hoffmann To: "Chen, Xiaoguang" Cc: Alex Williamson , "Tian, Kevin" , "linux-kernel@vger.kernel.org" , "zhenyuw@linux.intel.com" , "Lv, Zhiyuan" , "intel-gvt-dev@lists.freedesktop.org" , "Wang, Zhi A" Date: Fri, 19 May 2017 10:57:02 +0200 In-Reply-To: References: <1493372130-27727-1-git-send-email-xiaoguang.chen@intel.com> <20170504100833.199bc8ba@t450s.home> <1493967331.371.53.camel@redhat.com> <20170505091115.7a680636@t450s.home> <1494509273.17970.12.camel@redhat.com> <20170511094526.164985ee@w520.home> <20170511205829.672854c3@t450s.home> <1494580325.14352.57.camel@redhat.com> <20170512103828.4a1378a1@t450s.home> <20170515114409.414d1fdb@w520.home> <20170517154331.1b465f69@w520.home> <20170518085601.51e3296a@w520.home> <1495181089.627.33.camel@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Mime-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 19 May 2017 08:57:06 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > >We could also do it the other way around: Instead of having the kernel returning > > >the plane description userspace could pass it in, and the kernel throws -EINVAL in > > >case it doesn't match due to things having changed meanwhile. > > Or just return a dmabuf based on the current plane ? If gvt is able to hand out dma-bufs for inactive planes, then yes, we can do this. Have one ioctl where we pass in the plane id, get back a plane description struct, and another where we pass in the plane description struct and get back a dma-buf fd. cheers, Gerd