From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arvind R Subject: Re: [Patch RFC] ttm: nouveau accelerated on Xen pv-ops kernel Date: Fri, 12 Mar 2010 10:57:58 +0530 Message-ID: References: <20100311130258.49dc04bd@farn> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20100311130258.49dc04bd@farn> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Pekka Paalanen Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Thu, Mar 11, 2010 at 4:32 PM, Pekka Paalanen wrote: > I'm adding dri-devel@ to CC, since this suggested patch touches > TTM code, and none of the Nouveau code. TTM patches go via > dri-devel@. > > Thanks. > > > On Wed, 10 Mar 2010 18:51:21 +0530 > Arvind R wrote: > >> Hi, >> Following is a simple patch that is needed in nouveau to get >> accelerated X on a Xen dom0 pv_ops kernel. The kernel is jeremy's >> 2.6.31.6 as of 20100222. The whole gpu tree of nouveau (which is >> almost the mainline merge), was substituted into the kernel-tree. >> All components of X (mesa, Xorg-server-7.5, xf86-nouveau, libdrm) >> used of the same day. >> >> Patch: >> diff -Naur nouveau-kernel.orig/drivers/gpu/drm/ttm/ttm_bo_vm.c >> nouveau-kernel.new/drivers/gpu/drm/ttm/ttm_bo_vm.c >> --- nouveau-kernel.orig/drivers/gpu/drm/ttm/ttm_bo_vm.c 2010-01-27 >> 10:19:28.000000000 +0530 >> +++ nouveau-kernel.new/drivers/gpu/drm/ttm/ttm_bo_vm.c =A02010-03-10 >> 17:28:59.000000000 +0530 >> @@ -271,7 +271,10 @@ >> =A0 =A0 =A0 =A0 =A0*/ >> >> =A0 =A0 =A0 =A0 vma->vm_private_data =3D bo; >> - =A0 =A0 =A0 vma->vm_flags |=3D VM_RESERVED | VM_IO | VM_MIXEDMAP | >> VM_DONTEXPAND; >> + =A0 =A0 =A0 vma->vm_flags |=3D VM_RESERVED | VM_MIXEDMAP | >> VM_DONTEXPAND; >> + =A0 =A0 =A0 if (!((bo->mem.placement & TTM_PL_MASK_MEM) & >> TTM_PL_FLAG_TT)) >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 vma->vm_flags |=3D VM_IO; >> + =A0 =A0 =A0 vma->vm_page_prot =3D vma_get_vm_prot(vma->vm_flags); >> =A0 =A0 =A0 =A0 return 0; >> =A0out_unref: >> =A0 =A0 =A0 =A0 ttm_bo_unref(&bo); >> Sorry for the typo: in the last added line, vma_get_vm_prot(vma->vm_flags) should be vma->vm_get_page_prot(vma->vm_flag= s) Arvind