xorg-server

- add 2 patches from moblin, one displays boottome in logfile, one for use sloppy heuristic first for initial mode
This commit is contained in:
Stephan Raue 2009-11-16 02:29:41 +01:00
parent 8b01fafaf5
commit cab45faafd
2 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,17 @@
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 84d3cac..673612f 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -2248,10 +2248,10 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
xf86DrvMsg(i, X_INFO, "Using user preference for initial modes\n");
else if (xf86TargetPreferred(scrn, config, modes, enabled, width, height))
xf86DrvMsg(i, X_INFO, "Using exact sizes for initial modes\n");
- else if (xf86TargetAspect(scrn, config, modes, enabled, width, height))
- xf86DrvMsg(i, X_INFO, "Using fuzzy aspect match for initial modes\n");
else if (xf86TargetFallback(scrn, config, modes, enabled, width, height))
xf86DrvMsg(i, X_INFO, "Using sloppy heuristic for initial modes\n");
+ else if (xf86TargetAspect(scrn, config, modes, enabled, width, height))
+ xf86DrvMsg(i, X_INFO, "Using fuzzy aspect match for initial modes\n");
else
xf86DrvMsg(i, X_WARNING, "Unable to find initial modes\n");

View File

@ -0,0 +1,38 @@
diff --git a/os/log.c b/os/log.c
index 0860847..2c46f1a 100644
--- a/os/log.c
+++ b/os/log.c
@@ -255,6 +255,33 @@ LogVWrite(int verb, const char *f, va_list args)
static char tmpBuffer[1024];
int len = 0;
+ struct timeval time;
+ time_t tv_sec;
+ suseconds_t tv_usec;
+ static Bool first = TRUE;
+ static time_t start_tv_sec;
+ static suseconds_t start_usec;
+ int diff_sec, diff_usec;
+
+ gettimeofday(&time, NULL);
+ tv_sec = time.tv_sec;
+ tv_usec = time.tv_usec;
+ if (first == TRUE) {
+ start_tv_sec = tv_sec;
+ start_usec = tv_usec;
+ first = FALSE;
+ }
+ diff_sec = (int)difftime(tv_sec, start_tv_sec);
+ diff_usec = (tv_usec - start_usec);
+ if (diff_usec < 0) {
+ diff_sec--;
+ diff_usec += 1000000;
+ }
+ sprintf(tmpBuffer, "[%d sec: %06d usec]", diff_sec , diff_usec);
+ len = strlen(tmpBuffer);
+ if (logFile)
+ fwrite(tmpBuffer, len, 1, logFile);
+
/*
* Since a va_list can only be processed once, write the string to a
* buffer, and then write the buffer out to the appropriate output