Merge branch 'origin'
This commit is contained in:
		
						commit
						598ac7a836
					
				| 
						 | 
					@ -359,7 +359,12 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
 | 
				
			||||||
    if (pixmap->drawable.depth >= 24) {
 | 
					    if (pixmap->drawable.depth >= 24) {
 | 
				
			||||||
	bpp = 4;
 | 
						bpp = 4;
 | 
				
			||||||
	format = GL_BGRA;
 | 
						format = GL_BGRA;
 | 
				
			||||||
	type = GL_UNSIGNED_BYTE;
 | 
						type =
 | 
				
			||||||
 | 
					#if X_BYTE_ORDER == X_LITTLE_ENDIAN
 | 
				
			||||||
 | 
						    GL_UNSIGNED_BYTE;
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
						    GL_UNSIGNED_INT_8_8_8_8_REV;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
	bpp = 2;
 | 
						bpp = 2;
 | 
				
			||||||
	format = GL_RGB;
 | 
						format = GL_RGB;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -301,7 +301,7 @@ typedef unsigned int	*glyphPointer;
 | 
				
			||||||
#define StorePixels(o,p)    dst[o] = p
 | 
					#define StorePixels(o,p)    dst[o] = p
 | 
				
			||||||
#define Loop		    dst += widthDst;
 | 
					#define Loop		    dst += widthDst;
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
#define StorePixels(o,p)    *dst++ = (p)
 | 
					#define StorePixels(o,p)    do { *dst = (p); dst++; } while (0)
 | 
				
			||||||
#define Loop		    dst += widthLeft;
 | 
					#define Loop		    dst += widthLeft;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -82,7 +82,8 @@ AC_TYPE_PID_T
 | 
				
			||||||
dnl Checks for library functions.
 | 
					dnl Checks for library functions.
 | 
				
			||||||
AC_FUNC_VPRINTF
 | 
					AC_FUNC_VPRINTF
 | 
				
			||||||
AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \
 | 
					AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \
 | 
				
			||||||
		strtol getopt getopt_long vsnprintf walkcontext backtrace])
 | 
							strtol getopt getopt_long vsnprintf walkcontext backtrace \
 | 
				
			||||||
 | 
							getisax])
 | 
				
			||||||
AC_FUNC_ALLOCA
 | 
					AC_FUNC_ALLOCA
 | 
				
			||||||
dnl Old HAS_* names used in os/*.c.
 | 
					dnl Old HAS_* names used in os/*.c.
 | 
				
			||||||
AC_CHECK_FUNC([getdtablesize],
 | 
					AC_CHECK_FUNC([getdtablesize],
 | 
				
			||||||
| 
						 | 
					@ -820,6 +821,7 @@ VENDOR_MAN_VERSION="Version ${VENDOR_VERSION_STRING}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path])
 | 
					AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path])
 | 
				
			||||||
AC_DEFINE_DIR(RGB_DB, RGBPATH, [Default RGB path])
 | 
					AC_DEFINE_DIR(RGB_DB, RGBPATH, [Default RGB path])
 | 
				
			||||||
 | 
					AC_DEFINE_DIR(BASE_FONT_PATH, FONTDIR, [Default base font path])
 | 
				
			||||||
AC_DEFINE_DIR(DRI_DRIVER_PATH, DRI_DRIVER_PATH, [Default DRI driver path])
 | 
					AC_DEFINE_DIR(DRI_DRIVER_PATH, DRI_DRIVER_PATH, [Default DRI driver path])
 | 
				
			||||||
AC_DEFINE_UNQUOTED(XVENDORNAME, ["$VENDOR_STRING"], [Vendor name])
 | 
					AC_DEFINE_UNQUOTED(XVENDORNAME, ["$VENDOR_STRING"], [Vendor name])
 | 
				
			||||||
AC_DEFINE_UNQUOTED(XVENDORNAMESHORT, ["$VENDOR_STRING_SHORT"], [Short vendor name])
 | 
					AC_DEFINE_UNQUOTED(XVENDORNAMESHORT, ["$VENDOR_STRING_SHORT"], [Short vendor name])
 | 
				
			||||||
| 
						 | 
					@ -1579,8 +1581,8 @@ AC_SUBST(XORGCONFIG_DEP_LIBS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dnl xorgcfg GUI configuration utility
 | 
					dnl xorgcfg GUI configuration utility
 | 
				
			||||||
AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([--enable-xorgcfg], 
 | 
					AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([--enable-xorgcfg], 
 | 
				
			||||||
	[Build xorgcfg GUI configuration utility (default: yes)]),
 | 
						[Build xorgcfg GUI configuration utility (default: no)]),
 | 
				
			||||||
	[XORGCFG=$enableval],[XORGCFG=yes])
 | 
						[XORGCFG=$enableval],[XORGCFG=no])
 | 
				
			||||||
if test x$XORGCFG = xyes ; then
 | 
					if test x$XORGCFG = xyes ; then
 | 
				
			||||||
	PKG_CHECK_MODULES([XORGCFG_DEP], 
 | 
						PKG_CHECK_MODULES([XORGCFG_DEP], 
 | 
				
			||||||
	    [xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11])
 | 
						    [xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11])
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -181,7 +181,7 @@ prints a usage message.
 | 
				
			||||||
causes all remaining command line arguments to be ignored.
 | 
					causes all remaining command line arguments to be ignored.
 | 
				
			||||||
.TP 8
 | 
					.TP 8
 | 
				
			||||||
.B \-maxbigreqsize \fIsize\fP
 | 
					.B \-maxbigreqsize \fIsize\fP
 | 
				
			||||||
sets the maxmium big request to
 | 
					sets the maximum big request to
 | 
				
			||||||
.I size
 | 
					.I size
 | 
				
			||||||
MB.
 | 
					MB.
 | 
				
			||||||
.TP 8
 | 
					.TP 8
 | 
				
			||||||
| 
						 | 
					@ -449,7 +449,7 @@ the text after the /; it is used to distinguish between instances of
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<action> ::= a | i | e
 | 
					<action> ::= a | i | e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<string> ::= <dbl quoted string> | <single quoted string> | <unqouted string>
 | 
					<string> ::= <dbl quoted string> | <single quoted string> | <unquoted string>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<dbl quoted string> ::= <space> " <not dqoute>* " <space>
 | 
					<dbl quoted string> ::= <space> " <not dqoute>* " <space>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										25
									
								
								fb/fbpict.c
								
								
								
								
							
							
						
						
									
										25
									
								
								fb/fbpict.c
								
								
								
								
							| 
						 | 
					@ -1435,6 +1435,10 @@ fbPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats)
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#if !defined(__amd64__) && !defined(__x86_64__)
 | 
					#if !defined(__amd64__) && !defined(__x86_64__)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef HAVE_GETISAX
 | 
				
			||||||
 | 
					#include <sys/auxv.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum CPUFeatures {
 | 
					enum CPUFeatures {
 | 
				
			||||||
    NoFeatures = 0,
 | 
					    NoFeatures = 0,
 | 
				
			||||||
    MMX = 0x1,
 | 
					    MMX = 0x1,
 | 
				
			||||||
| 
						 | 
					@ -1445,7 +1449,23 @@ enum CPUFeatures {
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static unsigned int detectCPUFeatures(void) {
 | 
					static unsigned int detectCPUFeatures(void) {
 | 
				
			||||||
 | 
					    unsigned int features = 0;
 | 
				
			||||||
    unsigned int result;
 | 
					    unsigned int result;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef HAVE_GETISAX
 | 
				
			||||||
 | 
					    if (getisax(&result, 1)) {
 | 
				
			||||||
 | 
					        if (result & AV_386_CMOV)
 | 
				
			||||||
 | 
					            features |= CMOV;
 | 
				
			||||||
 | 
					        if (result & AV_386_MMX)
 | 
				
			||||||
 | 
					            features |= MMX;
 | 
				
			||||||
 | 
					        if (result & AV_386_AMD_MMX)
 | 
				
			||||||
 | 
					            features |= MMX_Extensions;
 | 
				
			||||||
 | 
					        if (result & AV_386_SSE)
 | 
				
			||||||
 | 
					            features |= SSE;
 | 
				
			||||||
 | 
					        if (result & AV_386_SSE2)
 | 
				
			||||||
 | 
					            features |= SSE2;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
    char vendor[13];
 | 
					    char vendor[13];
 | 
				
			||||||
    vendor[0] = 0;
 | 
					    vendor[0] = 0;
 | 
				
			||||||
    vendor[12] = 0;
 | 
					    vendor[12] = 0;
 | 
				
			||||||
| 
						 | 
					@ -1454,7 +1474,8 @@ static unsigned int detectCPUFeatures(void) {
 | 
				
			||||||
     * %esp here. We can't declare either one as clobbered
 | 
					     * %esp here. We can't declare either one as clobbered
 | 
				
			||||||
     * since they are special registers (%ebx is the "PIC
 | 
					     * since they are special registers (%ebx is the "PIC
 | 
				
			||||||
     * register" holding an offset to global data, %esp the
 | 
					     * register" holding an offset to global data, %esp the
 | 
				
			||||||
     * stack pointer), so we need to make sure they have their+      * original values when we access the output operands.
 | 
					     * stack pointer), so we need to make sure they have their
 | 
				
			||||||
 | 
					     * original values when we access the output operands.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    __asm__ ("pushf\n"
 | 
					    __asm__ ("pushf\n"
 | 
				
			||||||
             "pop %%eax\n"
 | 
					             "pop %%eax\n"
 | 
				
			||||||
| 
						 | 
					@ -1490,7 +1511,6 @@ static unsigned int detectCPUFeatures(void) {
 | 
				
			||||||
             : "%eax", "%ecx", "%edx"
 | 
					             : "%eax", "%ecx", "%edx"
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    unsigned int features = 0;
 | 
					 | 
				
			||||||
    if (result) {
 | 
					    if (result) {
 | 
				
			||||||
        /* result now contains the standard feature bits */
 | 
					        /* result now contains the standard feature bits */
 | 
				
			||||||
        if (result & (1 << 15))
 | 
					        if (result & (1 << 15))
 | 
				
			||||||
| 
						 | 
					@ -1524,6 +1544,7 @@ static unsigned int detectCPUFeatures(void) {
 | 
				
			||||||
                features |= MMX_Extensions;
 | 
					                features |= MMX_Extensions;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					#endif /* HAVE_GETISAX */
 | 
				
			||||||
    return features;
 | 
					    return features;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,3 +1,5 @@
 | 
				
			||||||
 | 
					include $(top_srcdir)/cpprules.in
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if DRI
 | 
					if DRI
 | 
				
			||||||
DRI_SUBDIR = dri
 | 
					DRI_SUBDIR = dri
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
| 
						 | 
					@ -82,7 +84,23 @@ endif
 | 
				
			||||||
optionsdir = $(libdir)/X11
 | 
					optionsdir = $(libdir)/X11
 | 
				
			||||||
dist_options_DATA = Options
 | 
					dist_options_DATA = Options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BUILT_SOURCES = xorg.conf.example
 | 
				
			||||||
 | 
					CLEAN = xorg.conf.example xorg.conf.example.pre
 | 
				
			||||||
EXTRA_DIST = xorgconf.cpp
 | 
					EXTRA_DIST = xorgconf.cpp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CPP_FILES_FLAGS = \
 | 
				
			||||||
 | 
						-DRGBPATH=\"$(RGB_DB)\" \
 | 
				
			||||||
 | 
						-DLOCALFONTPATH="\"$(BASE_FONT_PATH)/local\"" \
 | 
				
			||||||
 | 
						-DMISCFONTPATH="\"$(BASE_FONT_PATH)/misc\"" \
 | 
				
			||||||
 | 
						-DT1FONTPATH="\"$(BASE_FONT_PATH)/Type1\"" \
 | 
				
			||||||
 | 
						-DTRUETYPEFONTPATH="\"$(BASE_FONT_PATH)/TTF\"" \
 | 
				
			||||||
 | 
						-DCIDFONTPATH="\"$(BASE_FONT_PATH)/CID\"" \
 | 
				
			||||||
 | 
						-DDPI75FONTPATH="\"$(BASE_FONT_PATH)/75dpi\"" \
 | 
				
			||||||
 | 
						-DDPI100FONTPATH="\"$(BASE_FONT_PATH)/100dpi\"" \
 | 
				
			||||||
 | 
						-DMODULEPATH=\"$(DEFAULT_MODULE_PATH)\"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
relink:
 | 
					relink:
 | 
				
			||||||
	rm -f Xorg && $(MAKE) Xorg
 | 
						rm -f Xorg && $(MAKE) Xorg
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					xorg.conf.example.pre: xorgconf.cpp
 | 
				
			||||||
 | 
						cp $< $@
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -213,7 +213,6 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
 | 
				
			||||||
  ScreenPtr   pCursorScreen;
 | 
					  ScreenPtr   pCursorScreen;
 | 
				
			||||||
  Bool        Switched;
 | 
					  Bool        Switched;
 | 
				
			||||||
  int         px, py;
 | 
					  int         px, py;
 | 
				
			||||||
  int         sigstate;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (!pScr->vtSema || !mode || !pScr->SwitchMode)
 | 
					  if (!pScr->vtSema || !mode || !pScr->SwitchMode)
 | 
				
			||||||
    return FALSE;
 | 
					    return FALSE;
 | 
				
			||||||
| 
						 | 
					@ -233,10 +232,8 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
 | 
				
			||||||
  if (pScreen == pCursorScreen)
 | 
					  if (pScreen == pCursorScreen)
 | 
				
			||||||
    miPointerPosition(&px, &py);
 | 
					    miPointerPosition(&px, &py);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  sigstate = xf86BlockSIGIO ();
 | 
					 | 
				
			||||||
  xf86EnterServerState(SETUP);
 | 
					  xf86EnterServerState(SETUP);
 | 
				
			||||||
  Switched = (*pScr->SwitchMode)(pScr->scrnIndex, mode, 0);
 | 
					  Switched = (*pScr->SwitchMode)(pScr->scrnIndex, mode, 0);
 | 
				
			||||||
  xf86EnterServerState(OPERATING);
 | 
					 | 
				
			||||||
  if (Switched) {
 | 
					  if (Switched) {
 | 
				
			||||||
    pScr->currentMode = mode;
 | 
					    pScr->currentMode = mode;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -271,7 +268,7 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
 | 
				
			||||||
      pScr->frameY1 = pScr->virtualY - 1;
 | 
					      pScr->frameY1 = pScr->virtualY - 1;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  xf86UnblockSIGIO (sigstate);
 | 
					  xf86EnterServerState(OPERATING);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (pScr->AdjustFrame)
 | 
					  if (pScr->AdjustFrame)
 | 
				
			||||||
    (*pScr->AdjustFrame)(pScr->scrnIndex, pScr->frameX0, pScr->frameY0, 0);
 | 
					    (*pScr->AdjustFrame)(pScr->scrnIndex, pScr->frameX0, pScr->frameY0, 0);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1763,8 +1763,8 @@ xf86PrintBanner()
 | 
				
			||||||
    "Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.\n"
 | 
					    "Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.\n"
 | 
				
			||||||
    "Select the \"xorg\" product for bugs you find in this release.\n"
 | 
					    "Select the \"xorg\" product for bugs you find in this release.\n"
 | 
				
			||||||
    "Before reporting bugs in pre-release versions please check the\n"
 | 
					    "Before reporting bugs in pre-release versions please check the\n"
 | 
				
			||||||
    "latest version in the X.Org Foundation CVS repository.\n"
 | 
					    "latest version in the X.Org Foundation git repository.\n"
 | 
				
			||||||
    "See http://wiki.x.org/wiki/CvsPage for CVS access instructions.\n");
 | 
					    "See http://wiki.x.org/wiki/GitPage for git access instructions.\n");
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
  ErrorF("\nX Window System Version %d.%d.%d",
 | 
					  ErrorF("\nX Window System Version %d.%d.%d",
 | 
				
			||||||
	 XORG_VERSION_MAJOR,
 | 
						 XORG_VERSION_MAJOR,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -84,7 +84,7 @@ typedef enum {
 | 
				
			||||||
 * mask is 0xFFFF0000.
 | 
					 * mask is 0xFFFF0000.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#define ABI_ANSIC_VERSION	SET_ABI_VERSION(0, 3)
 | 
					#define ABI_ANSIC_VERSION	SET_ABI_VERSION(0, 3)
 | 
				
			||||||
#define ABI_VIDEODRV_VERSION	SET_ABI_VERSION(1, 0)
 | 
					#define ABI_VIDEODRV_VERSION	SET_ABI_VERSION(1, 1)
 | 
				
			||||||
#define ABI_XINPUT_VERSION	SET_ABI_VERSION(0, 6)
 | 
					#define ABI_XINPUT_VERSION	SET_ABI_VERSION(0, 6)
 | 
				
			||||||
#define ABI_EXTENSION_VERSION	SET_ABI_VERSION(0, 3)
 | 
					#define ABI_EXTENSION_VERSION	SET_ABI_VERSION(0, 3)
 | 
				
			||||||
#define ABI_FONT_VERSION	SET_ABI_VERSION(0, 5)
 | 
					#define ABI_FONT_VERSION	SET_ABI_VERSION(0, 5)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -92,6 +92,7 @@
 | 
				
			||||||
#define PCI_VENDOR_TRITECH		0x1292
 | 
					#define PCI_VENDOR_TRITECH		0x1292
 | 
				
			||||||
#define PCI_VENDOR_NVIDIA_SGS		0x12D2
 | 
					#define PCI_VENDOR_NVIDIA_SGS		0x12D2
 | 
				
			||||||
#define PCI_VENDOR_VMWARE		0x15AD
 | 
					#define PCI_VENDOR_VMWARE		0x15AD
 | 
				
			||||||
 | 
					#define PCI_VENDOR_AST			0x1A03
 | 
				
			||||||
#define PCI_VENDOR_3DLABS		0x3D3D
 | 
					#define PCI_VENDOR_3DLABS		0x3D3D
 | 
				
			||||||
#define PCI_VENDOR_AVANCE_2		0x4005
 | 
					#define PCI_VENDOR_AVANCE_2		0x4005
 | 
				
			||||||
#define PCI_VENDOR_HERCULES		0x4843
 | 
					#define PCI_VENDOR_HERCULES		0x4843
 | 
				
			||||||
| 
						 | 
					@ -358,6 +359,9 @@
 | 
				
			||||||
#define PCI_CHIP_RS350_7834             0x7834
 | 
					#define PCI_CHIP_RS350_7834             0x7834
 | 
				
			||||||
#define PCI_CHIP_RS350_7835             0x7835
 | 
					#define PCI_CHIP_RS350_7835             0x7835
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* ASPEED Technology (AST) */
 | 
				
			||||||
 | 
					#define PCI_CHIP_AST2000		0x2000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Avance Logic */
 | 
					/* Avance Logic */
 | 
				
			||||||
#define PCI_CHIP_ALG2064		0x2064
 | 
					#define PCI_CHIP_ALG2064		0x2064
 | 
				
			||||||
#define PCI_CHIP_ALG2301		0x2301
 | 
					#define PCI_CHIP_ALG2301		0x2301
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -974,6 +974,7 @@ xf86XVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv)
 | 
				
			||||||
   if(!winPriv) {
 | 
					   if(!winPriv) {
 | 
				
			||||||
	winPriv = xalloc(sizeof(XF86XVWindowRec));
 | 
						winPriv = xalloc(sizeof(XF86XVWindowRec));
 | 
				
			||||||
	if(!winPriv) return BadAlloc;
 | 
						if(!winPriv) return BadAlloc;
 | 
				
			||||||
 | 
						memset(winPriv, 0, sizeof(XF86XVWindowRec));
 | 
				
			||||||
	winPriv->PortRec = portPriv;
 | 
						winPriv->PortRec = portPriv;
 | 
				
			||||||
	winPriv->next = PrivRoot;
 | 
						winPriv->next = PrivRoot;
 | 
				
			||||||
	pWin->devPrivates[XF86XVWindowIndex].ptr = (pointer)winPriv;
 | 
						pWin->devPrivates[XF86XVWindowIndex].ptr = (pointer)winPriv;
 | 
				
			||||||
| 
						 | 
					@ -1026,6 +1027,9 @@ xf86XVDestroyWindow(WindowPtr pWin)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
     pPriv->pDraw = NULL;
 | 
					     pPriv->pDraw = NULL;
 | 
				
			||||||
     tmp = WinPriv;
 | 
					     tmp = WinPriv;
 | 
				
			||||||
 | 
					     if(WinPriv->pGC) {
 | 
				
			||||||
 | 
					       FreeGC(WinPriv->pGC, 0);
 | 
				
			||||||
 | 
					     }
 | 
				
			||||||
     WinPriv = WinPriv->next;
 | 
					     WinPriv = WinPriv->next;
 | 
				
			||||||
     xfree(tmp);
 | 
					     xfree(tmp);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					@ -1118,6 +1122,8 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy)
 | 
				
			||||||
  while(WinPriv) {
 | 
					  while(WinPriv) {
 | 
				
			||||||
     pPriv = WinPriv->PortRec;
 | 
					     pPriv = WinPriv->PortRec;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					     if(!pPriv) goto next;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
     if(pPriv->pCompositeClip && pPriv->FreeCompositeClip)
 | 
					     if(pPriv->pCompositeClip && pPriv->FreeCompositeClip)
 | 
				
			||||||
	REGION_DESTROY(pScreen, pPriv->pCompositeClip);
 | 
						REGION_DESTROY(pScreen, pPriv->pCompositeClip);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1148,6 +1154,7 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
     }
 | 
					     }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					next:
 | 
				
			||||||
     pPrev = WinPriv;
 | 
					     pPrev = WinPriv;
 | 
				
			||||||
     WinPriv = WinPriv->next;
 | 
					     WinPriv = WinPriv->next;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					@ -1739,9 +1746,13 @@ xf86XVPutImage(
 | 
				
			||||||
     REGION_UNINIT(pScreen, &VPReg);
 | 
					     REGION_UNINIT(pScreen, &VPReg);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if(portPriv->pDraw) {
 | 
					  /* If we are changing windows, unregister our port in the old window */
 | 
				
			||||||
 | 
					  if(portPriv->pDraw && (portPriv->pDraw != pDraw))
 | 
				
			||||||
     xf86XVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv);
 | 
					     xf86XVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv);
 | 
				
			||||||
  }
 | 
					
 | 
				
			||||||
 | 
					  /* Register our port with the new window */
 | 
				
			||||||
 | 
					  ret =  xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv);
 | 
				
			||||||
 | 
					  if(ret != Success) goto PUT_IMAGE_BAILOUT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
 | 
					  if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
 | 
				
			||||||
     clippedAway = TRUE;
 | 
					     clippedAway = TRUE;
 | 
				
			||||||
| 
						 | 
					@ -1772,7 +1783,6 @@ xf86XVPutImage(
 | 
				
			||||||
  if((ret == Success) &&
 | 
					  if((ret == Success) &&
 | 
				
			||||||
	(portPriv->AdaptorRec->flags & VIDEO_OVERLAID_IMAGES)) {
 | 
						(portPriv->AdaptorRec->flags & VIDEO_OVERLAID_IMAGES)) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
     xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv);
 | 
					 | 
				
			||||||
     portPriv->isOn = XV_ON;
 | 
					     portPriv->isOn = XV_ON;
 | 
				
			||||||
     portPriv->pDraw = pDraw;
 | 
					     portPriv->pDraw = pDraw;
 | 
				
			||||||
     portPriv->drw_x = drw_x;  portPriv->drw_y = drw_y;
 | 
					     portPriv->drw_x = drw_x;  portPriv->drw_y = drw_y;
 | 
				
			||||||
| 
						 | 
					@ -1813,6 +1823,56 @@ xf86XVQueryImageAttributes(
 | 
				
			||||||
			format->id, width, height, pitches, offsets);
 | 
								format->id, width, height, pitches, offsets);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					_X_EXPORT void
 | 
				
			||||||
 | 
					xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					   ScreenPtr pScreen = pDraw->pScreen;
 | 
				
			||||||
 | 
					   WindowPtr pWin = (WindowPtr)pDraw;
 | 
				
			||||||
 | 
					   XF86XVWindowPtr pPriv = GET_XF86XV_WINDOW(pWin);
 | 
				
			||||||
 | 
					   GCPtr pGC = NULL;
 | 
				
			||||||
 | 
					   XID pval[2];
 | 
				
			||||||
 | 
					   BoxPtr pbox = REGION_RECTS(clipboxes);
 | 
				
			||||||
 | 
					   int i, nbox = REGION_NUM_RECTS(clipboxes);
 | 
				
			||||||
 | 
					   xRectangle *rects;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   if(!xf86Screens[pScreen->myNum]->vtSema) return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   if(pPriv)
 | 
				
			||||||
 | 
					      pGC = pPriv->pGC;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   if(!pGC) {
 | 
				
			||||||
 | 
					       int status;
 | 
				
			||||||
 | 
					       pval[0] = key;
 | 
				
			||||||
 | 
					       pval[1] = IncludeInferiors;
 | 
				
			||||||
 | 
					       pGC = CreateGC(pDraw, GCForeground | GCSubwindowMode, pval, &status);
 | 
				
			||||||
 | 
					       if(!pGC) return;
 | 
				
			||||||
 | 
					       ValidateGC(pDraw, pGC);
 | 
				
			||||||
 | 
					       if (pPriv) pPriv->pGC = pGC;
 | 
				
			||||||
 | 
					   } else if (key != pGC->fgPixel){
 | 
				
			||||||
 | 
					       pval[0] = key;
 | 
				
			||||||
 | 
					       ChangeGC(pGC, GCForeground, pval);
 | 
				
			||||||
 | 
					       ValidateGC(pDraw, pGC);
 | 
				
			||||||
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   REGION_TRANSLATE(pDraw->pScreen, clipboxes, -pDraw->x, -pDraw->y);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   rects = ALLOCATE_LOCAL(nbox * sizeof(xRectangle));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   for(i = 0; i < nbox; i++, pbox++) {
 | 
				
			||||||
 | 
					      rects[i].x = pbox->x1;
 | 
				
			||||||
 | 
					      rects[i].y = pbox->y1;
 | 
				
			||||||
 | 
					      rects[i].width = pbox->x2 - pbox->x1;
 | 
				
			||||||
 | 
					      rects[i].height = pbox->y2 - pbox->y1;
 | 
				
			||||||
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   (*pGC->ops->PolyFillRect)(pDraw, pGC, nbox, rects);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   if (!pPriv) FreeGC(pGC, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   DEALLOCATE_LOCAL(rects);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
_X_EXPORT void
 | 
					_X_EXPORT void
 | 
				
			||||||
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
 | 
					xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -232,6 +232,9 @@ void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr);
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes);
 | 
					xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void
 | 
				
			||||||
 | 
					xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Bool
 | 
					Bool
 | 
				
			||||||
xf86XVClipVideoHelper(
 | 
					xf86XVClipVideoHelper(
 | 
				
			||||||
    BoxPtr dst,
 | 
					    BoxPtr dst,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -80,6 +80,7 @@ typedef struct {
 | 
				
			||||||
typedef struct _XF86XVWindowRec{
 | 
					typedef struct _XF86XVWindowRec{
 | 
				
			||||||
   XvPortRecPrivatePtr PortRec;
 | 
					   XvPortRecPrivatePtr PortRec;
 | 
				
			||||||
   struct _XF86XVWindowRec *next;
 | 
					   struct _XF86XVWindowRec *next;
 | 
				
			||||||
 | 
					   GCPtr pGC;
 | 
				
			||||||
} XF86XVWindowRec, *XF86XVWindowPtr;
 | 
					} XF86XVWindowRec, *XF86XVWindowPtr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif  /* _XF86XVPRIV_H_ */
 | 
					#endif  /* _XF86XVPRIV_H_ */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1081,7 +1081,7 @@ Include the set of modes listed in the
 | 
				
			||||||
.B Modes
 | 
					.B Modes
 | 
				
			||||||
section called
 | 
					section called
 | 
				
			||||||
.IR modesection-id.
 | 
					.IR modesection-id.
 | 
				
			||||||
This make all of the modes defined in that section available for use by
 | 
					This makes all of the modes defined in that section available for use by
 | 
				
			||||||
this monitor.
 | 
					this monitor.
 | 
				
			||||||
.TP 7
 | 
					.TP 7
 | 
				
			||||||
.BI "Mode  \*q" name \*q
 | 
					.BI "Mode  \*q" name \*q
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -625,6 +625,7 @@ _X_HIDDEN void *xfree86LookupTab[] = {
 | 
				
			||||||
    SYMFUNC(xf86XVAllocateVideoAdaptorRec)
 | 
					    SYMFUNC(xf86XVAllocateVideoAdaptorRec)
 | 
				
			||||||
    SYMFUNC(xf86XVFreeVideoAdaptorRec)
 | 
					    SYMFUNC(xf86XVFreeVideoAdaptorRec)
 | 
				
			||||||
    SYMFUNC(xf86XVFillKeyHelper)
 | 
					    SYMFUNC(xf86XVFillKeyHelper)
 | 
				
			||||||
 | 
					    SYMFUNC(xf86XVFillKeyHelperDrawable)
 | 
				
			||||||
    SYMFUNC(xf86XVClipVideoHelper)
 | 
					    SYMFUNC(xf86XVClipVideoHelper)
 | 
				
			||||||
    SYMFUNC(xf86XVCopyYUV12ToPacked)
 | 
					    SYMFUNC(xf86XVCopyYUV12ToPacked)
 | 
				
			||||||
    SYMFUNC(xf86XVCopyPacked)
 | 
					    SYMFUNC(xf86XVCopyPacked)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -56,6 +56,7 @@ endif
 | 
				
			||||||
if NEED_STRLCAT
 | 
					if NEED_STRLCAT
 | 
				
			||||||
STRL_SRCS = $(top_srcdir)/os/strlcat.c $(top_srcdir)/os/strlcpy.c
 | 
					STRL_SRCS = $(top_srcdir)/os/strlcat.c $(top_srcdir)/os/strlcpy.c
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					endif BUILD_XORGCFG
 | 
				
			||||||
 | 
					
 | 
				
			||||||
xorgcfg_SOURCES =	\
 | 
					xorgcfg_SOURCES =	\
 | 
				
			||||||
        accessx.c \
 | 
					        accessx.c \
 | 
				
			||||||
| 
						 | 
					@ -95,10 +96,7 @@ xorgcfg_SOURCES =	\
 | 
				
			||||||
        xf86config.h \
 | 
					        xf86config.h \
 | 
				
			||||||
	$(STRL_SRCS)
 | 
						$(STRL_SRCS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
XBMdir = $(includedir)/X11/bitmaps
 | 
					BITMAPS = \
 | 
				
			||||||
XPMdir = $(includedir)/X11/pixmaps
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
XBM_DATA = \
 | 
					 | 
				
			||||||
        card.xbm \
 | 
					        card.xbm \
 | 
				
			||||||
        keyboard.xbm \
 | 
					        keyboard.xbm \
 | 
				
			||||||
        monitor.xbm \
 | 
					        monitor.xbm \
 | 
				
			||||||
| 
						 | 
					@ -112,7 +110,7 @@ XBM_DATA = \
 | 
				
			||||||
        shorter.xbm \
 | 
					        shorter.xbm \
 | 
				
			||||||
        taller.xbm
 | 
					        taller.xbm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
XPM_DATA = \
 | 
					PIXMAPS = \
 | 
				
			||||||
        card.xpm \
 | 
					        card.xpm \
 | 
				
			||||||
        computer.xpm \
 | 
					        computer.xpm \
 | 
				
			||||||
        keyboard.xpm \
 | 
					        keyboard.xpm \
 | 
				
			||||||
| 
						 | 
					@ -122,6 +120,13 @@ XPM_DATA = \
 | 
				
			||||||
# Rules needed to cpp man page & app-defaults
 | 
					# Rules needed to cpp man page & app-defaults
 | 
				
			||||||
include $(top_srcdir)/cpprules.in
 | 
					include $(top_srcdir)/cpprules.in
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if BUILD_XORGCFG
 | 
				
			||||||
 | 
					XBMdir = $(includedir)/X11/bitmaps
 | 
				
			||||||
 | 
					XPMdir = $(includedir)/X11/pixmaps
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					XBM_DATA = $(BITMAPS)
 | 
				
			||||||
 | 
					XPM_DATA = $(PIXMAPS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# App default files  (*.ad)
 | 
					# App default files  (*.ad)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
appdefaultdir = @APPDEFAULTDIR@
 | 
					appdefaultdir = @APPDEFAULTDIR@
 | 
				
			||||||
| 
						 | 
					@ -146,7 +151,6 @@ appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
all-local: $(appman_PRE) $(appman_DATA)
 | 
					all-local: $(appman_PRE) $(appman_DATA)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
EXTRA_DIST = $(XBM_DATA) $(XPM_DATA) XOrgCfg.pre xorgcfg.man.pre
 | 
					 | 
				
			||||||
BUILT_SOURCES = $(appman_PRE)
 | 
					BUILT_SOURCES = $(appman_PRE)
 | 
				
			||||||
CLEANFILES = $(APPDEFAULTFILES) $(BUILT_SOURCES) $(appman_DATA)
 | 
					CLEANFILES = $(APPDEFAULTFILES) $(BUILT_SOURCES) $(appman_DATA)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -156,4 +160,6 @@ SUFFIXES += .$(APP_MAN_SUFFIX) .man
 | 
				
			||||||
	-rm -f $@
 | 
						-rm -f $@
 | 
				
			||||||
	$(LN_S) $< $@
 | 
						$(LN_S) $< $@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
endif
 | 
					endif BUILD_XORGCFG
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					EXTRA_DIST = $(BITMAPS) $(PIXMAPS) XOrgCfg.pre xorgcfg.man.pre
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1128,6 +1128,7 @@ CardConfig(void)
 | 
				
			||||||
    static char *xdrivers[] = {
 | 
					    static char *xdrivers[] = {
 | 
				
			||||||
	"apm",
 | 
						"apm",
 | 
				
			||||||
	"ark",
 | 
						"ark",
 | 
				
			||||||
 | 
						"ast",
 | 
				
			||||||
	"ati",
 | 
						"ati",
 | 
				
			||||||
	"r128",
 | 
						"r128",
 | 
				
			||||||
	"radeon",
 | 
						"radeon",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -51,6 +51,11 @@ NAME ** Ark Logic (generic)                [ark]
 | 
				
			||||||
SERVER SVGA
 | 
					SERVER SVGA
 | 
				
			||||||
DRIVER ark
 | 
					DRIVER ark
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					NAME ** ASPEED Technology (generic)        [ast]
 | 
				
			||||||
 | 
					#CHIPSET ast
 | 
				
			||||||
 | 
					SERVER SVGA
 | 
				
			||||||
 | 
					DRIVER ast
 | 
				
			||||||
 | 
					
 | 
				
			||||||
NAME ** ATI (generic)                      [ati]
 | 
					NAME ** ATI (generic)                      [ati]
 | 
				
			||||||
#CHIPSET ati
 | 
					#CHIPSET ati
 | 
				
			||||||
SERVER SVGA
 | 
					SERVER SVGA
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -54,12 +54,9 @@ XCOMM command (or a combination of both methods)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    FontPath	LOCALFONTPATH
 | 
					    FontPath	LOCALFONTPATH
 | 
				
			||||||
    FontPath	MISCFONTPATH
 | 
					    FontPath	MISCFONTPATH
 | 
				
			||||||
    FontPath	DPI75USFONTPATH
 | 
					 | 
				
			||||||
    FontPath	DPI100USFONTPATH
 | 
					 | 
				
			||||||
    FontPath	T1FONTPATH
 | 
					    FontPath	T1FONTPATH
 | 
				
			||||||
    FontPath    TRUETYPEFONTPATH
 | 
					    FontPath	TRUETYPEFONTPATH
 | 
				
			||||||
    FontPath	CIDFONTPATH
 | 
					    FontPath	CIDFONTPATH
 | 
				
			||||||
    FontPath	SPFONTPATH
 | 
					 | 
				
			||||||
    FontPath	DPI75FONTPATH
 | 
					    FontPath	DPI75FONTPATH
 | 
				
			||||||
    FontPath	DPI100FONTPATH
 | 
					    FontPath	DPI100FONTPATH
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -112,6 +112,9 @@
 | 
				
			||||||
/* Define to 1 if you have the `geteuid' function. */
 | 
					/* Define to 1 if you have the `geteuid' function. */
 | 
				
			||||||
#undef HAVE_GETEUID
 | 
					#undef HAVE_GETEUID
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Define to 1 if you have the `getisax' function. */
 | 
				
			||||||
 | 
					#undef HAVE_GETISAX
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Define to 1 if you have the `getopt' function. */
 | 
					/* Define to 1 if you have the `getopt' function. */
 | 
				
			||||||
#undef HAVE_GETOPT
 | 
					#undef HAVE_GETOPT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue