diff --git a/.gitignore b/.gitignore index 429f677ff..1e7970677 100644 --- a/.gitignore +++ b/.gitignore @@ -116,6 +116,24 @@ hw/dmx/examples/xdmx hw/dmx/examples/xinput hw/dmx/examples/xled hw/dmx/examples/xtest +hw/kdrive/ati/Xati +hw/kdrive/chips/Xchips +hw/kdrive/ephyr/Xephyr +hw/kdrive/epson/Xepson +hw/kdrive/fake/Xfake +hw/kdrive/fbdev/Xfbdev +hw/kdrive/i810/Xi810 +hw/kdrive/mach64/Xmach64 +hw/kdrive/mga/Xmga +hw/kdrive/neomagic/Xneomagic +hw/kdrive/nvidia/Xnvidia +hw/kdrive/pm2/Xpm2 +hw/kdrive/r128/Xr128 +hw/kdrive/sdl/Xsdl +hw/kdrive/sis300/Xsis +hw/kdrive/smi/Xsmi +hw/kdrive/vesa/Xvesa +hw/kdrive/via/Xvia hw/vfb/Xvfb hw/vfb/Xvfb.1x hw/vfb/Xvfb.man @@ -126,6 +144,8 @@ hw/xfree86/doc/man/Xorg.1x hw/xfree86/doc/man/Xorg.man hw/xfree86/doc/man/xorg.conf.5x hw/xfree86/doc/man/xorg.conf.man +hw/xfree86/exa/exa.4 +hw/xfree86/exa/exa.man hw/xfree86/fbdevhw/fbdevhw.4x hw/xfree86/fbdevhw/fbdevhw.man hw/xfree86/getconfig/cfg.man diff --git a/GL/glx/indirect_util.c b/GL/glx/indirect_util.c index c9d8600c8..bab0226be 100644 --- a/GL/glx/indirect_util.c +++ b/GL/glx/indirect_util.c @@ -185,8 +185,8 @@ __glXSendReplySwap( ClientPtr client, const void * data, size_t elements, } __glXReply.length = bswap_32( reply_ints ); - __glXReply.type = bswap_32( X_Reply ); - __glXReply.sequenceNumber = bswap_32( client->sequence ); + __glXReply.type = X_Reply; + __glXReply.sequenceNumber = bswap_16( client->sequence ); __glXReply.size = bswap_32( elements ); __glXReply.retval = bswap_32( retval ); diff --git a/configure.ac b/configure.ac index d025638a3..b8d942ee7 100644 --- a/configure.ac +++ b/configure.ac @@ -843,7 +843,7 @@ PKG_CHECK_MODULES([XSERVERCFLAGS], [$REQUIRED_MODULES $REQUIRED_LIBS]) PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS]) XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS}" -XSERVER_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} -lm -lz" +XSERVER_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} -lm" AC_SUBST([XSERVER_LIBS]) AC_SUBST([SYS_LIBS]) diff --git a/exa/exa.c b/exa/exa.c index 4b96af815..aa5532a98 100644 --- a/exa/exa.c +++ b/exa/exa.c @@ -158,7 +158,7 @@ exaLog2(int val) { int bits; - if (!val) + if (val <= 0) return 0; for (bits = 0; val != 0; bits++) val >>= 1; diff --git a/exa/exa.h b/exa/exa.h index 2cb200854..96465a775 100644 --- a/exa/exa.h +++ b/exa/exa.h @@ -36,6 +36,7 @@ #include "windowstr.h" #include "gcstruct.h" #include "picturestr.h" +#include "fb.h" #define EXA_VERSION_MAJOR 2 #define EXA_VERSION_MINOR 0 @@ -715,4 +716,12 @@ exaGetPixmapSize(PixmapPtr pPix); void exaEnableDisableFBAccess (int index, Bool enable); +/** + * Returns TRUE if the given planemask covers all the significant bits in the + * pixel values for pDrawable. + */ +#define EXA_PM_IS_SOLID(_pDrawable, _pm) \ + (((_pm) & FbFullMask((_pDrawable)->depth)) == \ + FbFullMask((_pDrawable)->depth)) + #endif /* EXA_H */ diff --git a/exa/exa_priv.h b/exa/exa_priv.h index 90af55335..03ee0eddb 100644 --- a/exa/exa_priv.h +++ b/exa/exa_priv.h @@ -137,14 +137,6 @@ extern int exaPixmapPrivateIndex; /** Align an offset to a power-of-two alignment */ #define EXA_ALIGN2(offset, align) (((offset) + (align) - 1) & ~((align) - 1)) -/** - * Returns TRUE if the given planemask covers all the significant bits in the - * pixel values for pDrawable. - */ -#define EXA_PM_IS_SOLID(_pDrawable, _pm) \ - (((_pm) & FbFullMask((_pDrawable)->depth)) == \ - FbFullMask((_pDrawable)->depth)) - #define EXA_PIXMAP_SCORE_MOVE_IN 10 #define EXA_PIXMAP_SCORE_MAX 20 #define EXA_PIXMAP_SCORE_MOVE_OUT -10 diff --git a/exa/exa_render.c b/exa/exa_render.c index 26b29ab04..b21c5d724 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -282,8 +282,12 @@ exaTryDriverSolidFill(PicturePtr pSrc, return -1; } - exaGetPixelFromRGBA(&pixel, red, green, blue, alpha, - pDst->format); + if (!exaGetPixelFromRGBA(&pixel, red, green, blue, alpha, + pDst->format)) + { + REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + return -1; + } if (!(*pExaScr->info->PrepareSolid) (pDstPix, GXcopy, 0xffffffff, pixel)) { diff --git a/fb/fbcompose.c b/fb/fbcompose.c index 03adab456..3a61e975a 100644 --- a/fb/fbcompose.c +++ b/fb/fbcompose.c @@ -573,9 +573,9 @@ static fetchProc fetchProcForPicture (PicturePtr pict) /* 1bpp formats */ case PICT_a1: return fbFetch_a1; case PICT_g1: return fbFetch_g1; - default: - return NULL; } + + return NULL; } /* @@ -1010,9 +1010,9 @@ static fetchPixelProc fetchPixelProcForPicture (PicturePtr pict) /* 1bpp formats */ case PICT_a1: return fbFetchPixel_a1; case PICT_g1: return fbFetchPixel_g1; - default: - return NULL; } + + return NULL; } diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 397f75dc1..831c68ad8 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -1255,12 +1255,8 @@ xf86InterceptSigIll(void (*sigillhandler)(void)) xf86SigIllHandler = sigillhandler; } -#ifdef HAVE_EXECINFO_H -#define HAVE_BACKTRACE -#include -#endif - #ifdef HAVE_BACKTRACE +#include static __inline__ void xorg_backtrace(void) { diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c index 4b0e35459..5e460361b 100644 --- a/hw/xfree86/dri/xf86dri.c +++ b/hw/xfree86/dri/xf86dri.c @@ -81,6 +81,7 @@ static DISPATCH_PROC(ProcXF86DRIDispatch); static DISPATCH_PROC(ProcXF86DRIAuthConnection); static DISPATCH_PROC(SProcXF86DRIQueryVersion); +static DISPATCH_PROC(SProcXF86DRIQueryDirectRenderingCapable); static DISPATCH_PROC(SProcXF86DRIDispatch); static void XF86DRIResetProc(ExtensionEntry* extEntry); @@ -142,6 +143,9 @@ ProcXF86DRIQueryVersion( if (client->swapped) { swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); + swaps(&rep.majorVersion, n); + swaps(&rep.minorVersion, n); + swapl(&rep.patchVersion, n); } WriteToClient(client, sizeof(xXF86DRIQueryVersionReply), (char *)&rep); return (client->noClientException); @@ -154,6 +158,7 @@ ProcXF86DRIQueryDirectRenderingCapable( { xXF86DRIQueryDirectRenderingCapableReply rep; Bool isCapable; + register int n; REQUEST(xXF86DRIQueryDirectRenderingCapableReq); REQUEST_SIZE_MATCH(xXF86DRIQueryDirectRenderingCapableReq); @@ -172,9 +177,14 @@ ProcXF86DRIQueryDirectRenderingCapable( } rep.isCapable = isCapable; - if (!LocalClient(client)) + if (!LocalClient(client) || client->swapped) rep.isCapable = 0; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + } + WriteToClient(client, sizeof(xXF86DRIQueryDirectRenderingCapableReply), (char *)&rep); return (client->noClientException); @@ -626,6 +636,18 @@ SProcXF86DRIQueryVersion( return ProcXF86DRIQueryVersion(client); } +static int +SProcXF86DRIQueryDirectRenderingCapable( + register ClientPtr client +) +{ + register int n; + REQUEST(xXF86DRIQueryDirectRenderingCapableReq); + swaps(&stuff->length, n); + swapl(&stuff->screen, n); + return ProcXF86DRIQueryDirectRenderingCapable(client); +} + static int SProcXF86DRIDispatch ( register ClientPtr client @@ -633,16 +655,17 @@ SProcXF86DRIDispatch ( { REQUEST(xReq); - /* It is bound to be non-local when there is byte swapping */ - if (!LocalClient(client)) - return DRIErrorBase + XF86DRIClientNotLocal; - - /* only local clients are allowed DRI access */ + /* + * Only local clients are allowed DRI access, but remote clients still need + * these requests to find out cleanly. + */ switch (stuff->data) { case X_XF86DRIQueryVersion: return SProcXF86DRIQueryVersion(client); + case X_XF86DRIQueryDirectRenderingCapable: + return SProcXF86DRIQueryDirectRenderingCapable(client); default: - return BadRequest; + return DRIErrorBase + XF86DRIClientNotLocal; } } diff --git a/hw/xfree86/exa/Makefile.am b/hw/xfree86/exa/Makefile.am index 8e85e1ede..7f0a20e4c 100644 --- a/hw/xfree86/exa/Makefile.am +++ b/hw/xfree86/exa/Makefile.am @@ -14,3 +14,15 @@ libexa_la_SOURCES = \ libexa_la_LIBADD = \ ../../../exa/libexa.la + +include $(top_srcdir)/cpprules.in + +drivermandir = $(DRIVER_MAN_DIR) +driverman_DATA = exa.$(DRIVER_MAN_SUFFIX) +CLEANFILES = $(driverman_DATA) exa.man + +exa.$(DRIVER_MAN_SUFFIX): exa.man + -rm -f exa.$(DRIVER_MAN_SUFFIX) + $(LN_S) exa.man exa.$(DRIVER_MAN_SUFFIX) + +EXTRA_DIST = exa.man.pre README diff --git a/hw/xfree86/exa/exa.man.pre b/hw/xfree86/exa/exa.man.pre new file mode 100644 index 000000000..ea41b90e4 --- /dev/null +++ b/hw/xfree86/exa/exa.man.pre @@ -0,0 +1,40 @@ +.\" shorthand for double quote that works everywhere. +.ds q \N'34' +.TH EXA __drivermansuffix__ __vendorversion__ +.SH NAME +exa \- new 2D acceleration architecture for X.Org +.SH DESCRIPTION +.B EXA +provides a simple API for video drivers to implement for 2D acceleration. It +is a module loaded by drivers, and is not intended to be loaded on its own. See +your driver's manual page for how to enable +.B EXA +. +.PP +The +.B EXA +architecture is designed to make accelerating the Render extension simple and +efficient, and results in various performance tradeoffs compared to XAA. Some +options are available for debugging performance issues or driver rendering +problems. They are not intended for general use. +.TP +.BI "Option \*qEXANoComposite\*q \*q" boolean \*q +Disables acceleration of the Composite operation, which is at the heart of +the Render extension. Not related to the Composite extension. Default: No. +.TP +.BI "Option \*qEXANoUploadToScreen\*q \*q" boolean \*q +Disables acceleration of uploading pixmap data to the freamebuffer. Default: No. +.TP +.BI "Option \*qEXANoDownloadFromScreen\*q \*q" boolean \*q +Disables acceleration of downloading of pixmap data from the framebuffer. +.B NOTE: +Not usable with drivers which rely on DownloadFromScreen succeeding. +Default: No. +.TP +.BI "Option \*qMigrationHeuristic\*q \*q" anystr \*q +Chooses an alternate pixmap migration heuristic, for debugging purposes. The +default is intended to be the best performing one for general use, though others +may help with specific use cases. Available options include \*qalways\*q, +\*qgreedy\*q, and \*qsmart\*q. Default: smart. +.SH AUTHORS +Authors include: Keith Packard, Eric Anholt, Zack Rusin, and Michel Dänzer diff --git a/hw/xfree86/loader/os.c b/hw/xfree86/loader/os.c index 42ab0bc70..83fd24787 100644 --- a/hw/xfree86/loader/os.c +++ b/hw/xfree86/loader/os.c @@ -33,10 +33,11 @@ /* * OSNAME is a standard form of the OS name that may be used by the - * loader and by OS-specific modules. + * loader and by OS-specific modules. OSNAME here is different from what's in + * dix-config.h */ -#ifndef OSNAME +#undef OSNAME #if defined(__linux__) #define OSNAME "linux" #elif defined(__FreeBSD__) @@ -66,7 +67,6 @@ #else #define OSNAME "unknown" #endif -#endif /* Return the OS name, and run-time OS version */ diff --git a/render/picture.h b/render/picture.h index e7d86ac39..8184c02c0 100644 --- a/render/picture.h +++ b/render/picture.h @@ -102,10 +102,6 @@ typedef enum _PictFormatShort { PICT_g8 = PICT_FORMAT(8,PICT_TYPE_GRAY,0,0,0,0), PICT_x4a4 = PICT_FORMAT(8,PICT_TYPE_A,4,0,0,0), - PICT_x4r1g2b1 = PICT_FORMAT(8,PICT_TYPE_ARGB,0,1,2,1), - PICT_x4b1g2r1 = PICT_FORMAT(8,PICT_TYPE_ABGR,0,1,2,1), - PICT_x4a1r1g1b1 = PICT_FORMAT(8,PICT_TYPE_ARGB,1,1,1,1), - PICT_x4a1b1g1r1 = PICT_FORMAT(8,PICT_TYPE_ABGR,1,1,1,1), PICT_x4c4 = PICT_FORMAT(8,PICT_TYPE_COLOR,0,0,0,0), PICT_x4g4 = PICT_FORMAT(8,PICT_TYPE_GRAY,0,0,0,0),