Author: branden Date: 2003-09-21 14:05:25 -0500 (Sun, 21 Sep 2003) New Revision: 561
Modified: branches/4.3.0/sid/debian/changelog branches/4.3.0/sid/debian/patches/000_stolen_from_HEAD_int10.diff Log: Update xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c to latest version from upstream CVS HEAD to resolve severe performance problems caused by opening /dev/mem with the O_SYNC flag, per Egbert Eich. * debian/patches/000_stolen_from_HEAD_int10.diff Modified: branches/4.3.0/sid/debian/changelog =================================================================== --- branches/4.3.0/sid/debian/changelog 2003-09-21 18:28:55 UTC (rev 560) +++ branches/4.3.0/sid/debian/changelog 2003-09-21 19:05:25 UTC (rev 561) @@ -171,8 +171,13 @@ - xlibs conflicts with xbase-clients (<< 4.3.0) and xlibs-data (<< 4.3.0) - xlibs-data conflicts with xbase-clients (<< 4.3.0) - -- Branden Robinson <[EMAIL PROTECTED]> Sun, 21 Sep 2003 13:22:54 -0500 + * debian/patches/000_stolen_from_HEAD_int10.diff: Update + xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c to latest + version from upstream CVS HEAD to resolve severe performance problems + caused by opening /dev/mem with the O_SYNC flag, per Egbert Eich. + -- Branden Robinson <[EMAIL PROTECTED]> Sun, 21 Sep 2003 14:02:39 -0500 + xfree86 (4.3.0-0pre1v1) experimental; urgency=low * new upstream release Modified: branches/4.3.0/sid/debian/patches/000_stolen_from_HEAD_int10.diff =================================================================== --- branches/4.3.0/sid/debian/patches/000_stolen_from_HEAD_int10.diff 2003-09-21 18:28:55 UTC (rev 560) +++ branches/4.3.0/sid/debian/patches/000_stolen_from_HEAD_int10.diff 2003-09-21 19:05:25 UTC (rev 561) @@ -5,6 +5,11 @@ 976. Change most of os-support/ to respect VIDMEM_READONLY (Marc La France). +(xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c): + 249. Removed O_SYNC from open call for /dev/mem for all Linux platforms. + This hopefully takes care of the speed problem + (Bugzilla #419, #414, Egbert Eich). + diff -urN xc.orig/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c --- xc.orig/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c 2002-10-17 07:13:47.000000000 +1000 +++ xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c 2003-04-09 04:48:51.000000000 +1000 @@ -23,15 +28,14 @@ MAP_SHARED | MAP_FIXED, fd, SYS_BIOS)) == MAP_FAILED) { xf86DrvMsg(screen, X_ERROR, "Cannot map SYS BIOS\n"); -diff -urN xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c ---- xc.orig/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c 2003-02-18 02:29:22.000000000 +1100 -+++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c 2003-04-09 04:48:51.000000000 +1000 -@@ -1,4 +1,4 @@ --/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c,v 3.64 2003/02/17 15:29:22 dawes Exp $ */ -+/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c,v 3.65 2003/03/14 13:46:05 tsi Exp $ */ - /* - * Copyright 1992 by Orest Zborowski <[EMAIL PROTECTED]> - * Copyright 1993 by David Wexelblat <[EMAIL PROTECTED]> +Index: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c +=================================================================== +RCS file: /cvs/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c,v +retrieving revision 3.64 +retrieving revision 3.67 +diff -u -u -r3.64 -r3.67 +--- xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c 17 Feb 2003 15:29:22 -0000 3.64 ++++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c 25 Jun 2003 18:27:07 -0000 3.67 @@ -407,6 +407,7 @@ pointer base; int fd; @@ -40,18 +44,20 @@ memType realBase, alignOff; realBase = Base & ~(getpagesize() - 1); -@@ -429,21 +430,23 @@ +@@ -429,20 +430,26 @@ mapflags |= MAP_NONCACHED; #endif -#if defined(__ia64__) ++#if 0 /* this will disappear when people upgrade their kernels */ - if ((fd = open(DEV_MEM, O_RDWR|O_SYNC)) < 0) --#else ++ fd = open(DEV_MEM, ++ ((flags & VIDMEM_READONLY) ? O_RDONLY : O_RDWR) | O_SYNC); + #else - if ((fd = open(DEV_MEM, O_RDWR)) < 0) --#endif -+ fd = open(DEV_MEM, -+ ((flags & VIDMEM_READONLY) ? O_RDONLY : O_RDWR) | O_SYNC); ++ fd = open(DEV_MEM, (flags & VIDMEM_READONLY) ? O_RDONLY : O_RDWR); + #endif + if (fd < 0) { FatalError("xf86MapVidMem: failed to open " DEV_MEM " (%s)\n", @@ -59,20 +65,18 @@ } + + if (flags & VIDMEM_READONLY) -+ prot = PROT_READ; ++ prot = PROT_READ; + else -+ prot = PROT_READ | PROT_WRITE; -+ ++ prot = PROT_READ | PROT_WRITE; ++ /* This requires linux-0.99.pl10 or above */ - base = mmap((caddr_t)0, Size + alignOff, - PROT_READ|PROT_WRITE, - mapflags, fd, -- (off_t)(off_t)realBase + BUS_BASE); + base = mmap((caddr_t)0, Size + alignOff, prot, mapflags, fd, -+ (off_t)realBase + BUS_BASE); + (off_t)(off_t)realBase + BUS_BASE); close(fd); if (base == MAP_FAILED) { - FatalError("xf86MapVidMem: Could not mmap framebuffer" @@ -500,7 +507,7 @@ fd = open("/dev/mem", O_RDWR); if (ioBase == NULL) {