From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [Announcement] 2015-Q3 release of XenGT - a Mediated Graphics Passthrough Solution from Intel Date: Fri, 20 Nov 2015 09:26:00 +0100 Message-ID: <1448007960.6904.22.camel@redhat.com> References: <53D215D3.50608@intel.com> <547FCAAD.2060406@intel.com> <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> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9A14B7A193 for ; Fri, 20 Nov 2015 00:26:10 -0800 (PST) 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" 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 ICBIaSwKCj4gPiBpR1ZULWdfU2V0dXBfR3VpZGUudHh0IG1lbnRpb25zIGEgIkluZGlyZWN0IERp c3BsYXkgTW9kZSIsIGJ1dCBkb2Vzbid0Cj4gPiBleHBsYWluIGhvdyB0aGUgZ3Vlc3QgZnJhbWVi dWZmZXIgY2FuIGJlIGFjY2Vzc2VkIHRoZW4uCj4gCj4gWW91IGNhbiBjaGVjayAiZmJfZGVjb2Rl ci5oIi4gT25lIHRoaW5nIHRvIGNsYXJpZnkuIEl0cyBmb3JtYXQgaXMKPiBhY3R1YWxseSBiYX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 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161866AbbKTI0S (ORCPT ); Fri, 20 Nov 2015 03:26:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39598 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161551AbbKTI0K (ORCPT ); Fri, 20 Nov 2015 03:26:10 -0500 Message-ID: <1448007960.6904.22.camel@redhat.com> Subject: Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated Graphics Passthrough Solution from Intel From: Gerd Hoffmann To: "Tian, Kevin" 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" , "Lv, Zhiyuan" , qemu-devel , Paolo Bonzini Date: Fri, 20 Nov 2015 09:26:00 +0100 In-Reply-To: References: <53D215D3.50608@intel.com> <547FCAAD.2060406@intel.com> <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> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > > 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? cheers, Gerd From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zzh1J-0007iA-T7 for qemu-devel@nongnu.org; Fri, 20 Nov 2015 03:26:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zzh1G-0003tp-Mt for qemu-devel@nongnu.org; Fri, 20 Nov 2015 03:26:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zzh1G-0003tQ-F4 for qemu-devel@nongnu.org; Fri, 20 Nov 2015 03:26:10 -0500 Message-ID: <1448007960.6904.22.camel@redhat.com> From: Gerd Hoffmann Date: Fri, 20 Nov 2015 09:26:00 +0100 In-Reply-To: References: <53D215D3.50608@intel.com> <547FCAAD.2060406@intel.com> <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> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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" 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" , "Lv, Zhiyuan" 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? > > 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? cheers, Gerd