diff options
author | marha <marha@users.sourceforge.net> | 2014-06-08 14:33:00 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-06-08 14:33:00 +0200 |
commit | 2acb86c9b086bdb9a3897db0b93820652e07cb59 (patch) | |
tree | 02a43a0005c991c736f03de9a1c8ba98f0bbdf28 /xorg-server | |
parent | 816a5430313e07083c5325f0a430126a2e10ec41 (diff) | |
download | vcxsrv-2acb86c9b086bdb9a3897db0b93820652e07cb59.tar.gz vcxsrv-2acb86c9b086bdb9a3897db0b93820652e07cb59.tar.bz2 vcxsrv-2acb86c9b086bdb9a3897db0b93820652e07cb59.zip |
xwininfo libX11 mesa mkfontscale xserver git updated 8 June 2014
xserver commit e27a839bf0488d5b1cc2e2a887f2ea0e3d790790
libxcb commit d978a4f69b30b630f28d07f1003cf290284d24d8
libxcb/xcb-proto commit 389889e2f95af19e7fc7ac89e7faeb2f28652415
xkeyboard-config commit bc3ac1b0d152e929b3532a541596cf9fe286bb9e
libX11 commit d81fed46144d089bdfa1d916a28dffc9ebffe1e4
libXdmcp commit fe8eab93e9bcdbe8bb8052434bb5e676e3a0ee8f
libXext commit 11aad96bd689d54156064d2e81213dc827a689d1
libfontenc commit 0037a42107b952c9d903719615747e760e4e7247
libXinerama commit edd95182b26eb5d576d4878c559e0f17dddaa909
libXau commit 1e4635be11154dd8262f37b379511bd627defa2a
xkbcomp commit d4e02a09258063c6d024c3ccd42d6b22212e6e18
pixman commit 9cd283b2eb8279824406bfd47b020d21fc00cf82
xextproto commit 66afec3f49e8eb0d4c2e9af7088fc3116d4bafd7
randrproto commit a4a6694c059d74247c16527eef4a0ec9f56bbef6
glproto commit f84853d97d5749308992412a215fa518b6536eb3
mkfontscale commit 48e541dc2f2fc3f4e99d3e168c28241ff5adff4d
xwininfo commit 017b3736489985999d8dcf4d9e473e1fd6dd3647
libXft commit 214f9b5306d833e2787c75fe41dfdc9228fcb738
libXmu commit 22d9c590901e121936f50dee97dc60c4f7defb63
libxtrans commit a57a7f62242e1ea972b81414741729bf3dbae0a4
fontconfig commit f44bfad235e63bb792c38e16ae1fbd281ec1453b
mesa commit eb58aa9cf015e79a0fcf2e088676e6aa1d5dabce
Diffstat (limited to 'xorg-server')
25 files changed, 214 insertions, 144 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c index 02530bdee..b0bc47e6d 100644 --- a/xorg-server/Xi/exevents.c +++ b/xorg-server/Xi/exevents.c @@ -661,6 +661,8 @@ void DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to, DeviceChangedEvent *dce) { + OsBlockSIGIO(); + /* generic feedback classes, not tied to pointer and/or keyboard */ DeepCopyFeedbackClasses(from, to); @@ -668,6 +670,8 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to, DeepCopyKeyboardClasses(from, to); if ((dce->flags & DEVCHANGE_POINTER_EVENT)) DeepCopyPointerClasses(from, to); + + OsReleaseSIGIO(); } /** diff --git a/xorg-server/config/10-quirks.conf b/xorg-server/config/10-quirks.conf index c9b823ceb..47907d82d 100644 --- a/xorg-server/config/10-quirks.conf +++ b/xorg-server/config/10-quirks.conf @@ -19,22 +19,6 @@ Section "InputClass" Option "IgnoreRelativeAxes" "off" EndSection -# https://bugzilla.redhat.com/show_bug.cgi?id=612140 -# please make Evoluent VerticalMouse 3 work out of the box -# Button mapping on this mouse is quirky -Section "InputClass" - Identifier "Evoluent VerticalMouse 3" - MatchProduct "Evoluent VerticalMouse 3" - # Sets following configuration: - # top button: left - # middle button: middle - # bottom button: right - # wheel click: middle - # thumb button: 8 (back) - Option "ButtonMapping" "1 2 2 4 5 6 7 3 8" -EndSection - - # https://bugs.freedesktop.org/show_bug.cgi?id=55867 # Bug 55867 - Doesn't know how to tag XI_TRACKBALL Section "InputClass" diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac index e5387bffd..0a6e77255 100644 --- a/xorg-server/configure.ac +++ b/xorg-server/configure.ac @@ -26,9 +26,9 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ(2.60) -AC_INIT([xorg-server], 1.15.99.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) -RELEASE_DATE="2014-04-08" -RELEASE_NAME="Glacier Blue" +AC_INIT([xorg-server], 1.15.99.903, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +RELEASE_DATE="2014-06-04" +RELEASE_NAME="Strawberry Shortcake" AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) @@ -2442,7 +2442,7 @@ AM_CONDITIONAL(XFAKESERVER, [test "x$KDRIVE" = xyes && test "x$XFAKE" = xyes]) dnl Xwayland DDX -PKG_CHECK_MODULES(XWAYLANDMODULES, [wayland-client libdrm epoxy], [have_xwayland=yes], [have_xwayland=no]) +PKG_CHECK_MODULES(XWAYLANDMODULES, [wayland-client >= 1.3.0 libdrm epoxy], [have_xwayland=yes], [have_xwayland=no]) AC_MSG_CHECKING([whether to build Xwayland DDX]) if test "x$XWAYLAND" = xauto; then XWAYLAND="$have_xwayland" diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c index 73f60f46e..7f079ffa1 100644 --- a/xorg-server/dix/devices.c +++ b/xorg-server/dix/devices.c @@ -946,8 +946,9 @@ CloseDevice(DeviceIntPtr dev) if (dev->inited) (void) (*dev->deviceProc) (dev, DEVICE_CLOSE); - /* free sprite memory */ - if (IsMaster(dev) && dev->spriteInfo->sprite) + FreeSprite(dev); + + if (IsMaster(dev)) screen->DeviceCursorCleanup(dev, screen); /* free acceleration info */ @@ -968,8 +969,6 @@ CloseDevice(DeviceIntPtr dev) free(classes); } - FreeSprite(dev); - /* a client may have the device set as client pointer */ for (j = 0; j < currentMaxClients; j++) { if (clients[j] && clients[j]->clientPtr == dev) { diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index 7e7a1c9eb..b8c67fdfc 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -3237,7 +3237,7 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) pCursor = RefCursor(pCursor); if (pSprite->current) FreeCursor(pSprite->current, None); - pSprite->current = RefCursor(pCursor); + pSprite->current = pCursor; if (pScreen) { (*pScreen->RealizeCursor) (pDev, pScreen, pSprite->current); diff --git a/xorg-server/fb/fbscreen.c b/xorg-server/fb/fbscreen.c index b2b973974..1f9108945 100644 --- a/xorg-server/fb/fbscreen.c +++ b/xorg-server/fb/fbscreen.c @@ -37,7 +37,7 @@ fbCloseScreen(ScreenPtr pScreen) free(depths[d].vids); free(depths); free(pScreen->visuals); - free(pScreen->devPrivate); + FreePixmap((PixmapPtr)pScreen->devPrivate); return TRUE; } diff --git a/xorg-server/hw/xfree86/common/compiler.h b/xorg-server/hw/xfree86/common/compiler.h index 0319de06b..1bd8def5e 100644 --- a/xorg-server/hw/xfree86/common/compiler.h +++ b/xorg-server/hw/xfree86/common/compiler.h @@ -1352,7 +1352,10 @@ stl_u(unsigned long val, unsigned int *p) #else /* ix86 */ #if !defined(__SUNPRO_C) -#if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__m32r__) && !defined(__aarch64__) && !defined(__arc__) +#if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && \ + !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && \ + !defined(__m32r__) && !defined(__aarch64__) && !defined(__arc__) && \ + !defined(__xtensa__) #ifdef GCCUSESGAS /* diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c index 2adef44c3..481674de2 100644 --- a/xorg-server/hw/xfree86/common/xf86Config.c +++ b/xorg-server/hw/xfree86/common/xf86Config.c @@ -519,7 +519,7 @@ xf86InputDriverlistFromConfig(void) static void fixup_video_driver_list(const char **drivers) { - static const char *fallback[4] = { "fbdev", "vesa", "wsfb", NULL }; + static const char *fallback[5] = { "modesetting", "fbdev", "vesa", "wsfb", NULL }; const char **end, **drv; const char *x; int i; diff --git a/xorg-server/hw/xfree86/loader/loadmod.c b/xorg-server/hw/xfree86/loader/loadmod.c index 092bf5735..e1f649a74 100644 --- a/xorg-server/hw/xfree86/loader/loadmod.c +++ b/xorg-server/hw/xfree86/loader/loadmod.c @@ -838,6 +838,12 @@ static const char *compiled_in_modules[] = { "extmod", "dri", "dri2", +#if DRI3 + "dri3", +#endif +#if PRESENT + "present", +#endif NULL }; diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c index 40765fccf..652f963a2 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c @@ -60,7 +60,8 @@ static Bool ExtendedEnabled = FALSE; !defined(__nds32__) && \ !defined(__arm__) && \ !defined(__aarch64__) && \ - !defined(__arc__) + !defined(__arc__) && \ + !defined(__xtensa__) /* * Due to conflicts with "compiler.h", don't rely on <sys/io.h> to declare diff --git a/xorg-server/hw/xfree86/xorgconf.cpp b/xorg-server/hw/xfree86/xorgconf.cpp index cd6d4a983..a903438b6 100644 --- a/xorg-server/hw/xfree86/xorgconf.cpp +++ b/xorg-server/hw/xfree86/xorgconf.cpp @@ -97,7 +97,7 @@ Section "ServerFlags" # Uncomment this to disable the <Ctrl><Alt><BS> server abort sequence # This allows clients to receive this key event. -# Option "DontZap" "false" +# Option "DontZap" "true" # Uncomment this to disable the <Ctrl><Alt><KP_+>/<KP_-> mode switching # sequences. This allows clients to receive these key events. diff --git a/xorg-server/hw/xquartz/bundle/Info.plist.cpp b/xorg-server/hw/xquartz/bundle/Info.plist.cpp index 5fbb0ad55..a0d9050ac 100644 --- a/xorg-server/hw/xquartz/bundle/Info.plist.cpp +++ b/xorg-server/hw/xquartz/bundle/Info.plist.cpp @@ -19,9 +19,9 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>2.7.6</string> + <string>2.7.7</string> <key>CFBundleVersion</key> - <string>2.7.6</string> + <string>2.7.7</string> <key>CFBundleSignature</key> <string>x11a</string> <key>CSResourcesFileMapped</key> diff --git a/xorg-server/hw/xquartz/darwin.c b/xorg-server/hw/xquartz/darwin.c index e0983d6ef..29c6438a0 100644 --- a/xorg-server/hw/xquartz/darwin.c +++ b/xorg-server/hw/xquartz/darwin.c @@ -704,22 +704,6 @@ OsVendorInit(void) free(lf); DarwinPrintBanner(); -#ifdef ENABLE_DEBUG_LOG - { - char *home_dir = NULL, *log_file_path = NULL; - home_dir = getenv("HOME"); - if (home_dir) asprintf(&log_file_path, "%s/%s", home_dir, - DEBUG_LOG_NAME); - if (log_file_path) { - if (!access(log_file_path, F_OK)) { - debug_log_fp = fopen(log_file_path, "a"); - if (debug_log_fp) ErrorF("Debug logging enabled to %s\n", - log_file_path); - } - free(log_file_path); - } - } -#endif } } diff --git a/xorg-server/hw/xquartz/xpr/xprScreen.c b/xorg-server/hw/xquartz/xpr/xprScreen.c index e37601995..7aa1ae1df 100644 --- a/xorg-server/hw/xquartz/xpr/xprScreen.c +++ b/xorg-server/hw/xquartz/xpr/xprScreen.c @@ -54,6 +54,11 @@ #include "damage.h" #endif +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090 +// From NSApplication.h +extern const double NSAppKitVersionNumber; +#endif + /* 10.4's deferred update makes X slower.. have to live with the tearing * for now.. */ #define XP_NO_DEFERRED_UPDATES 8 @@ -164,9 +169,14 @@ displayScreenBounds(CGDirectDisplayID id) (int)frame.size.width, (int)frame.size.height, (int)frame.origin.x, (int)frame.origin.y); - /* Remove menubar to help standard X11 window managers. */ - if (XQuartzIsRootless && - frame.origin.x == 0 && frame.origin.y == 0) { + /* Remove menubar to help standard X11 window managers. + * On Mavericks and later, the menu bar is on all displays. + */ + if (XQuartzIsRootless +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1090 + && (NSAppKitVersionNumber >= 1265 || (frame.origin.x == 0 && frame.origin.y == 0)) +#endif + ) { frame.origin.y += aquaMenuBarHeight; frame.size.height -= aquaMenuBarHeight; } diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c index 690611428..9bfaac03d 100644 --- a/xorg-server/hw/xwin/glx/indirect.c +++ b/xorg-server/hw/xwin/glx/indirect.c @@ -929,17 +929,6 @@ glxWinDrawableDestroy(__GLXdrawable * base) { __GLXWinDrawable *glxPriv = (__GLXWinDrawable *) base; - if (glxPriv->drawContext && - (__glXLastContext == &((glxPriv->drawContext)->base))) { - // if this context is current and has unflushed commands, say we have flushed them - // (don't actually flush them, the window is going away anyhow, and an implict flush occurs - // on the next context change) - // (GLX core considers it an error when we try to select a new current context if the old one - // has unflushed commands, but the window has disappeared..) - __glXLastContext->hasUnflushedCommands = FALSE; - __glXLastContext = NULL; - } - if (glxPriv->hPbuffer) if (!wglDestroyPbufferARBWrapper(glxPriv->hPbuffer)) { ErrorF("wglDestroyPbufferARB failed: %s\n", glxWinErrorMessage()); @@ -1542,7 +1531,7 @@ glxWinContextLoseCurrent(__GLXcontext * base) An error seems to be reported if we try to make no context current if there is already no current context, so avoid doing that... */ - if (__glXLastContext != NULL) { + if (wglGetCurrentContext() != NULL) { ret = wglMakeCurrent(NULL, NULL); /* We don't need a DC when setting no current context */ if (!ret) ErrorF("glxWinContextLoseCurrent error: %s\n", diff --git a/xorg-server/include/misc.h b/xorg-server/include/misc.h index 17de71041..9c2f573b9 100644 --- a/xorg-server/include/misc.h +++ b/xorg-server/include/misc.h @@ -259,15 +259,19 @@ extern void FormatDouble(double dbl, char *string); * or a value greater than 0 */ static inline int -version_compare(uint16_t a_major, uint16_t a_minor, - uint16_t b_major, uint16_t b_minor) +version_compare(uint32_t a_major, uint32_t a_minor, + uint32_t b_major, uint32_t b_minor) { - int a, b; + if (a_major > b_major) + return 1; + if (a_major < b_major) + return -1; + if (a_minor > b_minor) + return 1; + if (a_minor < b_minor) + return -1; - a = a_major << 16 | a_minor; - b = b_major << 16 | b_minor; - - return (a - b); + return 0; } /* some macros to help swap requests, replies, and events */ diff --git a/xorg-server/include/servermd.h b/xorg-server/include/servermd.h index 2d1ccb19f..081123be9 100644 --- a/xorg-server/include/servermd.h +++ b/xorg-server/include/servermd.h @@ -313,6 +313,20 @@ SOFTWARE. #endif /* ARC */ +#ifdef __xtensa__ + +#ifdef __XTENSA_EL__ +#define IMAGE_BYTE_ORDER LSBFirst +#define BITMAP_BIT_ORDER LSBFirst +#endif +#ifdef __XTENSA_EB__ +#define IMAGE_BYTE_ORDER MSBFirst +#define BITMAP_BIT_ORDER MSBFirst +#endif +#define GLYPHPADBYTES 4 + +#endif /* __xtensa__ */ + /* size of buffer to use with GetImage, measured in bytes. There's obviously * a trade-off between the amount of heap used and the number of times the * ddx routine has to be called. diff --git a/xorg-server/include/xwin-config.h.in b/xorg-server/include/xwin-config.h.in index a5e6b17b3..176c01980 100644 --- a/xorg-server/include/xwin-config.h.in +++ b/xorg-server/include/xwin-config.h.in @@ -26,5 +26,8 @@ /* Vendor web address for support */ #undef __VENDORDWEBSUPPORT__ +/* Default log location */ +#undef DEFAULT_LOGDIR + /* Whether we should re-locate the root to where the executable lives */ #undef RELOCATE_PROJECTROOT diff --git a/xorg-server/man/Xserver.man b/xorg-server/man/Xserver.man index b103551fa..7a74e8541 100644 --- a/xorg-server/man/Xserver.man +++ b/xorg-server/man/Xserver.man @@ -223,9 +223,8 @@ turns on auto-repeat. .B -retro starts the stipple with the classic stipple and cursor visible. The default is to start with a black root window, and to suppress display of the cursor -until the first time an application calls XDefineCursor(). For the Xorg -server, this also sets the default for the DontZap option to FALSE. For -kdrive servers, this implies -zap. +until the first time an application calls XDefineCursor(). For kdrive +servers, this implies -zap. .TP 8 .B \-s \fIminutes\fP sets screen-saver timeout time in minutes. diff --git a/xorg-server/mi/mieq.c b/xorg-server/mi/mieq.c index 36aa21357..872ff93da 100644 --- a/xorg-server/mi/mieq.c +++ b/xorg-server/mi/mieq.c @@ -515,6 +515,10 @@ mieqProcessDeviceEvent(DeviceIntPtr dev, InternalEvent *event, ScreenPtr screen) verify_internal_event(event); + /* refuse events from disabled devices */ + if (!dev->enabled) + return; + /* Custom event handler */ handler = miEventQueue.handlers[event->any.type]; diff --git a/xorg-server/os/log.c b/xorg-server/os/log.c index a0f2a81f3..a368569d0 100644 --- a/xorg-server/os/log.c +++ b/xorg-server/os/log.c @@ -342,7 +342,7 @@ out: * which directives you use. */ static int -pnprintf(char *string, size_t size, const char *f, va_list args) +vpnprintf(char *string, int size_in, const char *f, va_list args) { int f_idx = 0; int s_idx = 0; @@ -353,6 +353,7 @@ pnprintf(char *string, size_t size, const char *f, va_list args) int i; uint64_t ui; int64_t si; + size_t size = size_in; for (; f_idx < f_len && s_idx < size - 1; f_idx++) { int length_modifier = 0; @@ -484,6 +485,19 @@ pnprintf(char *string, size_t size, const char *f, va_list args) return s_idx; } +static int +pnprintf(char *string, int size, const char *f, ...) +{ + int rc; + va_list args; + + va_start(args, f); + rc = vpnprintf(string, size, f, args); + va_end(args); + + return rc; +} + /* This function does the actual log message writes. It must be signal safe. * When attempting to call non-signal-safe functions, guard them with a check * of the inSignalContext global variable. */ @@ -597,7 +611,6 @@ LogMessageTypeVerbString(MessageType type, int verb) void LogVMessageVerb(MessageType type, int verb, const char *format, va_list args) { - static unsigned int warned; const char *type_str; char buf[1024]; const size_t size = sizeof(buf); @@ -605,17 +618,8 @@ LogVMessageVerb(MessageType type, int verb, const char *format, va_list args) size_t len = 0; if (inSignalContext) { - if (warned < 3) { - BUG_WARN_MSG(inSignalContext, - "Warning: attempting to log data in a signal unsafe " - "manner while in signal context.\nPlease update to check " - "inSignalContext and/or use LogMessageVerbSigSafe() or " - "ErrorFSigSafe().\nThe offending log format message is:\n" - "%s\n", format); - warned++; - if (warned == 3) - LogMessageVerbSigSafe(X_WARNING, -1, "Warned %u times about sigsafe logging. Will be quiet now.\n", warned); - } + LogVMessageVerbSigSafe(type, verb, format, args); + return; } type_str = LogMessageTypeVerbString(type, verb); @@ -687,7 +691,7 @@ LogVMessageVerbSigSafe(MessageType type, int verb, const char *format, va_list a LogSWrite(verb, " ", 1, FALSE); } - len = pnprintf(buf, sizeof(buf), format, args); + len = vpnprintf(buf, sizeof(buf), format, args); /* Force '\n' at end of truncated line */ if (sizeof(buf) - len == 1) @@ -701,40 +705,37 @@ void LogVHdrMessageVerb(MessageType type, int verb, const char *msg_format, va_list msg_args, const char *hdr_format, va_list hdr_args) { - static unsigned int warned; const char *type_str; char buf[1024]; const size_t size = sizeof(buf); Bool newline; size_t len = 0; - - if (inSignalContext) { - if (warned < 3) { - BUG_WARN_MSG(inSignalContext, - "Warning: attempting to log data in a signal unsafe " - "manner while in signal context.\nPlease update to check " - "inSignalContext and/or use LogMessageVerbSigSafe().\nThe " - "offending header and log message formats are:\n%s %s\n", - hdr_format, msg_format); - warned++; - if (warned == 3) - LogMessageVerbSigSafe(X_WARNING, -1, "Warned %u times about sigsafe logging. Will be quiet now.\n", warned); - } - } + int (*vprintf_func)(char *, int, const char* _X_RESTRICT_KYWD f, va_list args) + _X_ATTRIBUTE_PRINTF(3, 0); + int (*printf_func)(char *, int, const char* _X_RESTRICT_KYWD f, ...) + _X_ATTRIBUTE_PRINTF(3, 4); type_str = LogMessageTypeVerbString(type, verb); if (!type_str) return; + if (inSignalContext) { + vprintf_func = vpnprintf; + printf_func = pnprintf; + } else { + vprintf_func = Xvscnprintf; + printf_func = Xscnprintf; + } + /* if type_str is not "", prepend it and ' ', to message */ if (type_str[0] != '\0') - len += Xscnprintf(&buf[len], size - len, "%s ", type_str); + len += printf_func(&buf[len], size - len, "%s ", type_str); if (hdr_format && size - len > 1) - len += Xvscnprintf(&buf[len], size - len, hdr_format, hdr_args); + len += vprintf_func(&buf[len], size - len, hdr_format, hdr_args); if (msg_format && size - len > 1) - len += Xvscnprintf(&buf[len], size - len, msg_format, msg_args); + len += vprintf_func(&buf[len], size - len, msg_format, msg_args); /* Force '\n' at end of truncated line */ if (size - len == 1) diff --git a/xorg-server/present/present.c b/xorg-server/present/present.c index 73d5f6983..1bf3a5865 100644 --- a/xorg-server/present/present.c +++ b/xorg-server/present/present.c @@ -42,6 +42,9 @@ static struct xorg_list present_flip_queue; #define DebugPresent(x) #endif +static void +present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc); + /* * Copies the update region from a pixmap to the target drawable */ @@ -78,6 +81,20 @@ present_copy_region(DrawablePtr drawable, FreeScratchGC(gc); } +static inline PixmapPtr +present_flip_pending_pixmap(ScreenPtr screen) +{ + present_screen_priv_ptr screen_priv = present_screen_priv(screen); + + if (!screen_priv) + return NULL; + + if (!screen_priv->flip_pending) + return NULL; + + return screen_priv->flip_pending->pixmap; +} + static Bool present_check_flip(RRCrtcPtr crtc, WindowPtr window, @@ -88,6 +105,7 @@ present_check_flip(RRCrtcPtr crtc, int16_t y_off) { ScreenPtr screen = window->drawable.pScreen; + PixmapPtr window_pixmap; WindowPtr root = screen->root; present_screen_priv_ptr screen_priv = present_screen_priv(screen); @@ -104,19 +122,11 @@ present_check_flip(RRCrtcPtr crtc, if (!screen_priv->info->flip) return FALSE; - /* Can't pend a flip while unflipping */ - if (screen_priv->unflip_event_id) { - return FALSE; - } - - /* Can't have two pending flips at the same time */ - if (screen_priv->flip_pending) { - return FALSE; - } - /* Make sure the window hasn't been redirected with Composite */ - if (screen->GetWindowPixmap(window) != screen->GetScreenPixmap(screen) && - screen->GetWindowPixmap(window) != screen_priv->flip_pixmap) + window_pixmap = screen->GetWindowPixmap(window); + if (window_pixmap != screen->GetScreenPixmap(screen) && + window_pixmap != screen_priv->flip_pixmap && + window_pixmap != present_flip_pending_pixmap(screen)) return FALSE; /* Check for full-screen window */ @@ -147,6 +157,7 @@ present_check_flip(RRCrtcPtr crtc, /* Ask the driver for permission */ if (screen_priv->info->check_flip) { if (!(*screen_priv->info->check_flip) (crtc, window, pixmap, sync_flip)) { + DebugPresent(("\td %08lx -> %08lx\n", window->drawable.id, pixmap ? pixmap->drawable.id : 0)); return FALSE; } } @@ -188,8 +199,10 @@ present_pixmap_idle(PixmapPtr pixmap, WindowPtr window, CARD32 serial, struct pr { if (present_fence) present_fence_set_triggered(present_fence); - if (window) + if (window) { + DebugPresent(("\ti %08lx\n", pixmap ? pixmap->drawable.id : 0)); present_send_idle_notify(window, serial, pixmap, present_fence); + } } RRCrtcPtr @@ -227,9 +240,8 @@ present_query_capabilities(RRCrtcPtr crtc) } static int -present_get_ust_msc(WindowPtr window, RRCrtcPtr crtc, uint64_t *ust, uint64_t *msc) +present_get_ust_msc(ScreenPtr screen, RRCrtcPtr crtc, uint64_t *ust, uint64_t *msc) { - ScreenPtr screen = window->drawable.pScreen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); if (crtc == NULL) @@ -283,7 +295,7 @@ present_window_to_crtc_msc(WindowPtr window, RRCrtcPtr crtc, uint64_t window_msc * we'll just use whatever previous MSC we'd seen from this CRTC */ - if (present_get_ust_msc(window, window_priv->crtc, &old_ust, &old_msc) != Success) + if (present_get_ust_msc(window->drawable.pScreen, window_priv->crtc, &old_ust, &old_msc) != Success) old_msc = window_priv->msc; window_priv->msc_offset += new_msc - old_msc; @@ -293,6 +305,34 @@ present_window_to_crtc_msc(WindowPtr window, RRCrtcPtr crtc, uint64_t window_msc return window_msc + window_priv->msc_offset; } +/* + * When the wait fence or previous flip is completed, it's time + * to re-try the request + */ +static void +present_re_execute(present_vblank_ptr vblank) +{ + uint64_t ust = 0, crtc_msc = 0; + + if (vblank->crtc) + (void) present_get_ust_msc(vblank->screen, vblank->crtc, &ust, &crtc_msc); + + present_execute(vblank, ust, crtc_msc); +} + +static void +present_flip_try_ready(ScreenPtr screen) +{ + present_vblank_ptr vblank, tmp; + + xorg_list_for_each_entry_safe(vblank, tmp, &present_exec_queue, event_queue) { + if (vblank->flip_ready) { + present_re_execute(vblank); + return; + } + } +} + static void present_flip_idle(ScreenPtr screen) { @@ -369,16 +409,14 @@ present_unflip(ScreenPtr screen) } static void -present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc); - -static void present_flip_notify(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) { ScreenPtr screen = vblank->screen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); - DebugPresent(("\tn %p %8lld: %08lx -> %08lx\n", vblank, vblank->target_msc, - vblank->pixmap ? vblank->pixmap->drawable.id : 0, + DebugPresent(("\tn %lld %p %8lld: %08lx -> %08lx\n", + vblank->event_id, vblank, vblank->target_msc, + vblank->pixmap ? vblank->pixmap->drawable.id : 0, vblank->window->drawable.id)); assert (vblank == screen_priv->flip_pending); @@ -404,6 +442,8 @@ present_flip_notify(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) present_vblank_notify(vblank, PresentCompleteKindPixmap, PresentCompleteModeFlip, ust, crtc_msc); present_vblank_destroy(vblank); + + present_flip_try_ready(screen); } void @@ -436,6 +476,7 @@ present_event_notify(uint64_t event_id, uint64_t ust, uint64_t msc) DebugPresent(("\tun %lld\n", event_id)); screen_priv->unflip_event_id = 0; present_flip_idle(screen); + present_flip_try_ready(screen); return; } } @@ -498,15 +539,7 @@ static void present_wait_fence_triggered(void *param) { present_vblank_ptr vblank = param; - WindowPtr window = vblank->window; - uint64_t ust = 0, crtc_msc = 0; - - if (window) { - present_window_priv_ptr window_priv = present_get_window_priv(window, TRUE); - if (window_priv) - (void) present_get_ust_msc(window, window_priv->crtc, &ust, &crtc_msc); - } - present_execute(vblank, ust, crtc_msc); + present_re_execute(vblank); } /* @@ -534,14 +567,27 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) } } + if (vblank->flip && vblank->pixmap && vblank->window) { + if (screen_priv->flip_pending || screen_priv->unflip_event_id) { + DebugPresent(("\tr %lld %p (pending %p unflip %lld)\n", + vblank->event_id, vblank, + screen_priv->flip_pending, screen_priv->unflip_event_id)); + vblank->flip_ready = TRUE; + return; + } + } + xorg_list_del(&vblank->event_queue); vblank->queued = FALSE; if (vblank->pixmap && vblank->window) { - if (vblank->flip && screen_priv->flip_pending == NULL && !screen_priv->unflip_event_id) { + if (vblank->flip) { + + DebugPresent(("\tf %lld %p %8lld: %08lx -> %08lx\n", + vblank->event_id, vblank, crtc_msc, + vblank->pixmap->drawable.id, vblank->window->drawable.id)); - DebugPresent(("\tf %p %8lld: %08lx -> %08lx\n", vblank, crtc_msc, vblank->pixmap->drawable.id, vblank->window->drawable.id)); /* Prepare to flip by placing it in the flip queue and * and sticking it into the flip_pending field */ @@ -644,7 +690,7 @@ present_pixmap(WindowPtr window, uint64_t target_msc; uint64_t crtc_msc; int ret; - present_vblank_ptr vblank; + present_vblank_ptr vblank, tmp; ScreenPtr screen = window->drawable.pScreen; present_window_priv_ptr window_priv = present_get_window_priv(window, TRUE); present_screen_priv_ptr screen_priv = present_screen_priv(screen); @@ -664,7 +710,7 @@ present_pixmap(WindowPtr window, target_crtc = present_get_crtc(window); } - present_get_ust_msc(window, target_crtc, &ust, &crtc_msc); + present_get_ust_msc(screen, target_crtc, &ust, &crtc_msc); target_msc = present_window_to_crtc_msc(window, target_crtc, window_msc, crtc_msc); @@ -698,7 +744,7 @@ present_pixmap(WindowPtr window, */ if (!update) { - xorg_list_for_each_entry(vblank, &window_priv->vblank, window_list) { + xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->vblank, window_list) { if (!vblank->pixmap) continue; @@ -706,11 +752,11 @@ present_pixmap(WindowPtr window, if (!vblank->queued) continue; - if (vblank->crtc != target_crtc || vblank->target_msc != target_msc) + if (vblank->crtc != target_crtc || vblank->target_msc > target_msc) continue; DebugPresent(("\tx %lld %p %8lld: %08lx -> %08lx (crtc %p)\n", - vblank->event_id, vblank, target_msc, + vblank->event_id, vblank, vblank->target_msc, vblank->pixmap->drawable.id, vblank->window->drawable.id, vblank->crtc)); @@ -720,6 +766,9 @@ present_pixmap(WindowPtr window, vblank->pixmap = NULL; vblank->idle_fence = NULL; + vblank->flip = FALSE; + if (vblank->flip_ready) + present_re_execute(vblank); } } @@ -875,7 +924,8 @@ present_vblank_destroy(present_vblank_ptr vblank) /* Remove vblank from window and screen lists */ xorg_list_del(&vblank->window_list); - DebugPresent(("\td %p %8lld: %08lx -> %08lx\n", vblank, vblank->target_msc, + DebugPresent(("\td %lld %p %8lld: %08lx -> %08lx\n", + vblank->event_id, vblank, vblank->target_msc, vblank->pixmap ? vblank->pixmap->drawable.id : 0, vblank->window->drawable.id)); diff --git a/xorg-server/present/present_priv.h b/xorg-server/present/present_priv.h index 8d3e0079c..d8569a2b6 100644 --- a/xorg-server/present/present_priv.h +++ b/xorg-server/present/present_priv.h @@ -71,6 +71,7 @@ struct present_vblank { int num_notifies; Bool queued; /* on present_exec_queue */ Bool flip; /* planning on using flip */ + Bool flip_ready; /* wants to flip, but waiting for previous flip or unflip */ Bool sync_flip; /* do flip synchronous to vblank */ Bool abort_flip; /* aborting this flip */ }; diff --git a/xorg-server/test/input.c b/xorg-server/test/input.c index 9b5db8991..a4615c9c9 100644 --- a/xorg-server/test/input.c +++ b/xorg-server/test/input.c @@ -1712,6 +1712,18 @@ mieq_test_event_handler(int screenNum, InternalEvent *ie, DeviceIntPtr dev) static void _mieq_test_generate_events(uint32_t start, uint32_t count) { + static DeviceIntRec dev; + static SpriteInfoRec spriteInfo; + static SpriteRec sprite; + + memset(&dev, 0, sizeof(dev)); + memset(&spriteInfo, 0, sizeof(spriteInfo)); + memset(&sprite, 0, sizeof(sprite)); + dev.spriteInfo = &spriteInfo; + spriteInfo.sprite = &sprite; + + dev.enabled = 1; + count += start; while (start < count) { RawDeviceEvent e = { 0 }; @@ -1721,7 +1733,7 @@ _mieq_test_generate_events(uint32_t start, uint32_t count) e.time = GetTimeInMillis(); e.flags = start; - mieqEnqueue(NULL, (InternalEvent *) &e); + mieqEnqueue(&dev, (InternalEvent *) &e); start++; } diff --git a/xorg-server/xfixes/cursor.c b/xorg-server/xfixes/cursor.c index 2c4b57c13..31a408fac 100644 --- a/xorg-server/xfixes/cursor.c +++ b/xorg-server/xfixes/cursor.c @@ -1056,6 +1056,8 @@ XFixesCursorInit(void) if (party_like_its_1989) CursorVisible = EnableCursor; + else + CursorVisible = FALSE; if (!dixRegisterPrivateKey(&CursorScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) return FALSE; |