Currently, the call to linuxPciOpenFile() is always made for read only access which causes the subseqent mmap call to fail when the memory is mapped read/write. The following patch fixes the problem: Index: xc/programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c =================================================================== --- xc/programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c.orig 2006-09-18 16:38:08.067521978 -0700 +++ xc/programs/Xserver/hw/xfree86/os-support/bus/linuxPci.c 2006-08-10 19:32:19.503681311 -0700 @@ -569,7 +569,8 @@ xf86InitVidMem(); - if (((fd = linuxPciOpenFile(Tag ,FALSE)) < 0) || + prot = (Flags & VIDMEM_READONLY) == 0; + if (((fd = linuxPciOpenFile(Tag, prot)) < 0) || (ioctl(fd, mmap_ioctl, 0) < 0)) break;
I suggest adding parenthesis around the comparison for clarity. Other than that this seems trivially correct. Applied as 1627af54497bee659ea30f2850b39cbbf576e22d
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.