diff --git a/configure.ac b/configure.ac index d2b7a0a44..09e9ac925 100644 --- a/configure.ac +++ b/configure.ac @@ -1364,6 +1364,7 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then CFLAGS=$PCIACCESS_CFLAGS LIBS=$PCIACCESS_LIBS AC_CHECK_FUNCS([pci_system_init_dev_mem]) + 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" @@ -1633,8 +1634,8 @@ AC_MSG_RESULT([$XPRINT]) if test "x$XPRINT" = xyes; then PKG_CHECK_MODULES([XPRINTMODULES], [printproto x11 xfont $XDMCP_MODULES xau]) - XPRINT_CFLAGS="$XPRINTMODULES_CFLAGS" - XPRINT_LIBS="$XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS $MIEXT_DAMAGE_LIB $XKB_LIB $XKB_STUB_LIB" + XPRINT_CFLAGS="$XPRINTMODULES_CFLAGS -DXPRINT" + XPRINT_LIBS="$XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS $MIEXT_DAMAGE_LIB $XKB_LIB $XKB_STUB_LIB" XPRINT_SYS_LIBS="$XPRINTMODULES_LIBS" xpconfigdir=$libdir/X11/xserver diff --git a/dix/Makefile.am b/dix/Makefile.am index b7b1ec071..e44b51081 100644 --- a/dix/Makefile.am +++ b/dix/Makefile.am @@ -1,4 +1,10 @@ -noinst_LTLIBRARIES = libdix.la libxpstubs.la +standard_dix_libs = libdix.la libxpstubs.la + +if XPRINT +noinst_LTLIBRARIES = $(standard_dix_libs) libXpdix.la +else +noinst_LTLIBRARIES = $(standard_dix_libs) +endif AM_CFLAGS = $(DIX_CFLAGS) \ -DVENDOR_NAME=\""@VENDOR_NAME@"\" \ @@ -39,7 +45,11 @@ libdix_la_SOURCES = \ libxpstubs_la_SOURCES = \ xpstubs.c -INCLUDES = -I$(top_srcdir)/Xprint +if XPRINT +libXpdix_la_SOURCES = $(libdix_la_SOURCES) +libXpdix_la_CPPFLAGS = -I$(top_srcdir)/hw/xprint +libXpdix_la_CFLAGS = $(AM_CFLAGS) $(XPRINT_CFLAGS) +endif EXTRA_DIST = buildatoms BuiltInAtoms CHANGES Xserver.d Xserver-dtrace.h.in diff --git a/exa/exa.c b/exa/exa.c index 81dc3e2ab..3a6ad988e 100644 --- a/exa/exa.c +++ b/exa/exa.c @@ -248,6 +248,19 @@ exaSetAccelBlock(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, pExaPixmap->accel_blocked |= EXA_RANGE_HEIGHT; } +static void +exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, + int w, int h, int bpp) +{ + if (pExaScr->info->flags & EXA_OFFSCREEN_ALIGN_POT && w != 1) + pExaPixmap->fb_pitch = (1 << (exaLog2(w - 1) + 1)) * bpp / 8; + else + pExaPixmap->fb_pitch = w * bpp / 8; + + pExaPixmap->fb_pitch = EXA_ALIGN(pExaPixmap->fb_pitch, + pExaScr->info->pixmapPitchAlign); +} + /** * exaCreatePixmap() creates a new pixmap. * @@ -292,12 +305,8 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, if (paddedWidth / 4 > 32767 || h > 32767) return NullPixmap; - if (pExaScr->info->flags & EXA_OFFSCREEN_ALIGN_POT && w != 1) - pExaPixmap->fb_pitch = (1 << (exaLog2(w - 1) + 1)) * bpp / 8; - else - pExaPixmap->fb_pitch = w * bpp / 8; - pExaPixmap->fb_pitch = EXA_ALIGN(pExaPixmap->fb_pitch, - pExaScr->info->pixmapPitchAlign); + exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp); + if (paddedWidth < pExaPixmap->fb_pitch) paddedWidth = pExaPixmap->fb_pitch; @@ -331,12 +340,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, pExaPixmap->offscreen = FALSE; pExaPixmap->fb_ptr = NULL; - if (pExaScr->info->flags & EXA_OFFSCREEN_ALIGN_POT && w != 1) - pExaPixmap->fb_pitch = (1 << (exaLog2(w - 1) + 1)) * bpp / 8; - else - pExaPixmap->fb_pitch = w * bpp / 8; - pExaPixmap->fb_pitch = EXA_ALIGN(pExaPixmap->fb_pitch, - pExaScr->info->pixmapPitchAlign); + exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp); pExaPixmap->fb_size = pExaPixmap->fb_pitch * h; if (pExaPixmap->fb_pitch > 131071) { @@ -384,10 +388,19 @@ exaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth, pExaPixmap = ExaGetPixmapPriv(pPixmap); if (pExaPixmap) { - pExaPixmap->sys_ptr = pPixData; + if (pPixData) + pExaPixmap->sys_ptr = pPixData; - exaSetAccelBlock(pExaScr, pExaPixmap, - width, height, bitsPerPixel); + if (devKind > 0) + pExaPixmap->sys_pitch = devKind; + + if (width > 0 && height > 0 && bitsPerPixel > 0) { + exaSetFbPitch(pExaScr, pExaPixmap, + width, height, bitsPerPixel); + + exaSetAccelBlock(pExaScr, pExaPixmap, + width, height, bitsPerPixel); + } } @@ -686,6 +699,34 @@ exaBitmapToRegion(PixmapPtr pPix) return ret; } +static Bool +exaCreateScreenResources(ScreenPtr pScreen) +{ + ExaScreenPriv(pScreen); + PixmapPtr pScreenPixmap; + Bool b; + + pScreen->CreateScreenResources = pExaScr->SavedCreateScreenResources; + b = pScreen->CreateScreenResources(pScreen); + pScreen->CreateScreenResources = exaCreateScreenResources; + + if (!b) + return FALSE; + + pScreenPixmap = pScreen->GetScreenPixmap(pScreen); + + if (pScreenPixmap) { + ExaPixmapPriv(pScreenPixmap); + + exaSetAccelBlock(pExaScr, pExaPixmap, + pScreenPixmap->drawable.width, + pScreenPixmap->drawable.height, + pScreenPixmap->drawable.bitsPerPixel); + } + + return TRUE; +} + /** * exaCloseScreen() unwraps its wrapped screen functions and tears down EXA's * screen private, before calling down to the next CloseSccreen. @@ -707,6 +748,7 @@ exaCloseScreen(int i, ScreenPtr pScreen) pScreen->CopyWindow = pExaScr->SavedCopyWindow; pScreen->ChangeWindowAttributes = pExaScr->SavedChangeWindowAttributes; pScreen->BitmapToRegion = pExaScr->SavedBitmapToRegion; + pScreen->CreateScreenResources = pExaScr->SavedCreateScreenResources; #ifdef RENDER if (ps) { ps->Composite = pExaScr->SavedComposite; @@ -864,6 +906,9 @@ exaDriverInit (ScreenPtr pScreen, pExaScr->SavedBitmapToRegion = pScreen->BitmapToRegion; pScreen->BitmapToRegion = exaBitmapToRegion; + pExaScr->SavedCreateScreenResources = pScreen->CreateScreenResources; + pScreen->CreateScreenResources = exaCreateScreenResources; + #ifdef RENDER if (ps) { pExaScr->SavedComposite = ps->Composite; diff --git a/exa/exa.h b/exa/exa.h index 97ae6c0a5..256209418 100644 --- a/exa/exa.h +++ b/exa/exa.h @@ -64,6 +64,8 @@ struct _ExaOffscreenArea { ExaOffscreenState state; ExaOffscreenArea *next; + + unsigned eviction_cost; }; /** diff --git a/exa/exa_accel.c b/exa/exa_accel.c index c2bfdee6b..d66dd4718 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -487,7 +487,8 @@ exaCopyNtoN (DrawablePtr pSrcDrawable, int src_off_x, src_off_y; int dst_off_x, dst_off_y; ExaMigrationRec pixmaps[2]; - RegionPtr region = NULL; + RegionPtr srcregion = NULL, dstregion = NULL; + xRectangle *rects; pSrcPixmap = exaGetDrawablePixmap (pSrcDrawable); pDstPixmap = exaGetDrawablePixmap (pDstDrawable); @@ -495,33 +496,38 @@ exaCopyNtoN (DrawablePtr pSrcDrawable, exaGetDrawableDeltas (pSrcDrawable, pSrcPixmap, &src_off_x, &src_off_y); exaGetDrawableDeltas (pDstDrawable, pDstPixmap, &dst_off_x, &dst_off_y); - if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask, - pGC->fillStyle, pGC->alu)) { - xRectangle *rects = xalloc(nbox * sizeof(xRectangle)); + rects = xalloc(nbox * sizeof(xRectangle)); - if (rects) { - int i; + if (rects) { + int i; - for (i = 0; i < nbox; i++) { - rects[i].x = pbox[i].x1 + dst_off_x; - rects[i].y = pbox[i].y1 + dst_off_y; - rects[i].width = pbox[i].x2 - pbox[i].x1; - rects[i].height = pbox[i].y2 - pbox[i].y1; - } + for (i = 0; i < nbox; i++) { + rects[i].x = pbox[i].x1 + dx + src_off_x; + rects[i].y = pbox[i].y1 + dy + src_off_y; + rects[i].width = pbox[i].x2 - pbox[i].x1; + rects[i].height = pbox[i].y2 - pbox[i].y1; + } - region = RECTS_TO_REGION(pScreen, nbox, rects, CT_YXBANDED); - xfree(rects); + srcregion = RECTS_TO_REGION(pScreen, nbox, rects, CT_YXBANDED); + xfree(rects); + + if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask, + pGC->fillStyle, pGC->alu)) { + dstregion = REGION_CREATE(pScreen, NullBox, 0); + REGION_COPY(pScreen, dstregion, srcregion); + REGION_TRANSLATE(pScreen, dstregion, dst_off_x - dx - src_off_x, + dst_off_y - dy - src_off_y); } } pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; pixmaps[0].pPix = pDstPixmap; - pixmaps[0].pReg = region; + pixmaps[0].pReg = dstregion; pixmaps[1].as_dst = FALSE; pixmaps[1].as_src = TRUE; pixmaps[1].pPix = pSrcPixmap; - pixmaps[1].pReg = NULL; + pixmaps[1].pReg = srcregion; pSrcExaPixmap = ExaGetPixmapPriv (pSrcPixmap); pDstExaPixmap = ExaGetPixmapPriv (pDstPixmap); @@ -574,17 +580,21 @@ fallback: EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrcDrawable, pDstDrawable, exaDrawableLocation(pSrcDrawable), exaDrawableLocation(pDstDrawable))); - exaPrepareAccessReg (pDstDrawable, EXA_PREPARE_DEST, region); - exaPrepareAccess (pSrcDrawable, EXA_PREPARE_SRC); + exaPrepareAccessReg (pDstDrawable, EXA_PREPARE_DEST, dstregion); + exaPrepareAccessReg (pSrcDrawable, EXA_PREPARE_SRC, srcregion); fbCopyNtoN (pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy, reverse, upsidedown, bitplane, closure); exaFinishAccess (pSrcDrawable, EXA_PREPARE_SRC); exaFinishAccess (pDstDrawable, EXA_PREPARE_DEST); out: - if (region) { - REGION_UNINIT(pScreen, region); - REGION_DESTROY(pScreen, region); + if (dstregion) { + REGION_UNINIT(pScreen, dstregion); + REGION_DESTROY(pScreen, dstregion); + } + if (srcregion) { + REGION_UNINIT(pScreen, srcregion); + REGION_DESTROY(pScreen, srcregion); } } @@ -940,10 +950,8 @@ exaImageGlyphBlt (DrawablePtr pDrawable, int dstBpp; int dstXoff, dstYoff; FbBits depthMask; - Bool fallback; PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); ExaPixmapPriv(pPixmap); - ExaMigrationRec pixmaps[1]; RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage); BoxRec extents = *REGION_EXTENTS(pScreen, pending_damage); int xoff, yoff; @@ -952,16 +960,8 @@ exaImageGlyphBlt (DrawablePtr pDrawable, return; depthMask = FbFullMask(pDrawable->depth); - fallback = (pGC->planemask & depthMask) != depthMask; - pixmaps[0].as_dst = TRUE; - pixmaps[0].as_src = FALSE; - pixmaps[0].pPix = pPixmap; - pixmaps[0].pReg = fallback ? NULL : pending_damage; - - exaDoMigration(pixmaps, 1, FALSE); - - if (fallback) + if ((pGC->planemask & depthMask) != depthMask) { ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase); return; @@ -984,7 +984,7 @@ exaImageGlyphBlt (DrawablePtr pDrawable, extents.y1 -= yoff; extents.y2 -= yoff; - exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, pixmaps[0].pReg); + exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, pending_damage); if (TERMINALFONT (pGC->font) && !glyph) { diff --git a/exa/exa_migration.c b/exa/exa_migration.c index d3646b0b6..5f22474e9 100644 --- a/exa/exa_migration.c +++ b/exa/exa_migration.c @@ -116,7 +116,7 @@ exaPixmapShouldBeInFB (PixmapPtr pPix) * If the pixmap is currently dirty, this copies at least the dirty area from * FB to system or vice versa. Both areas must be allocated. */ -static _X_INLINE void +static void exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc, Bool (*transfer) (PixmapPtr pPix, int x, int y, int w, int h, char *sys, int sys_pitch), CARD8 *fallback_src, diff --git a/exa/exa_offscreen.c b/exa/exa_offscreen.c index 85b538896..4aaa2c132 100644 --- a/exa/exa_offscreen.c +++ b/exa/exa_offscreen.c @@ -21,11 +21,9 @@ */ /** @file - * This allocator allocates blocks of memory by maintaining a list of areas - * and a score for each area. As an area is marked used, its score is - * incremented, and periodically all of the areas have their scores decayed by - * a fraction. When allocating, the contiguous block of areas with the minimum - * score is found and evicted in order to make room for the new allocation. + * This allocator allocates blocks of memory by maintaining a list of areas. + * When allocating, the contiguous block of areas with the minimum eviction + * cost is found and evicted in order to make room for the new allocation. */ #include "exa_priv.h" @@ -71,19 +69,36 @@ ExaOffscreenKickOut (ScreenPtr pScreen, ExaOffscreenArea *area) return exaOffscreenFree (pScreen, area); } -#define AREA_SCORE(area) (area->size / (double)(pExaScr->offScreenCounter - area->last_use)) +static void +exaUpdateEvictionCost(ExaOffscreenArea *area, unsigned offScreenCounter) +{ + unsigned age; + + if (area->state == ExaOffscreenAvail) + return; + + age = offScreenCounter - area->last_use; + + /* This is unlikely to happen, but could result in a division by zero... */ + if (age > (UINT_MAX / 2)) { + age = UINT_MAX / 2; + area->last_use = offScreenCounter - age; + } + + area->eviction_cost = area->size / age; +} static ExaOffscreenArea * exaFindAreaToEvict(ExaScreenPrivPtr pExaScr, int size, int align) { ExaOffscreenArea *begin, *end, *best; - double score, best_score; + unsigned cost, best_cost; int avail, real_size, tmp; - best_score = UINT_MAX; + best_cost = UINT_MAX; begin = end = pExaScr->info->offScreenAreas; avail = 0; - score = 0; + cost = 0; best = 0; while (end != NULL) @@ -106,23 +121,24 @@ exaFindAreaToEvict(ExaScreenPrivPtr pExaScr, int size, int align) if (end->state == ExaOffscreenLocked) { /* Can't more room here, restart after this locked area */ avail = 0; - score = 0; + cost = 0; begin = end; goto restart; } avail += end->size; - score += AREA_SCORE(end); + exaUpdateEvictionCost(end, pExaScr->offScreenCounter); + cost += end->eviction_cost; end = end->next; } - /* Check the score, update best */ - if (avail >= real_size && score < best_score) { + /* Check the cost, update best */ + if (avail >= real_size && cost < best_cost) { best = begin; - best_score = score; + best_cost = cost; } avail -= begin->size; - score -= AREA_SCORE(begin); + cost -= begin->eviction_cost; begin = begin->next; } @@ -244,6 +260,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align, new_area->state = ExaOffscreenAvail; new_area->save = NULL; new_area->last_use = 0; + new_area->eviction_cost = 0; new_area->next = area->next; area->next = new_area; area->size = real_size; @@ -409,6 +426,7 @@ exaOffscreenFree (ScreenPtr pScreen, ExaOffscreenArea *area) area->state = ExaOffscreenAvail; area->save = NULL; area->last_use = 0; + area->eviction_cost = 0; /* * Find previous area */ @@ -474,6 +492,7 @@ exaOffscreenInit (ScreenPtr pScreen) area->save = NULL; area->next = NULL; area->last_use = 0; + area->eviction_cost = 0; /* Add it to the free areas */ pExaScr->info->offScreenAreas = area; diff --git a/exa/exa_priv.h b/exa/exa_priv.h index e41f46aba..0138e4a7d 100644 --- a/exa/exa_priv.h +++ b/exa/exa_priv.h @@ -107,6 +107,7 @@ typedef struct { CopyWindowProcPtr SavedCopyWindow; ChangeWindowAttributesProcPtr SavedChangeWindowAttributes; BitmapToRegionProcPtr SavedBitmapToRegion; + CreateScreenResourcesProcPtr SavedCreateScreenResources; ModifyPixmapHeaderProcPtr SavedModifyPixmapHeader; #ifdef RENDER CompositeProcPtr SavedComposite; diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c index c55ef032b..8e19886a9 100644 --- a/exa/exa_unaccel.c +++ b/exa/exa_unaccel.c @@ -359,6 +359,7 @@ ExaCheckComposite (CARD8 op, CARD32 exaGetPixmapFirstPixel (PixmapPtr pPixmap) { + ExaScreenPriv(pPixmap->drawable.pScreen); CARD32 pixel; void *fb; Bool need_finish = FALSE; @@ -373,7 +374,8 @@ exaGetPixmapFirstPixel (PixmapPtr pPixmap) fb = pExaPixmap->sys_ptr; /* Try to avoid framebuffer readbacks */ - if ((!offscreen && !sys_valid && !damaged) || + if (pExaScr->info->CreatePixmap || + (!offscreen && !sys_valid && !damaged) || (offscreen && (!sys_valid || damaged))) { box.x1 = 0; diff --git a/hw/xfree86/common/xf86VidMode.c b/hw/xfree86/common/xf86VidMode.c index 38d605c88..9260bb57b 100644 --- a/hw/xfree86/common/xf86VidMode.c +++ b/hw/xfree86/common/xf86VidMode.c @@ -150,10 +150,14 @@ VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock) return FALSE; pScrn = xf86Screens[scrnIndex]; - *mode = (pointer)(pScrn->currentMode); - *dotClock = pScrn->currentMode->Clock; - return TRUE; + if (pScrn->currentMode) { + *mode = (pointer)(pScrn->currentMode); + *dotClock = pScrn->currentMode->Clock; + + return TRUE; + } + return FALSE; } _X_EXPORT int diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c index 574843473..9e2c6199c 100644 --- a/hw/xfree86/os-support/linux/int10/linux.c +++ b/hw/xfree86/os-support/linux/int10/linux.c @@ -278,6 +278,10 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) struct pci_device *rom_device = xf86GetPciInfoForEntity(pInt->entityIndex); +#if HAVE_PCI_DEVICE_ENABLE + pci_device_enable(rom_device); +#endif + err = pci_device_read_rom(rom_device, (unsigned char *)(V_BIOS)); if (err) { xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS (%s)\n", diff --git a/hw/xprint/Makefile.am b/hw/xprint/Makefile.am index 1b8004841..2ed7aaf57 100644 --- a/hw/xprint/Makefile.am +++ b/hw/xprint/Makefile.am @@ -3,7 +3,7 @@ SUBDIRS = doc pcl pcl-mono raster ps etc config bin_PROGRAMS = Xprt Xprt_CFLAGS = @DIX_CFLAGS@ @XPRINT_CFLAGS@ \ - -DXPRINT -DPRINT_ONLY_SERVER -D_XP_PRINT_SERVER_ \ + -DPRINT_ONLY_SERVER -D_XP_PRINT_SERVER_ \ -DXPRINTDIR=\"$(libdir)/X11/xserver\" \ -DXPRASTERDDX -DXPPCLDDX -DXPMONOPCLDDX -DXPPSDDX \ -DXFree86Server @@ -17,6 +17,7 @@ XPRINT_LIBS = \ pcl-mono/libpcl.la \ $(top_builddir)/fb/libfb.la \ $(top_builddir)/render/librender.la \ + $(top_builddir)/dix/libXpdix.la \ $(XSERVER_LIBS) \ $(top_builddir)/Xext/libXext.la \ $(top_builddir)/xkb/libxkb.la \ diff --git a/hw/xprint/ddxInit.c b/hw/xprint/ddxInit.c index d744121aa..795052120 100644 --- a/hw/xprint/ddxInit.c +++ b/hw/xprint/ddxInit.c @@ -291,6 +291,12 @@ ddxProcessArgument ( #include "XIstubs.h" #include "exglobals.h" +/* Place dummy config functions here instead of config/config.c, + since Xprint does not use D-BUS */ +void config_init() { } +void config_fini() { } + + int ChangePointerDevice ( DeviceIntPtr old_dev, diff --git a/include/Makefile.am b/include/Makefile.am index 673a97685..7d5fee70b 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -50,10 +50,12 @@ sdk_HEADERS = \ validate.h \ window.h \ windowstr.h \ + xkbsrv.h \ + xkbstr.h \ xorg-server.h endif AM_CFLAGS = $(DIX_CFLAGS) EXTRA_DIST = $(sdk_HEADERS) do-not-use-config.h dix-config.h xorg-config.h \ - xkb-config.h xkbfile.h xkbsrv.h xkbstr.h + xkb-config.h xkbfile.h diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in index 5587c0a8d..e05d3bfd3 100644 --- a/include/xorg-config.h.in +++ b/include/xorg-config.h.in @@ -118,6 +118,9 @@ /* Have pci_system_init_dev_mem() */ #undef HAVE_PCI_SYSTEM_INIT_DEV_MEM +/* Have pci_enable_device */ +#undef HAVE_PCI_DEVICE_ENABLE + /* Path to text files containing PCI IDs */ #undef PCI_TXT_IDS_PATH diff --git a/render/picture.c b/render/picture.c index 35e2a28b3..2fbd09e8b 100644 --- a/render/picture.c +++ b/render/picture.c @@ -413,8 +413,9 @@ PictureInitIndexedFormat(ScreenPtr pScreen, PictFormatPtr format) (ColormapPtr) LookupIDByType(pScreen->defColormap, RT_COLORMAP); } else { VisualPtr pVisual = PictureFindVisual(pScreen, format->index.vid); - if (!CreateColormap(FakeClientID (0), pScreen, pVisual, - &format->index.pColormap, AllocNone, 0)) + if (CreateColormap(FakeClientID (0), pScreen, pVisual, + &format->index.pColormap, AllocNone, 0) + != Success) return FALSE; } if (!ps->InitIndexed(pScreen, format))