From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752561AbdKWHvd convert rfc822-to-8bit (ORCPT ); Thu, 23 Nov 2017 02:51:33 -0500 Received: from mga14.intel.com ([192.55.52.115]:9893 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751326AbdKWHvb (ORCPT ); Thu, 23 Nov 2017 02:51:31 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,440,1505804400"; d="scan'208";a="1247563794" From: "Zhang, Tina" To: Zhenyu Wang , Gerd Hoffmann CC: "Tian, Kevin" , "alex.williamson@redhat.com" , "intel-gfx@lists.freedesktop.org" , "joonas.lahtinen@linux.intel.com" , "Wang, Zhi A" , "linux-kernel@vger.kernel.org" , "kwankhede@nvidia.com" , "Lv, Zhiyuan" , "daniel@ffwll.ch" , "chris@chris-wilson.co.uk" , "intel-gvt-dev@lists.freedesktop.org" , "Yuan, Hang" Subject: RE: [PATCH v18 0/6] drm/i915/gvt: Dma-buf support for GVT-g Thread-Topic: [PATCH v18 0/6] drm/i915/gvt: Dma-buf support for GVT-g Thread-Index: AQHTXfKRqQbsoaCAW0CjvdzBjQWS0aMUvK4AgAxFaACAAKDkYA== Date: Thu, 23 Nov 2017 07:51:28 +0000 Message-ID: <237F54289DF84E4997F34151298ABEBC7C63AF43@SHSMSX101.ccr.corp.intel.com> References: <1510737115-4258-1-git-send-email-tina.zhang@intel.com> <20171115104900.kcjpva33wfo7aurn@sirius.home.kraxel.org> <20171123061232.7kfquhnlkdctfsdp@zhen-hp.sh.intel.com> In-Reply-To: <20171123061232.7kfquhnlkdctfsdp@zhen-hp.sh.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGI1ZDEzZWItMDNiZi00MWMxLTgxYmEtNmMyNTQyZmQ4M2NiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJaenRTc0N6VTB5UHlxb3plZ01IdUJrK012T0ZaSnFZclFwc0FCNXFpSGwranhKYkh4Qk4zT0s1XC9zRlVYOGFpViJ9 x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: intel-gvt-dev [mailto:intel-gvt-dev-bounces@lists.freedesktop.org] On > Behalf Of Zhenyu Wang > Sent: Thursday, November 23, 2017 2:13 PM > To: Gerd Hoffmann > Cc: Tian, Kevin ; alex.williamson@redhat.com; intel- > gfx@lists.freedesktop.org; joonas.lahtinen@linux.intel.com; Wang, Zhi A > ; linux-kernel@vger.kernel.org; > zhenyuw@linux.intel.com; Zhang, Tina ; > kwankhede@nvidia.com; Lv, Zhiyuan ; daniel@ffwll.ch; > chris@chris-wilson.co.uk; intel-gvt-dev@lists.freedesktop.org; Yuan, Hang > > Subject: Re: [PATCH v18 0/6] drm/i915/gvt: Dma-buf support for GVT-g > > On 2017.11.15 11:49:00 +0100, Gerd Hoffmann wrote: > > On Wed, Nov 15, 2017 at 05:11:49PM +0800, Tina Zhang wrote: > > > v17->v18: > > > 1) unmap vgpu's opregion when destroying vgpu. > > > 2) update comments for VFIO_DEVICE_GET_GFX_DMABUF. (Alex) > > > > > This patch set adds the dma-buf support for intel GVT-g. > > > > > > dma-buf is an uniform mechanism to share DMA buffers across > > > different devices and subsystems. dma-buf for intel GVT-g is mainly > > > used to share the vgpu's framebuffer to userspace to leverage > > > userspace graphics stacks to render the framebuffer to the display monitor. > > > > > > The main idea is that we create a gem object and set vgpu's > > > framebuffer as its backing storage. Then, export a dma-buf associated with > this gem object. > > > With the fd of this dma-buf, userspace can directly handle this buffer. > > > > > > This patch set can be tried with the following example: > > > git://git.kraxel.org/qemu branch: work/intel-vgpu > > > > > > A topic branch with the latest patch set is: > > > https://github.com/intel/gvt-linux.git branch: topic/dmabuf > > > > Tested-by: Gerd Hoffmann > > > > After debugging with Tina on one left race that fixed by > https://lists.freedesktop.org/archives/intel-gvt-dev/2017- > November/002505.html The next version of this patch set will include this patch. Thanks. BR, Tina > > I still need below qemu fix for proper cursor handling, otherwise qemu just > crashed when I click in my terminal program which hides cursor then. > > diff --git a/hw/vfio/display.c b/hw/vfio/display.c index > e500ec2cb1..d9a044b080 100644 > --- a/hw/vfio/display.c > +++ b/hw/vfio/display.c > @@ -169,8 +169,9 @@ static void vfio_display_dmabuf_update(void *opaque) > cursor = vfio_display_get_dmabuf(vdev, DRM_PLANE_TYPE_CURSOR); > if (vdev->cursor != cursor) { > vdev->cursor = cursor; > - dpy_gl_cursor_dmabuf(vdev->display_con, > - &cursor->buf); > + if (cursor) > + dpy_gl_cursor_dmabuf(vdev->display_con, > + &cursor->buf); > free_bufs = true; > } > if (cursor != NULL) { > > And with these it seems pretty fine now that I'll queue them up for -next pull. > > thanks > > -- > Open Source Technology Center, Intel ltd. > > $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827