From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhiyuan Lv Subject: Re: [Announcement] 2015-Q3 release of XenGT - a Mediated Graphics Passthrough Solution from Intel Date: Fri, 20 Nov 2015 16:46:38 +0800 Message-ID: <20151120084638.GA13304@zlv-hp-dev> References: <54AF967B.3060503@intel.com> <5527CEC4.9080700@intel.com> <559B3E38.1080707@intel.com> <562F4311.9@intel.com> <1447870341.4697.92.camel@redhat.com> <1447922452.25140.39.camel@redhat.com> <1448007960.6904.22.camel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id C242E6E100 for ; Fri, 20 Nov 2015 00:55:13 -0800 (PST) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: "Tian, Kevin" , Gerd Hoffmann Cc: "igvt-g@ml01.01.org" , "Reddy, Raghuveer" , "White, Michael L" , "Cowperthwaite, David J" , "intel-gfx@lists.freedesktop.org" , "Li, Susie" , "Dong, Eddie" , "linux-kernel@vger.kernel.org" , "xen-devel@lists.xen.org" , qemu-devel , "Zhou, Chao" , Paolo Bonzini , "Zhu, Libo" , "Wang, Hongbo" List-Id: intel-gfx@lists.freedesktop.org T24gRnJpLCBOb3YgMjAsIDIwMTUgYXQgMDQ6MzY6MTVQTSArMDgwMCwgVGlhbiwgS2V2aW4gd3Jv dGU6Cj4gPiBGcm9tOiBHZXJkIEhvZmZtYW5uIFttYWlsdG86a3JheGVsQHJlZGhhdC5jb21dCj4g PiBTZW50OiBGcmlkYXksIE5vdmVtYmVyIDIwLCAyMDE1IDQ6MjYgUE0KPiA+IAo+ID4gICBIaSwK PiA+IAo+ID4gPiA+IGlHVlQtZ19TZXR1cF9HdWlkZS50eHQgbWVudGlvbnMgYSAiSW5kaXJ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vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162339AbbKTIzT (ORCPT ); Fri, 20 Nov 2015 03:55:19 -0500 Received: from mga09.intel.com ([134.134.136.24]:54726 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161067AbbKTIzN (ORCPT ); Fri, 20 Nov 2015 03:55:13 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,321,1444719600"; d="scan'208";a="690267778" Date: Fri, 20 Nov 2015 16:46:38 +0800 From: Zhiyuan Lv To: "Tian, Kevin" , Gerd Hoffmann Cc: Alex Williamson , "Song, Jike" , "xen-devel@lists.xen.org" , "igvt-g@ml01.01.org" , "intel-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "White, Michael L" , "Dong, Eddie" , "Li, Susie" , "Cowperthwaite, David J" , "Reddy, Raghuveer" , "Zhu, Libo" , "Zhou, Chao" , "Wang, Hongbo" , qemu-devel , Paolo Bonzini Subject: Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated Graphics Passthrough Solution from Intel Message-ID: <20151120084638.GA13304@zlv-hp-dev> Mail-Followup-To: "Tian, Kevin" , Gerd Hoffmann , Alex Williamson , "Song, Jike" , "xen-devel@lists.xen.org" , "igvt-g@ml01.01.org" , "intel-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "White, Michael L" , "Dong, Eddie" , "Li, Susie" , "Cowperthwaite, David J" , "Reddy, Raghuveer" , "Zhu, Libo" , "Zhou, Chao" , "Wang, Hongbo" , qemu-devel , Paolo Bonzini References: <54AF967B.3060503@intel.com> <5527CEC4.9080700@intel.com> <559B3E38.1080707@intel.com> <562F4311.9@intel.com> <1447870341.4697.92.camel@redhat.com> <1447922452.25140.39.camel@redhat.com> <1448007960.6904.22.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 20, 2015 at 04:36:15PM +0800, Tian, Kevin wrote: > > From: Gerd Hoffmann [mailto:kraxel@redhat.com] > > Sent: Friday, November 20, 2015 4:26 PM > > > > Hi, > > > > > > iGVT-g_Setup_Guide.txt mentions a "Indirect Display Mode", but doesn't > > > > explain how the guest framebuffer can be accessed then. > > > > > > You can check "fb_decoder.h". One thing to clarify. Its format is > > > actually based on drm definition, instead of OpenGL. Sorry for > > > that. > > > > drm is fine. That header explains the format, but not how it can be > > accessed. Is the guest fb exported as dma-buf? > > Currently not, but per our previous discussion we should move to use > dma-buf. We have some demo code in user space. Not sure whether > they're public now. Jike could you help do a check? Our current implementation did not use dma-buf yet, still based on DRM_FLINK interface. We will switch to dma-buf. Thanks! Regards, -Zhiyuan > > > > > > > So, for non-opengl rendering qemu needs the guest framebuffer data so it > > > > can feed it into the vnc server. The vfio framebuffer region is meant > > > > to support this use case. > > > > > > what's the format requirement on that framebuffer? If you are familiar > > > with Intel Graphics, there's a so-called tiling feature applied on frame > > > buffer so it can't be used as a raw input to vnc server. w/o opengl you > > > need do some conversion on CPU first. > > > > Yes, that conversion needs to happen, qemu can't deal with tiled > > graphics. Anything which pixman can handle will work. Prefered would > > be PIXMAN_x8r8g8b8 (aka DRM_FORMAT_XRGB8888 on little endian host) which > > is the format used by the vnc server (and other places in qemu) > > internally. > > > > qemu can also use the opengl texture for the guest fb, then fetch the > > data with glReadPixels(). Which will probably do exactly the same > > conversion. But it'll add a opengl dependency to the non-opengl > > rendering path in qemu, would be nice if we can avoid that. > > > > While being at it: When importing a dma-buf with a tiled framebuffer > > into opengl (via eglCreateImageKHR + EGL_LINUX_DMA_BUF_EXT) I suspect we > > have to pass in the tile size as attribute to make it work. Is that > > correct? > > > > I'd guess so, but need double confirm later when reaching that level of detail. > some homework on dma-buf is required first. :-) > > Thanks > Kevin From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzhTn-0004uE-Mx for qemu-devel@nongnu.org; Fri, 20 Nov 2015 03:55:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZzhTj-0003Fa-6b for qemu-devel@nongnu.org; Fri, 20 Nov 2015 03:55:39 -0500 Received: from mga14.intel.com ([192.55.52.115]:44040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZzhTi-0003FM-RS for qemu-devel@nongnu.org; Fri, 20 Nov 2015 03:55:35 -0500 Date: Fri, 20 Nov 2015 16:46:38 +0800 From: Zhiyuan Lv Message-ID: <20151120084638.GA13304@zlv-hp-dev> References: <54AF967B.3060503@intel.com> <5527CEC4.9080700@intel.com> <559B3E38.1080707@intel.com> <562F4311.9@intel.com> <1447870341.4697.92.camel@redhat.com> <1447922452.25140.39.camel@redhat.com> <1448007960.6904.22.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated Graphics Passthrough Solution from Intel List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Tian, Kevin" , Gerd Hoffmann Cc: "igvt-g@ml01.01.org" , "Song, Jike" , "Reddy, Raghuveer" , qemu-devel , "White, Michael L" , "Cowperthwaite, David J" , "intel-gfx@lists.freedesktop.org" , "Li, Susie" , "Dong, Eddie" , "linux-kernel@vger.kernel.org" , "xen-devel@lists.xen.org" , Alex Williamson , "Zhou, Chao" , Paolo Bonzini , "Zhu, Libo" , "Wang, Hongbo" On Fri, Nov 20, 2015 at 04:36:15PM +0800, Tian, Kevin wrote: > > From: Gerd Hoffmann [mailto:kraxel@redhat.com] > > Sent: Friday, November 20, 2015 4:26 PM > > > > Hi, > > > > > > iGVT-g_Setup_Guide.txt mentions a "Indirect Display Mode", but doesn't > > > > explain how the guest framebuffer can be accessed then. > > > > > > You can check "fb_decoder.h". One thing to clarify. Its format is > > > actually based on drm definition, instead of OpenGL. Sorry for > > > that. > > > > drm is fine. That header explains the format, but not how it can be > > accessed. Is the guest fb exported as dma-buf? > > Currently not, but per our previous discussion we should move to use > dma-buf. We have some demo code in user space. Not sure whether > they're public now. Jike could you help do a check? Our current implementation did not use dma-buf yet, still based on DRM_FLINK interface. We will switch to dma-buf. Thanks! Regards, -Zhiyuan > > > > > > > So, for non-opengl rendering qemu needs the guest framebuffer data so it > > > > can feed it into the vnc server. The vfio framebuffer region is meant > > > > to support this use case. > > > > > > what's the format requirement on that framebuffer? If you are familiar > > > with Intel Graphics, there's a so-called tiling feature applied on frame > > > buffer so it can't be used as a raw input to vnc server. w/o opengl you > > > need do some conversion on CPU first. > > > > Yes, that conversion needs to happen, qemu can't deal with tiled > > graphics. Anything which pixman can handle will work. Prefered would > > be PIXMAN_x8r8g8b8 (aka DRM_FORMAT_XRGB8888 on little endian host) which > > is the format used by the vnc server (and other places in qemu) > > internally. > > > > qemu can also use the opengl texture for the guest fb, then fetch the > > data with glReadPixels(). Which will probably do exactly the same > > conversion. But it'll add a opengl dependency to the non-opengl > > rendering path in qemu, would be nice if we can avoid that. > > > > While being at it: When importing a dma-buf with a tiled framebuffer > > into opengl (via eglCreateImageKHR + EGL_LINUX_DMA_BUF_EXT) I suspect we > > have to pass in the tile size as attribute to make it work. Is that > > correct? > > > > I'd guess so, but need double confirm later when reaching that level of detail. > some homework on dma-buf is required first. :-) > > Thanks > Kevin