Xi/xibarriers.c | 9 ++++--- configure.ac | 6 ++-- hw/xfree86/common/xf86DPMS.c | 45 ++++++++++++++++++++++++------------ hw/xfree86/common/xf86platformBus.c | 7 ++++- hw/xfree86/modes/xf86Crtc.c | 18 ++++---------- hw/xfree86/modes/xf86RandR12.c | 22 +++++++++++++++++ hw/xquartz/GL/capabilities.c | 4 +++ m4/xorg-tls.m4 | 2 - os/log.c | 3 ++ os/strndup.c | 4 +++ randr/randrstr.h | 6 ++++ randr/rrprovider.c | 2 + test/signal-logging.c | 8 ++++++ 13 files changed, 102 insertions(+), 34 deletions(-)
New commits: commit 103b77c59e3638a45179bf6d7908f5c738d2d872 Author: Keith Packard <[email protected]> Date: Tue Mar 5 22:31:17 2013 -0800 Version bumped to 1.14 Signed-off-by: Keith Packard <[email protected]> diff --git a/configure.ac b/configure.ac index 53335b1..6e1ff65 100644 --- a/configure.ac +++ b/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.13.99.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) -RELEASE_DATE="2013-02-12" -RELEASE_NAME="Ginger Beer" +AC_INIT([xorg-server], 1.14.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +RELEASE_DATE="2013-03-05" +RELEASE_NAME="Keemun Mao Feng" AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) commit 6238bd68bd71323f8b4f1808f34dabe2ae447fe3 Author: Aaron Plattner <[email protected]> Date: Tue Mar 5 13:04:46 2013 -0800 DPMS: include GPU screens in DPMS code Otherwise, displays driven by GPU screens remain on all the time. Signed-off-by: Aaron Plattner <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Keith Packard <[email protected]> diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c index ef4a2c1..3f1e142 100644 --- a/hw/xfree86/common/xf86DPMS.c +++ b/hw/xfree86/common/xf86DPMS.c @@ -130,6 +130,19 @@ DPMSClose(ScreenPtr pScreen) return pScreen->CloseScreen(pScreen); } +static void +DPMSSetScreen(ScrnInfoPtr pScrn, int level) +{ + ScreenPtr pScreen = xf86ScrnToScreen(pScrn); + DPMSPtr pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey); + + if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) { + xf86VGAarbiterLock(pScrn); + pScrn->DPMSSet(pScrn, level, 0); + xf86VGAarbiterUnlock(pScrn); + } +} + /* * DPMSSet -- * Device dependent DPMS mode setting hook. This is called whenever @@ -139,8 +152,6 @@ int DPMSSet(ClientPtr client, int level) { int rc, i; - DPMSPtr pDPMS; - ScrnInfoPtr pScrn; DPMSPowerLevel = level; @@ -155,17 +166,23 @@ DPMSSet(ClientPtr client, int level) /* For each screen, set the DPMS level */ for (i = 0; i < xf86NumScreens; i++) { - pScrn = xf86Screens[i]; - pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey); - if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) { - xf86VGAarbiterLock(pScrn); - pScrn->DPMSSet(pScrn, level, 0); - xf86VGAarbiterUnlock(pScrn); - } + DPMSSetScreen(xf86Screens[i], level); + } + for (i = 0; i < xf86NumGPUScreens; i++) { + DPMSSetScreen(xf86GPUScreens[i], level); } return Success; } +static Bool +DPMSSupportedOnScreen(ScrnInfoPtr pScrn) +{ + ScreenPtr pScreen = xf86ScrnToScreen(pScrn); + DPMSPtr pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey); + + return pDPMS && pScrn->DPMSSet; +} + /* * DPMSSupported -- * Return TRUE if any screen supports DPMS. @@ -174,8 +191,6 @@ Bool DPMSSupported(void) { int i; - DPMSPtr pDPMS; - ScrnInfoPtr pScrn; if (DPMSKey == NULL) { return FALSE; @@ -183,9 +198,11 @@ DPMSSupported(void) /* For each screen, check if DPMS is supported */ for (i = 0; i < xf86NumScreens; i++) { - pScrn = xf86Screens[i]; - pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey); - if (pDPMS && pScrn->DPMSSet) + if (DPMSSupportedOnScreen(xf86Screens[i])) + return TRUE; + } + for (i = 0; i < xf86NumGPUScreens; i++) { + if (DPMSSupportedOnScreen(xf86GPUScreens[i])) return TRUE; } return FALSE; commit dd4ab8b572956f9457616869d6e383c8ed964c73 Author: Peter Hutterer <[email protected]> Date: Tue Mar 5 10:14:29 2013 +1000 Xi: force dtime to 0 on the first BarrierHit dtime to the previous event is 0 on the first BarrierHit event. Signed-off-by: Peter Hutterer <[email protected]> Reviewed-by: Jasper St. Pierre <[email protected]> Signed-off-by: Keith Packard <[email protected]> diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c index a225cbc..fccab86 100644 --- a/Xi/xibarriers.c +++ b/Xi/xibarriers.c @@ -435,6 +435,7 @@ input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen, dir = barrier_get_direction(current_x, current_y, x, y); while (dir != 0) { + int new_sequence; struct PointerBarrierDevice *pbd; c = barrier_find_nearest(cs, master, dir, current_x, current_y, x, y); @@ -444,6 +445,8 @@ input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen, nearest = &c->barrier; pbd = GetBarrierDevice(c, master->id); + new_sequence = !pbd->hit; + pbd->seen = TRUE; pbd->hit = TRUE; @@ -466,7 +469,7 @@ input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen, ev.event_id = pbd->barrier_event_id; ev.barrierid = c->id; - ev.dt = ms - pbd->last_timestamp; + ev.dt = new_sequence ? 0 : ms - pbd->last_timestamp; ev.window = c->window; pbd->last_timestamp = ms; commit 6ea59dc2d8887102bfd8d7c838d2e7ab17645aec Author: Jasper St. Pierre <[email protected]> Date: Sun Mar 3 04:50:55 2013 -0500 xibarriers: Remove accidental use of the comma operator Reviewed-by: Peter Hutterer <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c index 7b7b83f..a225cbc 100644 --- a/Xi/xibarriers.c +++ b/Xi/xibarriers.c @@ -676,8 +676,8 @@ BarrierFreeBarrier(void *data, XID id) continue; ev.deviceid = dev->id; - ev.event_id = pbd->barrier_event_id, - ev.dt = ms - pbd->last_timestamp, + ev.event_id = pbd->barrier_event_id; + ev.dt = ms - pbd->last_timestamp; GetSpritePosition(dev, &root_x, &root_y); ev.root_x = root_x; commit 8f4640bdb9d3988148e09a08d2c7e3bab1d538d6 Author: Dave Airlie <[email protected]> Date: Wed Jan 9 12:58:28 2013 +1000 randr: cleanup provider properly So in the cold plug server shutdown case, we reap the resources before we call CloseScreen handlers, so the config->randr_provider is a dangling pointer when the xf86CrtcCloseScreen handler is called, however in the hot screen unplug case, we can't rely on automatically reaped resources, so we need to clean up the provider in the xf86CrtcCloseScreen case. This patch provides a cleanup callback from the randr provider removal into the DDX so it can cleanup properly, this then gets called by the automatic code for cold plug, or if hot unplug it gets called explicitly. Fixes a number of random server crashes on shutdown Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58174 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=891140 Reviewed-by: Peter Hutterer <[email protected]> Signed-off-by: Dave Airlie <[email protected]> diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index b52b6ef..f9ae465 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -743,16 +743,8 @@ xf86CrtcCloseScreen(ScreenPtr screen) } /* detach any providers */ if (config->randr_provider) { - if (config->randr_provider->offload_sink) { - DetachOffloadGPU(screen); - config->randr_provider->offload_sink = NULL; - } - else if (config->randr_provider->output_source) { - DetachOutputGPU(screen); - config->randr_provider->output_source = NULL; - } - else if (screen->current_master) - DetachUnboundGPU(screen); + RRProviderDestroy(config->randr_provider); + config->randr_provider = NULL; } return TRUE; } diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c index 3530abf..01fc9c5 100644 --- a/hw/xfree86/modes/xf86RandR12.c +++ b/hw/xfree86/modes/xf86RandR12.c @@ -1885,6 +1885,27 @@ xf86RandR13ConstrainCursorHarder(DeviceIntPtr dev, ScreenPtr screen, int mode, i } } +static void +xf86RandR14ProviderDestroy(ScreenPtr screen, RRProviderPtr provider) +{ + ScrnInfoPtr scrn = xf86ScreenToScrn(screen); + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); + + if (config->randr_provider == provider) { + if (config->randr_provider->offload_sink) { + DetachOffloadGPU(screen); + config->randr_provider->offload_sink = NULL; + } + else if (config->randr_provider->output_source) { + DetachOutputGPU(screen); + config->randr_provider->output_source = NULL; + } + else if (screen->current_master) + DetachUnboundGPU(screen); + } + config->randr_provider = NULL; +} + static Bool xf86RandR12Init12(ScreenPtr pScreen) { @@ -1914,6 +1935,7 @@ xf86RandR12Init12(ScreenPtr pScreen) rp->rrProviderSetProperty = xf86RandR14ProviderSetProperty; rp->rrProviderGetProperty = xf86RandR14ProviderGetProperty; rp->rrCrtcSetScanoutPixmap = xf86CrtcSetScanoutPixmap; + rp->rrProviderDestroy = xf86RandR14ProviderDestroy; pScrn->PointerMoved = xf86RandR12PointerMoved; pScrn->ChangeGamma = xf86RandR12ChangeGamma; diff --git a/randr/randrstr.h b/randr/randrstr.h index f52d0f2..2517479 100644 --- a/randr/randrstr.h +++ b/randr/randrstr.h @@ -232,6 +232,9 @@ typedef Bool (*RRProviderSetOffloadSinkProcPtr)(ScreenPtr pScreen, RRProviderPtr offload_sink); +typedef void (*RRProviderDestroyProcPtr)(ScreenPtr pScreen, + RRProviderPtr provider); + /* These are for 1.0 compatibility */ typedef struct _rrRefresh { @@ -330,6 +333,9 @@ typedef struct _rrScrPriv { Bool discontiguous; RRProviderPtr provider; + + RRProviderDestroyProcPtr rrProviderDestroy; + } rrScrPrivRec, *rrScrPrivPtr; extern _X_EXPORT DevPrivateKeyRec rrPrivKeyRec; diff --git a/randr/rrprovider.c b/randr/rrprovider.c index c4ed515..b321e62 100644 --- a/randr/rrprovider.c +++ b/randr/rrprovider.c @@ -389,6 +389,8 @@ RRProviderDestroyResource (pointer value, XID pid) { rrScrPriv(pScreen); + if (pScrPriv->rrProviderDestroy) + (*pScrPriv->rrProviderDestroy)(pScreen, provider); pScrPriv->provider = NULL; } free(provider); commit 3ec35c45ca17f5ed6fd02c50fc49ae7b8d128dcb Author: Dave Airlie <[email protected]> Date: Wed Jan 9 12:53:14 2013 +1000 xf86: actually set the compat output in the failure case The previous fix for the previous fix, didn't fully work, If we don't set compat_output we end up doing derferences of arrays with -1, leading to valgrind warnings. Reviewed-by: Chris Wilson <[email protected]> Reviewed-by: Peter Hutterer <[email protected]> Signed-off-by: Dave Airlie <[email protected]> diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index b3ded5a..b52b6ef 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -1848,8 +1848,10 @@ SetCompatOutput(xf86CrtcConfigPtr config) } /* All outputs are disconnected, select one to fake */ - if (!output && config->num_output) - output = config->output[0]; + if (!output && config->num_output) { + config->compat_output = 0; + output = config->output[config->compat_output]; + } return output; } commit da8ee26023fc2868fe970471195a5f3c86fb574b Author: Dave Airlie <[email protected]> Date: Wed Jan 9 12:51:45 2013 +1000 xfree86/hotplug: cleanup properly if the screen fails to initialise Due to another bug, the modesetting/udl driver would fail to init properly on hotplug, when it did the code didn't clean up properly, and on removing the device the server could crash. Found in F18 testing. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Aaron Plattner <[email protected]> diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c index 0525e39..5866333 100644 --- a/hw/xfree86/common/xf86platformBus.c +++ b/hw/xfree86/common/xf86platformBus.c @@ -438,7 +438,12 @@ xf86platformAddDevice(int index) } scr_index = AddGPUScreen(xf86GPUScreens[i]->ScreenInit, 0, NULL); - + if (scr_index == -1) { + xf86DeleteScreen(xf86GPUScreens[i]); + xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL); + xf86NumGPUScreens = old_screens; + return -1; + } dixSetPrivate(&xf86GPUScreens[i]->pScreen->devPrivates, xf86ScreenKey, xf86GPUScreens[i]); commit 9a35d4240e2aa91ac104f0f9f86f83ff9a2d3d04 Author: Peter Hutterer <[email protected]> Date: Thu Feb 14 16:31:13 2013 +1000 os: fix pnprintf OOB buffer read for unterminated length modifiers Format strings with length modifiers but missing format specifier like "%0" will read one byte past the array size. Signed-off-by: Peter Hutterer <[email protected]> Reviewed-by: Keith Packard <[email protected]> Signed-off-by: Keith Packard <[email protected]> diff --git a/os/log.c b/os/log.c index 2697ace..95bd8cc 100644 --- a/os/log.c +++ b/os/log.c @@ -304,6 +304,9 @@ pnprintf(char *string, size_t size, const char *f, va_list args) while (f_idx < f_len && ((f[f_idx] >= '0' && f[f_idx] <= '9') || f[f_idx] == '.')) f_idx++; + if (f_idx >= f_len) + break; + switch (f[f_idx]) { case 's': string_arg = va_arg(args, char*); diff --git a/test/signal-logging.c b/test/signal-logging.c index 1ef17af..e0eb810 100644 --- a/test/signal-logging.c +++ b/test/signal-logging.c @@ -199,6 +199,14 @@ static void logging_format(void) read_log_msg(logmsg); assert(strcmp(logmsg, "(EE) substituted string\n") == 0); + /* Invalid format */ +#warning Ignore compiler warning below "lacks type at end of format". This is intentional. + LogMessageVerbSigSafe(X_ERROR, -1, "%4", 4); + read_log_msg(logmsg); + assert(strcmp(logmsg, "(EE) ") == 0); + LogMessageVerbSigSafe(X_ERROR, -1, "\n"); + fseek(f, 0, SEEK_END); + /* number substitution */ ui = 0; do { commit eda7dbff5a9f35fefe1e3dedacb82daadbf5945e Author: Jeremy Huddleston Sequoia <[email protected]> Date: Sat Feb 9 20:53:02 2013 -0800 XORG_TLS: Pick the first option that works (ie: prefer __thread) Signed-off-by: Jeremy Huddleston Sequoia <[email protected]> diff --git a/m4/xorg-tls.m4 b/m4/xorg-tls.m4 index 237fdcd..e04f1ff 100644 --- a/m4/xorg-tls.m4 +++ b/m4/xorg-tls.m4 @@ -28,7 +28,7 @@ AC_DEFUN([XORG_TLS], [ ac_cv_tls=none keywords="__thread __declspec(thread)" for kw in $keywords ; do - AC_TRY_COMPILE([int $kw test;], [], ac_cv_tls=$kw) + AC_TRY_COMPILE([int $kw test;], [], ac_cv_tls=$kw ; break ;) done ]) AC_MSG_RESULT($ac_cv_tls) commit 5da82f872daf25939a8fa04f1561b01f0315a623 Author: Jeremy Huddleston Sequoia <[email protected]> Date: Sat Feb 9 20:40:10 2013 -0800 os: Ensure <dix-config.h> is included in strndup.c Signed-off-by: Jeremy Huddleston Sequoia <[email protected]> Reviewed-by: Alan Coopersmith <[email protected]> diff --git a/os/strndup.c b/os/strndup.c index b604b9b..e0eddf1 100644 --- a/os/strndup.c +++ b/os/strndup.c @@ -27,6 +27,10 @@ * SUCH DAMAGE. */ +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + #include <stddef.h> #include <stdlib.h> #include <string.h> commit 67eaf4b46f678bc904f47dfcab6655e170d843e0 Author: Jeremy Huddleston Sequoia <[email protected]> Date: Sat Feb 9 20:34:33 2013 -0800 XQuartz: Ensure <dix-config.h> is included in capabilities.c Signed-off-by: Jeremy Huddleston Sequoia <[email protected]> Reviewed-by: Alan Coopersmith <[email protected]> diff --git a/hw/xquartz/GL/capabilities.c b/hw/xquartz/GL/capabilities.c index 4702595..5573629 100644 --- a/hw/xquartz/GL/capabilities.c +++ b/hw/xquartz/GL/capabilities.c @@ -20,6 +20,10 @@ * DEALINGS IN THE SOFTWARE. */ +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + #include <stdio.h> #include <stdlib.h> #include <assert.h> -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

