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