xserver: Branch 'xorg-server-1.6-apple' - 11 commits
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Tue Aug 25 20:57:42 PDT 2009
Xext/sync.c | 32 ++++++++++++++------------------
config/hal.c | 21 +++++++++++----------
configure.ac | 4 ++--
dix/dispatch.c | 22 +++++++++++++++++++++-
dix/events.c | 4 ++--
dix/window.c | 2 --
glx/glxext.c | 27 +++++++++++++++++++++++++++
hw/xfree86/modes/xf86Cursors.c | 6 ++++--
hw/xfree86/modes/xf86Rotate.c | 7 +++++--
include/dix.h | 6 ++++++
10 files changed, 92 insertions(+), 39 deletions(-)
New commits:
commit def28e70726f9cd4958b69abeb6d0a6e462d5fb4
Merge: c232ee0... 76a1839...
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Tue Aug 25 20:57:16 2009 -0700
Merge commit 'origin/server-1.6-branch' into xorg-server-1.6-apple
commit 76a1839b0a7dcb82e46c43533d252288677c6dbb
Author: Keith Packard <keithp at keithp.com>
Date: Tue Aug 25 18:07:00 2009 -0700
Ensure that rotation updates happen frequently
The smart scheduler is designed to minimize scheduler overhead by
increasing the interval between WaitForSomething calls when a single
client is running. However, the software rotation code depends on
its BlockHandler being invoked for screen updates; the long delays
caused by the smart scheduler optimizations means that screen updates
can be delayed a long time as well.
The change is simple -- prevent the smart scheduler from increasing
the scheduling interval while any screen is using software rotation.
(cherry picked from commit e7dd1efef408effe52d0bd3d3aa0b5d4ee10ed90)
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 1ca08b6..7e16589 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -247,6 +247,7 @@ long SmartScheduleSlice = SMART_SCHEDULE_DEFAULT_INTERVAL;
long SmartScheduleInterval = SMART_SCHEDULE_DEFAULT_INTERVAL;
long SmartScheduleMaxSlice = SMART_SCHEDULE_MAX_SLICE;
long SmartScheduleTime;
+int SmartScheduleLatencyLimited = 0;
static ClientPtr SmartLastClient;
static int SmartLastIndex[SMART_MAX_PRIORITY-SMART_MIN_PRIORITY+1];
@@ -317,7 +318,7 @@ SmartScheduleClient (int *clientReady, int nready)
/*
* Adjust slice
*/
- if (nready == 1)
+ if (nready == 1 && SmartScheduleLatencyLimited == 0)
{
/*
* If it's been a long time since another client
@@ -337,6 +338,23 @@ SmartScheduleClient (int *clientReady, int nready)
return best;
}
+void
+EnableLimitedSchedulingLatency(void)
+{
+ ++SmartScheduleLatencyLimited;
+ SmartScheduleSlice = SmartScheduleInterval;
+}
+
+void
+DisableLimitedSchedulingLatency(void)
+{
+ --SmartScheduleLatencyLimited;
+
+ /* protect against bugs */
+ if (SmartScheduleLatencyLimited < 0)
+ SmartScheduleLatencyLimited = 0;
+}
+
#define MAJOROP ((xReq *)client->requestBuffer)->reqType
void
@@ -356,6 +374,7 @@ Dispatch(void)
if (!clientReady)
return;
+ SmartScheduleSlice = SmartScheduleInterval;
while (!dispatchException)
{
if (*icheck[0] != *icheck[1])
@@ -466,6 +485,7 @@ Dispatch(void)
KillAllClients();
xfree(clientReady);
dispatchException &= ~DE_RESET;
+ SmartScheduleLatencyLimited = 0;
}
#undef MAJOROP
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 0af96c2..bb17df4 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -198,6 +198,7 @@ xf86RotatePrepare (ScreenPtr pScreen)
DamageRegister (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
xf86_config->rotation_damage);
xf86_config->rotation_damage_registered = TRUE;
+ EnableLimitedSchedulingLatency();
}
xf86CrtcDamageShadow (crtc);
@@ -308,6 +309,7 @@ xf86RotateDestroy (xf86CrtcPtr crtc)
DamageUnregister (&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
xf86_config->rotation_damage);
xf86_config->rotation_damage_registered = FALSE;
+ DisableLimitedSchedulingLatency();
}
DamageDestroy (xf86_config->rotation_damage);
xf86_config->rotation_damage = NULL;
diff --git a/include/dix.h b/include/dix.h
index 66af953..9c2c73f 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -229,6 +229,12 @@ extern void WakeupHandler(
int /*result*/,
pointer /*pReadmask*/);
+void
+EnableLimitedSchedulingLatency(void);
+
+void
+DisableLimitedSchedulingLatency(void);
+
typedef void (* WakeupHandlerProcPtr)(
pointer /* blockData */,
int /* result */,
commit 31dc4fe0be57da4e9458ee490811fbd92598b7a7
Author: Keith Packard <keithp at keithp.com>
Date: Tue Aug 25 16:58:07 2009 -0700
Perform rotation redisplay before calling driver block handler (which may flush rendering)
The rotation block handler uses regular driver rendering functions to
repaint the screen, if those functions queue commands in the driver,
it's important that the driver block handler be invoked after the
rotated image is drawn.
Signed-off-by: Keith Packard <keithp at keithp.com>
(cherry picked from commit 1740cda7a37abc7d0a169ab4555b446adaa62211)
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 6be77d5..0af96c2 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -263,11 +263,12 @@ xf86RotateBlockHandler(int screenNum, pointer blockData,
ScreenPtr pScreen = screenInfo.screens[screenNum];
ScrnInfoPtr pScrn = xf86Screens[screenNum];
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+ Bool rotation_active;
+ rotation_active = xf86RotateRedisplay(pScreen);
pScreen->BlockHandler = xf86_config->BlockHandler;
(*pScreen->BlockHandler) (screenNum, blockData, pTimeout, pReadmask);
- if (xf86RotateRedisplay(pScreen))
- {
+ if (rotation_active) {
/* Re-wrap if rotation is still happening */
xf86_config->BlockHandler = pScreen->BlockHandler;
pScreen->BlockHandler = xf86RotateBlockHandler;
commit cebc0a7aa7a368b2ade3a808195d2e738fda83e9
Author: Keith Packard <keithp at keithp.com>
Date: Tue Aug 25 16:54:16 2009 -0700
xf86_reload_cursors: fix cursor position to eliminate jumping after mode set
xf86_reload_cursors restores the cursor to the correct position, but
that must adjust for cursor hot spot and frame before calling down to
the hardware function, otherwise the cursor jumps to the wrong
position until it is repositioned by the user.
Signed-off-by: Keith Packard <keithp at keithp.com>
(cherry picked from commit 4aab05e3b3231f1ec9795a66a075d17a722634a7)
diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index 3106f05..fbd61e9 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -640,9 +640,11 @@ xf86_reload_cursors (ScreenPtr screen)
(*cursor_info->LoadCursorARGB) (scrn, cursor);
else if (src)
#endif
- (*cursor_info->LoadCursorImage)(cursor_info->pScrn, src);
+ (*cursor_info->LoadCursorImage)(scrn, src);
- (*cursor_info->SetCursorPosition)(cursor_info->pScrn, x, y);
+ x += scrn->frameX0 + cursor_screen_priv->HotX;
+ y += scrn->frameY0 + cursor_screen_priv->HotY;
+ (*cursor_info->SetCursorPosition)(scrn, x, y);
}
}
commit 5848fca11f3c5b65bb6634816c0df6aeb6eda87d
Author: Michel Dänzer <daenzer at vmware.com>
Date: Tue Jun 23 16:45:40 2009 +0200
glx: Clean up more thoroughly if the drawable of a current context goes away.
Fixes crash when restarting compiz, due to cl->currentContexts[x] being stale.
(cherry picked from commit 3020b1d43e34fca08cd51f7c7c8ed51497d49ef3)
diff --git a/glx/glxext.c b/glx/glxext.c
index c1a1ac9..ca1d2ec 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -128,8 +128,31 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
for (c = glxAllContexts; c; c = c->next) {
if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
+ int i;
+
(*c->loseCurrent)(c);
- __glXFlushContextCache();
+ c->isCurrent = GL_FALSE;
+ if (c == __glXLastContext)
+ __glXFlushContextCache();
+
+ for (i = 1; i < currentMaxClients; i++) {
+ if (clients[i]) {
+ __GLXclientState *cl = glxGetClient(clients[i]);
+
+ if (cl->inUse) {
+ int j;
+
+ for (j = 0; j < cl->numCurrentContexts; j++) {
+ if (cl->currentContexts[j] == c)
+ cl->currentContexts[j] = NULL;
+ }
+ }
+ }
+ }
+
+ if (!c->idExists) {
+ __glXFreeContext(c);
+ }
}
if (c->drawPriv == glxPriv)
c->drawPriv = NULL;
commit fad2de1cca057586a88fb20ebf9a9964f8e3e298
Author: Michel Dänzer <daenzer at vmware.com>
Date: Thu May 14 11:46:41 2009 +0200
glx: If a destroyed window is bound to the current context, make it not current.
Avoids subsequent crashes due to stale pointers to the DrawableRec, see
https://bugs.freedesktop.org/show_bug.cgi?id=21132#c15 and previous comments.
Signed-off-by: Michel Dänzer <daenzer at vmware.com>
(cherry picked from commit 2075d4bf9e53b8baef0b919da6c44771220cd4a5)
diff --git a/glx/glxext.c b/glx/glxext.c
index fe99e4e..c1a1ac9 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -127,6 +127,10 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
__GLXcontext *c;
for (c = glxAllContexts; c; c = c->next) {
+ if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) {
+ (*c->loseCurrent)(c);
+ __glXFlushContextCache();
+ }
if (c->drawPriv == glxPriv)
c->drawPriv = NULL;
if (c->readPriv == glxPriv)
commit a32d717ac64b21e15a5736ae4981cdd32f2da56b
Author: Richard Hughes <richard at hughsie.com>
Date: Mon Aug 17 09:15:32 2009 +0100
Do not reset lastDeviceEventTime when we do dixSaveScreens
When we turn off DPMS with DPMSModeOff and do dixSaveScreens, don't reset the
event time else session clients using IDLETIME will be reset.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
(cherry picked from commit 6b5978dcf1f7ac3ecc2f22df06f7000f360e2066)
diff --git a/dix/window.c b/dix/window.c
index a9d00f9..e0b0dec 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -3169,8 +3169,6 @@ dixSaveScreens(ClientPtr client, int on, int mode)
if (on == SCREEN_SAVER_FORCER)
{
- UpdateCurrentTimeIf();
- lastDeviceEventTime = currentTime;
if (mode == ScreenSaverReset)
what = SCREEN_SAVER_OFF;
else
commit 32115e690f43fde619234722aa674ff1ae1b44ae
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Fri Aug 14 11:48:54 2009 +1000
dix: update the sprite trace for all masters && floating slaves (#23257)
When the windows are restructured, CheckMotion needs to be called for all
masters and floating slaves to update the spriteTrace.
X.Org Bug 23257 <http://bugs.freedesktop.org/show_bug.cgi?id=23257>
(cherry picked from commit 6c292d17053eb2a7e7054e51210f423dbc0cb7e8)
Tested-by: Thomas Jaeger
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/dix/events.c b/dix/events.c
index 1786827..f9448ba 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -2661,8 +2661,8 @@ WindowsRestructured(void)
DeviceIntPtr pDev = inputInfo.devices;
while(pDev)
{
- if (DevHasCursor(pDev))
- CheckMotion((xEvent *)NULL, pDev);
+ if (pDev->isMaster || !pDev->u.master)
+ CheckMotion(NULL, pDev);
pDev = pDev->next;
}
}
commit af7e62a913c3c5b9639b4557b31537853f3f58bb
Author: Dan Nicholson <dbn.lists at gmail.com>
Date: Sun Aug 16 18:07:49 2009 -0700
xfree86: Link libselinux with Xorg system libraries
Put the reference to -lselinux in XORG_SYS_LIBS so it isn't added as a
make dependency for libxorg.la. Otherwise, make goes looking for a file
-lselinux in the current directory, which it obviously won't find.
Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>
Tested-by: Justin P. Mattock <justinmattock at gmail.com>
(cherry picked from commit c73cd3b265c301b8a54ffe484d6c696f2abefb46)
diff --git a/configure.ac b/configure.ac
index fe7978f..b8a3385 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1239,7 +1239,7 @@ if test "x$XORG" = xyes; then
XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
XORG_INCS="$XORG_DDXINCS $XORG_OSINCS"
XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H"
- XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $SELINUX_LIB"
+ XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB"
PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
SAVE_LIBS=$LIBS
@@ -1250,7 +1250,7 @@ if test "x$XORG" = xyes; then
AC_CHECK_FUNCS([pci_device_enable])
LIBS=$SAVE_LIBS
CFLAGS=$SAVE_CFLAGS
- XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $DLOPEN_LIBS $GLX_SYS_LIBS"
+ XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $DLOPEN_LIBS $GLX_SYS_LIBS $SELINUX_LIB"
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
case $host_os in
commit 397f7c42cd775f1dbfced58bc1dfaead48e86440
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Fri Aug 14 09:48:45 2009 +1000
config: don't shutdown the libhal ctx if it failed to initialize (#23213)
Regression introduced by b1c3dc6ae226db178420e3b5f297b94afc87c94c.
Shutting down the libhal_ctx if the init failed may cause an abort.
This can happen if hald is not yet running at server startup.
X.Org Bug 23213 <http://bugs.freedesktop.org/show_bug.cgi?id=23213>
Tested-by: Stefan Dirsch
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
(cherry picked from commit 49046088f10cceaea7da97401d742d3fb59371f5)
diff --git a/config/hal.c b/config/hal.c
index 59bff66..28f55a0 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -489,13 +489,13 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info)
if (!libhal_ctx_set_dbus_connection(info->hal_ctx, info->system_bus)) {
LogMessage(X_ERROR, "config/hal: couldn't associate HAL context with bus\n");
- goto out_ctx;
+ goto out_err;
}
if (!libhal_ctx_init(info->hal_ctx, &error)) {
LogMessage(X_ERROR, "config/hal: couldn't initialise context: %s (%s)\n",
error.name ? error.name : "unknown error",
error.message ? error.message : "null");
- goto out_ctx;
+ goto out_err;
}
if (!libhal_device_property_watch_all(info->hal_ctx, &error)) {
LogMessage(X_ERROR, "config/hal: couldn't watch all properties: %s (%s)\n",
@@ -526,19 +526,20 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info)
out_ctx:
dbus_error_free(&error);
- if (info->hal_ctx) {
- if (!libhal_ctx_shutdown(info->hal_ctx, &error)) {
- LogMessage(X_WARNING, "config/hal: couldn't shut down context: %s (%s)\n",
- error.name ? error.name : "unknown error",
- error.message ? error.message : "null");
- dbus_error_free(&error);
- }
- libhal_ctx_free(info->hal_ctx);
+ if (!libhal_ctx_shutdown(info->hal_ctx, &error)) {
+ LogMessage(X_WARNING, "config/hal: couldn't shut down context: %s (%s)\n",
+ error.name ? error.name : "unknown error",
+ error.message ? error.message : "null");
+ dbus_error_free(&error);
}
out_err:
dbus_error_free(&error);
+ if (info->hal_ctx) {
+ libhal_ctx_free(info->hal_ctx);
+ }
+
info->hal_ctx = NULL;
info->system_bus = NULL;
commit 55c26d8e4d110b689aea9d806e9d4fa7bbbdd32a
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Thu Aug 13 16:37:00 2009 +1000
Xext: fix up wrong conditions for negative sync transitions.
If the counter had a value higher than the trigger value for a negative
transition, the trigger value did not get set.
The correct sequence of checks is:
if (positive transition)
if (counter value < trigger value)
set up trigger
if (negative transition)
if (counter value > trigger value)
set up trigger
Red Hat Bug 501601 <https://bugzilla.redhat.com/show_bug.cgi?id=501601>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
(cherry picked from commit db568f9eabf3450d8a023597ff007df355b13ea8)
diff --git a/Xext/sync.c b/Xext/sync.c
index 424361e..a006ae9 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -1168,28 +1168,24 @@ SyncComputeBracketValues(pCounter, startOver)
pnewltval = &psci->bracket_less;
}
}
- else if ( (pTrigger->test_type == XSyncPositiveTransition &&
+ else if (pTrigger->test_type == XSyncNegativeTransition &&
ct != XSyncCounterNeverIncreases)
- ||
- (pTrigger->test_type == XSyncNegativeTransition &&
+ {
+ if (XSyncValueGreaterThan(pCounter->value, pTrigger->test_value) &&
+ XSyncValueGreaterThan(pTrigger->test_value, psci->bracket_less))
+ {
+ psci->bracket_less = pTrigger->test_value;
+ pnewltval = &psci->bracket_less;
+ }
+ }
+ else if (pTrigger->test_type == XSyncPositiveTransition &&
ct != XSyncCounterNeverDecreases)
- )
{
- if (XSyncValueLessThan(pCounter->value, pTrigger->test_value))
+ if (XSyncValueLessThan(pCounter->value, pTrigger->test_value) &&
+ XSyncValueLessThan(pTrigger->test_value, psci->bracket_greater))
{
- if (XSyncValueLessThan(pTrigger->test_value,
- psci->bracket_greater))
- {
- psci->bracket_greater = pTrigger->test_value;
- pnewgtval = &psci->bracket_greater;
- }
- else
- if (XSyncValueGreaterThan(pTrigger->test_value,
- psci->bracket_less))
- {
- psci->bracket_less = pTrigger->test_value;
- pnewltval = &psci->bracket_less;
- }
+ psci->bracket_greater = pTrigger->test_value;
+ pnewgtval = &psci->bracket_greater;
}
}
} /* end for each trigger */
More information about the xorg-commit
mailing list