diff options
author | Jonathan Lim <jlim@sgi.com> | 2007-01-26 13:00:45 +0100 |
---|---|---|
committer | Matthias Hopf <mhopf@suse.de> | 2007-01-26 13:00:45 +0100 |
commit | 1627af54497bee659ea30f2850b39cbbf576e22d (patch) | |
tree | 8070a2554567d09aee8829f2eb550aadeb86e62a /hw/xfree86/os-support/bus/linuxPci.c | |
parent | cf7ca9d09cba14d107152a5179de38e5ef7bd784 (diff) |
Call linuxPciOpenFile() for r/w access if applicable.
Currently, the call to linuxPciOpenFile() is always made for read
only access which causes the subsequent mmap call to fail when the
memory is mapped read/write.
Xorg #9692
Diffstat (limited to 'hw/xfree86/os-support/bus/linuxPci.c')
-rw-r--r-- | hw/xfree86/os-support/bus/linuxPci.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/xfree86/os-support/bus/linuxPci.c b/hw/xfree86/os-support/bus/linuxPci.c index 03388f1ff..55ed87859 100644 --- a/hw/xfree86/os-support/bus/linuxPci.c +++ b/hw/xfree86/os-support/bus/linuxPci.c @@ -570,7 +570,8 @@ linuxMapPci(int ScreenNum, int Flags, PCITAG Tag, 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; |