aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xorg-server/configure.ac14
-rw-r--r--xorg-server/dix/devices.c4
-rw-r--r--xorg-server/dix/events.c9
-rw-r--r--xorg-server/exa/exa.c11
-rw-r--r--xorg-server/exa/exa_accel.c6
-rw-r--r--xorg-server/exa/exa_migration_mixed.c33
-rw-r--r--xorg-server/exa/exa_unaccel.c4
-rw-r--r--xorg-server/hw/xfree86/common/xf86Config.c2
-rw-r--r--xorg-server/hw/xfree86/common/xf86xv.c4
-rw-r--r--xorg-server/hw/xfree86/doc/man/Xorg.man.pre2
-rw-r--r--xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre14
-rw-r--r--xorg-server/hw/xfree86/modes/xf86EdidModes.c15
-rw-r--r--xorg-server/hw/xquartz/mach-startup/stub.c12
-rw-r--r--xorg-server/hw/xquartz/xpr/x-hook.c12
-rw-r--r--xorg-server/hw/xquartz/xpr/xprCursor.c13
-rw-r--r--xorg-server/xkb/xkbAccessX.c2
16 files changed, 101 insertions, 56 deletions
diff --git a/xorg-server/configure.ac b/xorg-server/configure.ac
index fcd8875af..6cdef15fb 100644
--- a/xorg-server/configure.ac
+++ b/xorg-server/configure.ac
@@ -1881,11 +1881,15 @@ AM_CONDITIONAL(XQUARTZ_SPARKLE, [test "x$XQUARTZ_SPARKLE" != "xno"])
AM_CONDITIONAL(STANDALONE_XPBPROXY, [test "x$STANDALONE_XPBPROXY" = xyes])
dnl DMX DDX
-PKG_CHECK_MODULES([DMXMODULES],
- [xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI $DMXPROTO xau $XDMCP_MODULES],
- PKG_CHECK_MODULES([XDMXCONFIG_DEP], [xaw7 xmu xt xpm x11], [have_dmx=yes],
- [have_dmx=no]),
- [have_dmx=no])
+PKG_CHECK_MODULES(
+ [DMXMODULES],
+ [xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI $DMXPROTO xau $XDMCP_MODULES],
+ [PKG_CHECK_MODULES(
+ [XDMXCONFIG_DEP],
+ [xaw7 xmu xt xpm x11],
+ [have_dmx=yes],
+ [have_dmx=no])],
+ [have_dmx=no])
AC_MSG_CHECKING([whether to build Xdmx DDX])
if test "x$DMX" = xauto; then
DMX="$have_dmx"
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index 3634eece0..6329d2810 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -686,7 +686,6 @@ FreeDeviceClass(int type, pointer *class)
{
ValuatorClassPtr *v = (ValuatorClassPtr*)class;
- /* Counterpart to 'biggest hack ever' in init. */
if ((*v)->motion)
xfree((*v)->motion);
xfree((*v));
@@ -908,6 +907,9 @@ CloseDownDevices(void)
DeleteInputDeviceRequest(dev);
}
+ CloseDevice(inputInfo.pointer);
+ CloseDevice(inputInfo.keyboard);
+
inputInfo.devices = NULL;
inputInfo.off_devices = NULL;
inputInfo.keyboard = NULL;
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index 015c2b19f..7e0867c82 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -5080,12 +5080,9 @@ InitEvents(void)
void
CloseDownEvents(void)
{
- int len;
- EventListPtr list;
-
- len = GetEventList(&list);
- while(len--)
- xfree(list[len].event);
+ FreeEventList(InputEventList, InputEventListLen);
+ InputEventListLen = 0;
+ InputEventList = NULL;
}
/**
diff --git a/xorg-server/exa/exa.c b/xorg-server/exa/exa.c
index 16f39f6f0..023288c12 100644
--- a/xorg-server/exa/exa.c
+++ b/xorg-server/exa/exa.c
@@ -323,17 +323,10 @@ ExaDoPrepareAccess(PixmapPtr pPixmap, int index)
has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
- if (has_gpu_copy) {
- /* This can be NULL, but the driver prepareAccess call should
- * take care of that. */
+ if (has_gpu_copy && pExaPixmap->fb_ptr)
pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
- pPixmap->devKind = pExaPixmap->fb_pitch;
- } else {
- /* For mixed pixmaps this can be NULL, but that will be fixed
- * later in exaPrepareAccessReg_mixed(). */
+ else
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
- pPixmap->devKind = pExaPixmap->sys_pitch;
- }
/* Store so we can handle repeated / nested calls. */
pExaScr->access[index].pixmap = pPixmap;
diff --git a/xorg-server/exa/exa_accel.c b/xorg-server/exa/exa_accel.c
index 1d88acbf0..0f6e5f78a 100644
--- a/xorg-server/exa/exa_accel.c
+++ b/xorg-server/exa/exa_accel.c
@@ -506,11 +506,9 @@ exaHWCopyNtoN (DrawablePtr pSrcDrawable,
exaMarkSync (pDstDrawable->pScreen);
/* UTS: mainly for SHM PutImage's secondary path.
*
- * Not taking this path for mixed pixmaps: It could only save one CPU
- * copy between cached memory and risks causing a more expensive
- * DownloadFromScreen later on.
+ * Only taking this path for directly accessible pixmaps.
*/
- } else if (!(pExaScr->info->flags & EXA_MIXED_PIXMAPS)) {
+ } else if (!pDstExaPixmap->pDamage) {
int bpp = pSrcDrawable->bitsPerPixel;
int src_stride = exaGetPixmapPitch(pSrcPixmap);
CARD8 *src = NULL;
diff --git a/xorg-server/exa/exa_migration_mixed.c b/xorg-server/exa/exa_migration_mixed.c
index ee32b215d..b755b83bb 100644
--- a/xorg-server/exa/exa_migration_mixed.c
+++ b/xorg-server/exa/exa_migration_mixed.c
@@ -101,6 +101,15 @@ exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
if (pExaPixmap->pDamage && exaPixmapHasGpuCopy(pPixmap)) {
ExaScreenPriv(pPixmap->drawable.pScreen);
+ /* This pitch is needed for proper acceleration. For some reason
+ * there are pixmaps without pDamage and a bad fb_pitch value.
+ * So setting devKind when only exaPixmapHasGpuCopy() is true
+ * causes corruption. Pixmaps without pDamage are not migrated
+ * and should have a valid devKind at all times, so that's why this
+ * isn't causing problems. Pixmaps have their gpu pitch set the
+ * first time in the MPH call from exaCreateDriverPixmap_mixed().
+ */
+ pPixmap->devKind = pExaPixmap->fb_pitch;
exaCopyDirtyToFb(pixmaps + i);
if (pExaScr->deferred_mixed_pixmap == pPixmap)
@@ -108,10 +117,6 @@ exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
}
pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
- if (pExaPixmap->use_gpu_copy)
- pPixmap->devKind = pExaPixmap->fb_pitch;
- else
- pPixmap->devKind = pExaPixmap->sys_pitch;
}
}
@@ -136,8 +141,9 @@ exaMoveInPixmap_mixed(PixmapPtr pPixmap)
void
exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
{
+ ExaPixmapPriv(pPixmap);
+
if (!ExaDoPrepareAccess(pPixmap, index)) {
- ExaPixmapPriv(pPixmap);
Bool has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
ExaMigrationRec pixmaps[1];
@@ -198,6 +204,22 @@ exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
pPixmap->devKind = pExaPixmap->sys_pitch;
pExaPixmap->use_gpu_copy = FALSE;
+ /* We have a gpu pixmap that can be accessed, we don't need the cpu copy
+ * anymore. Drivers that prefer DFS, should fail prepare access. */
+ } else if (pExaPixmap->pDamage && exaPixmapHasGpuCopy(pPixmap)) {
+ ExaScreenPriv(pPixmap->drawable.pScreen);
+
+ /* Copy back any deferred content if needed. */
+ if (pExaScr->deferred_mixed_pixmap &&
+ pExaScr->deferred_mixed_pixmap == pPixmap)
+ exaMoveInPixmap_mixed(pPixmap);
+
+ DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage);
+ DamageDestroy(pExaPixmap->pDamage);
+ pExaPixmap->pDamage = NULL;
+
+ free(pExaPixmap->sys_ptr);
+ pExaPixmap->sys_ptr = NULL;
}
}
@@ -222,6 +244,7 @@ void exaFinishAccess_mixed(PixmapPtr pPixmap, int index)
pExaScr->deferred_mixed_pixmap != pPixmap)
exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap);
pExaScr->deferred_mixed_pixmap = pPixmap;
+ pPixmap->devKind = pExaPixmap->fb_pitch;
} else
exaMoveInPixmap_mixed(pPixmap);
}
diff --git a/xorg-server/exa/exa_unaccel.c b/xorg-server/exa/exa_unaccel.c
index 9bc765a53..eee14da4a 100644
--- a/xorg-server/exa/exa_unaccel.c
+++ b/xorg-server/exa/exa_unaccel.c
@@ -414,7 +414,9 @@ ExaCheckComposite (CARD8 op,
PixmapPtr pDstPix;
if (!miComputeCompositeRegion (&region, pSrc, pMask, pDst,
- xSrc, ySrc, xMask, yMask, xDst, yDst,
+ xSrc, ySrc, xMask, yMask,
+ xDst + pDst->pDrawable->x,
+ yDst + pDst->pDrawable->y,
width, height))
goto skip;
diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c
index 40f65bdbf..e1283f97f 100644
--- a/xorg-server/hw/xfree86/common/xf86Config.c
+++ b/xorg-server/hw/xfree86/common/xf86Config.c
@@ -1456,7 +1456,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
#ifdef CONFIG_HAL
xf86Msg(X_INFO, "The server relies on HAL to provide the list of "
"input devices.\n\tIf no devices become available, "
- "reconfigure HAL or disable AllowEmptyInput.\n");
+ "reconfigure HAL or disable AutoAddDevices.\n");
#else
xf86Msg(X_INFO, "HAL is disabled and no input devices were configured.\n"
"\tTry disabling AllowEmptyInput.\n");
diff --git a/xorg-server/hw/xfree86/common/xf86xv.c b/xorg-server/hw/xfree86/common/xf86xv.c
index abbe03397..82216598b 100644
--- a/xorg-server/hw/xfree86/common/xf86xv.c
+++ b/xorg-server/hw/xfree86/common/xf86xv.c
@@ -1297,7 +1297,7 @@ xf86XVAdjustFrame(int index, int x, int y, int flags)
for(i = pa->nPorts; i > 0; i--, pPort++) {
pPriv = (XvPortRecPrivatePtr)pPort->devPriv.ptr;
- if(!pPriv->type && (pPriv->isOn == XV_ON)) { /* overlaid still/image */
+ if(!pPriv->type && (pPriv->isOn != XV_OFF)) { /* overlaid still/image */
if(pPriv->pCompositeClip && pPriv->FreeCompositeClip)
REGION_DESTROY(pScreen, pPriv->pCompositeClip);
@@ -1311,7 +1311,7 @@ xf86XVAdjustFrame(int index, int x, int y, int flags)
(pWin->visibility == VisibilityPartiallyObscured)))
{
xf86XVReputImage(pPriv);
- } else {
+ } else if (pPriv->isOn == XV_ON) {
(*pPriv->AdaptorRec->StopVideo)(
pPriv->pScrn, pPriv->DevPriv.ptr, FALSE);
xf86XVRemovePortFromWindow(pWin, pPriv);
diff --git a/xorg-server/hw/xfree86/doc/man/Xorg.man.pre b/xorg-server/hw/xfree86/doc/man/Xorg.man.pre
index 2f9ff98c7..fe3280038 100644
--- a/xorg-server/hw/xfree86/doc/man/Xorg.man.pre
+++ b/xorg-server/hw/xfree86/doc/man/Xorg.man.pre
@@ -525,7 +525,7 @@ Header files.
.B __projectroot__/lib/\(**
Libraries.
.TP 30
-.B __projectroot__/lib/X11/fonts/\(**
+.B __datadir__/fonts/X11/\(**
Fonts.
.TP 30
.B __projectroot__/share/X11/XErrorDB
diff --git a/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre b/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre
index e3cbcf586..ace041c92 100644
--- a/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre
+++ b/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre
@@ -356,12 +356,12 @@ font path elements (which can be set inside a catalogue directory):
.PP
.RS 4
.nf
-.I __projectroot__/lib/X11/fonts/misc/
-.I __projectroot__/lib/X11/fonts/TTF/
-.I __projectroot__/lib/X11/fonts/OTF/
-.I __projectroot__/lib/X11/fonts/Type1/
-.I __projectroot__/lib/X11/fonts/100dpi/
-.I __projectroot__/lib/X11/fonts/75dpi/
+.I __datadir__/fonts/X11/misc/
+.I __datadir__/fonts/X11/TTF/
+.I __datadir__/fonts/X11/OTF/
+.I __datadir__/fonts/X11/Type1/
+.I __datadir__/fonts/X11/100dpi/
+.I __datadir__/fonts/X11/75dpi/
.fi
.RE
.PP
@@ -1378,7 +1378,7 @@ monitors do not require it. The default is off.
.BI "Option " "\*qPrimary\*q " \*qbool\*q
This optional entry specifies that the monitor should be treated as the primary
monitor. (RandR 1.2-supporting drivers only)
-.TP7
+.TP 7
.BI "Option " "\*qPreferredMode\*q " \*qstring\*q
This optional entry specifies a mode to be marked as the preferred initial mode
of the monitor.
diff --git a/xorg-server/hw/xfree86/modes/xf86EdidModes.c b/xorg-server/hw/xfree86/modes/xf86EdidModes.c
index 449078e2a..ec6540841 100644
--- a/xorg-server/hw/xfree86/modes/xf86EdidModes.c
+++ b/xorg-server/hw/xfree86/modes/xf86EdidModes.c
@@ -135,6 +135,16 @@ static Bool quirk_detailed_v_in_cm (int scrnIndex, xf86MonPtr DDC)
DDC->vendor.prod_id == 47360)
return TRUE;
+ /* Bug #10304: LGPhilipsLCD LP154W01-A5 */
+ if (memcmp(DDC->vendor.name, "LPL", 4) == 0 &&
+ DDC->vendor.prod_id == 0)
+ return TRUE;
+
+ /* Bug #24482: LGPhilipsLCD LP154W01-TLA1 */
+ if (memcmp(DDC->vendor.name, "LPL", 4) == 0 &&
+ DDC->vendor.prod_id == 0x2a00)
+ return TRUE;
+
/* Bug #21750: Samsung Syncmaster 2333HD */
if (memcmp (DDC->vendor.name, "SAM", 4) == 0 &&
DDC->vendor.prod_id == 1157)
@@ -145,11 +155,6 @@ static Bool quirk_detailed_v_in_cm (int scrnIndex, xf86MonPtr DDC)
static Bool quirk_detailed_use_maximum_size (int scrnIndex, xf86MonPtr DDC)
{
- /* Bug #10304: LGPhilipsLCD LP154W01-A5 */
- if (memcmp (DDC->vendor.name, "LPL", 4) == 0 &&
- (DDC->vendor.prod_id == 0 || DDC->vendor.prod_id == 0x2a00))
- return TRUE;
-
/* Bug #21324: Iiyama Vision Master 450 */
if (memcmp (DDC->vendor.name, "IVM", 4) == 0 &&
DDC->vendor.prod_id == 6400)
diff --git a/xorg-server/hw/xquartz/mach-startup/stub.c b/xorg-server/hw/xquartz/mach-startup/stub.c
index af1c59efb..c8686e78f 100644
--- a/xorg-server/hw/xquartz/mach-startup/stub.c
+++ b/xorg-server/hw/xquartz/mach-startup/stub.c
@@ -306,12 +306,12 @@ int main(int argc, char **argv, char **envp) {
/* We have fixed-size string lengths due to limitations in IPC,
* so we need to copy our argv and envp.
*/
- newargv = (string_array_t)alloca(argc * sizeof(string_t));
- newenvp = (string_array_t)alloca(envpc * sizeof(string_t));
-
+ newargv = (string_array_t)malloc(argc * sizeof(string_t));
+ newenvp = (string_array_t)malloc(envpc * sizeof(string_t));
+
if(!newargv || !newenvp) {
fprintf(stderr, "Xquartz: Memory allocation failure\n");
- exit(EXIT_FAILURE);
+ return EXIT_FAILURE;
}
for(i=0; i < argc; i++) {
@@ -322,6 +322,10 @@ int main(int argc, char **argv, char **envp) {
}
kr = start_x11_server(mp, newargv, argc, newenvp, envpc);
+
+ free(newargv);
+ free(newenvp);
+
if (kr != KERN_SUCCESS) {
fprintf(stderr, "Xquartz: start_x11_server: %s\n", mach_error_string(kr));
return EXIT_FAILURE;
diff --git a/xorg-server/hw/xquartz/xpr/x-hook.c b/xorg-server/hw/xquartz/xpr/x-hook.c
index bb873bbfb..03e7f8553 100644
--- a/xorg-server/hw/xquartz/xpr/x-hook.c
+++ b/xorg-server/hw/xquartz/xpr/x-hook.c
@@ -34,6 +34,7 @@
#include "x-hook.h"
#include <stdlib.h>
#include <assert.h>
+#include "os.h"
#define CELL_NEW(f,d) X_PFX (list_prepend) ((x_list *) (f), (d))
#define CELL_FREE(c) X_PFX (list_free_1) (c)
@@ -79,9 +80,13 @@ X_PFX (hook_run) (x_list *lst, void *arg)
int length, i;
length = X_PFX (list_length) (lst);
- fun = alloca (sizeof (x_hook_function *) * length);
- data = alloca (sizeof (void *) * length);
+ fun = xalloc (sizeof (x_hook_function *) * length);
+ data = xalloc (sizeof (void *) * length);
+ if(!fun || !data) {
+ FatalError("Failed to allocate memory in %s\n", __func__);
+ }
+
for (i = 0, node = lst; node != NULL; node = node->next, i++)
{
cell = node->data;
@@ -93,6 +98,9 @@ X_PFX (hook_run) (x_list *lst, void *arg)
{
(*fun[i]) (arg, data[i]);
}
+
+ xfree(fun);
+ xfree(data);
}
X_EXTERN void
diff --git a/xorg-server/hw/xquartz/xpr/xprCursor.c b/xorg-server/hw/xquartz/xpr/xprCursor.c
index b577fc099..fbaf825de 100644
--- a/xorg-server/hw/xquartz/xpr/xprCursor.c
+++ b/xorg-server/hw/xquartz/xpr/xprCursor.c
@@ -95,7 +95,10 @@ load_cursor(CursorPtr src, int screen)
const uint32_t *be_data=(uint32_t *) src->bits->argb;
unsigned i;
rowbytes = src->bits->width * sizeof (CARD32);
- data=alloca (rowbytes * src->bits->height);
+ data = xalloc(rowbytes * src->bits->height);
+ if(!data) {
+ FatalError("Failed to allocate memory in %s\n", __func__);
+ }
for(i=0;i<(src->bits->width*src->bits->height);i++)
data[i]=ntohl(be_data[i]);
#endif
@@ -118,8 +121,11 @@ load_cursor(CursorPtr src, int screen)
/* round up to 8 pixel boundary so we can convert whole bytes */
rowbytes = ((src->bits->width * 4) + 31) & ~31;
- data = alloca(rowbytes * src->bits->height);
-
+ data = xalloc(rowbytes * src->bits->height);
+ if(!data) {
+ FatalError("Failed to allocate memory in %s\n", __func__);
+ }
+
if (!src->bits->emptyMask)
{
ycount = src->bits->height;
@@ -168,6 +174,7 @@ load_cursor(CursorPtr src, int screen)
}
err = xp_set_cursor(width, height, hot_x, hot_y, data, rowbytes);
+ xfree(data);
return err == Success;
}
diff --git a/xorg-server/xkb/xkbAccessX.c b/xorg-server/xkb/xkbAccessX.c
index 2fc764290..0d8e4eb2d 100644
--- a/xorg-server/xkb/xkbAccessX.c
+++ b/xorg-server/xkb/xkbAccessX.c
@@ -131,6 +131,8 @@ AccessXKeyboardEvent(DeviceIntPtr keybd,
event.time = GetTimeInMillis();
event.length = sizeof(DeviceEvent);
event.key_repeat = isRepeat;
+ event.sourceid = keybd->id;
+ event.deviceid = keybd->id;
if (xkbDebugFlags&0x8) {
DebugF("[xkb] AXKE: Key %d %s\n", keyCode,