From 9f77f53b8c9be6abb8b28fe465fc57c79229f011 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Fri, 30 Jan 2009 20:33:39 +0000 Subject: [PATCH] Open /dev/mem with O_SYNC if mtrr is not available or else mmio wont work properly. SVN-Revision: 14288 --- .../xorg-server/patches/010-sync-dev-mem.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Xorg/xorg/xserver/xorg-server/patches/010-sync-dev-mem.patch diff --git a/Xorg/xorg/xserver/xorg-server/patches/010-sync-dev-mem.patch b/Xorg/xorg/xserver/xorg-server/patches/010-sync-dev-mem.patch new file mode 100644 index 0000000000..06ebd2860c --- /dev/null +++ b/Xorg/xorg/xserver/xorg-server/patches/010-sync-dev-mem.patch @@ -0,0 +1,13 @@ +diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c +index 1bd2d57..0ac829c 100644 +--- a/hw/xfree86/os-support/linux/lnx_video.c ++++ b/hw/xfree86/os-support/linux/lnx_video.c +@@ -468,7 +468,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) + mapflags |= MAP_NONCACHED; + #endif + +-#if 0 ++#ifndef HAVE_MTRR + /* this will disappear when people upgrade their kernels */ + fd = open(DEV_MEM, + ((flags & VIDMEM_READONLY) ? O_RDONLY : O_RDWR) | O_SYNC); -- 2.30.2