From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752644AbdKWGSG (ORCPT ); Thu, 23 Nov 2017 01:18:06 -0500 Received: from mga11.intel.com ([192.55.52.93]:2356 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752090AbdKWGSF (ORCPT ); Thu, 23 Nov 2017 01:18:05 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,440,1505804400"; d="asc'?scan'208";a="176837972" Date: Thu, 23 Nov 2017 14:12:32 +0800 From: Zhenyu Wang To: Gerd Hoffmann Cc: Tina Zhang , kevin.tian@intel.com, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, joonas.lahtinen@linux.intel.com, kwankhede@nvidia.com, zhenyuw@linux.intel.com, chris@chris-wilson.co.uk, alex.williamson@redhat.com, zhiyuan.lv@intel.com, daniel@ffwll.ch, hang.yuan@intel.com, intel-gvt-dev@lists.freedesktop.org, zhi.a.wang@intel.com Subject: Re: [PATCH v18 0/6] drm/i915/gvt: Dma-buf support for GVT-g Message-ID: <20171123061232.7kfquhnlkdctfsdp@zhen-hp.sh.intel.com> Reply-To: Zhenyu Wang References: <1510737115-4258-1-git-send-email-tina.zhang@intel.com> <20171115104900.kcjpva33wfo7aurn@sirius.home.kraxel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mqob4dgubn27j2lp" Content-Disposition: inline In-Reply-To: <20171115104900.kcjpva33wfo7aurn@sirius.home.kraxel.org> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --mqob4dgubn27j2lp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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) >=20 > > This patch set adds the dma-buf support for intel GVT-g. > >=20 > > 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 stac= ks > > to render the framebuffer to the display monitor. > >=20 > > 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 ob= ject. > > With the fd of this dma-buf, userspace can directly handle this buffer. > >=20 > > This patch set can be tried with the following example: > > git://git.kraxel.org/qemu branch: work/intel-vgpu > >=20 > > A topic branch with the latest patch set is: > > https://github.com/intel/gvt-linux.git branch: topic/dmabuf >=20 > Tested-by: Gerd Hoffmann >=20 After debugging with Tina on one left race that fixed by https://lists.freedesktop.org/archives/intel-gvt-dev/2017-November/002505.h= tml 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 =3D vfio_display_get_dmabuf(vdev, DRM_PLANE_TYPE_CURSOR); if (vdev->cursor !=3D cursor) { vdev->cursor =3D cursor; - dpy_gl_cursor_dmabuf(vdev->display_con, - &cursor->buf); + if (cursor) + dpy_gl_cursor_dmabuf(vdev->display_con, + &cursor->buf); free_bufs =3D true; } if (cursor !=3D NULL) { And with these it seems pretty fine now that I'll queue them up for -next p= ull. thanks --=20 Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 --mqob4dgubn27j2lp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQTXuabgHDW6LPt9CICxBBozTXgYJwUCWhZm0AAKCRCxBBozTXgY J/YsAJ4zlLpWQVnKZalRTVhDTNtyafOrmQCeK53vKtxBAMkjmawGr34KDYdOeyE= =GGLp -----END PGP SIGNATURE----- --mqob4dgubn27j2lp--