Merge branch 'origin'

This commit is contained in:
Keith Packard 2006-10-24 17:23:12 -07:00
commit 598ac7a836
20 changed files with 155 additions and 31 deletions

View File

@ -359,7 +359,12 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
if (pixmap->drawable.depth >= 24) {
bpp = 4;
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 {
bpp = 2;
format = GL_RGB;

View File

@ -301,7 +301,7 @@ typedef unsigned int *glyphPointer;
#define StorePixels(o,p) dst[o] = p
#define Loop dst += widthDst;
#else
#define StorePixels(o,p) *dst++ = (p)
#define StorePixels(o,p) do { *dst = (p); dst++; } while (0)
#define Loop dst += widthLeft;
#endif

View File

@ -82,7 +82,8 @@ AC_TYPE_PID_T
dnl Checks for library functions.
AC_FUNC_VPRINTF
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
dnl Old HAS_* names used in os/*.c.
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(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_UNQUOTED(XVENDORNAME, ["$VENDOR_STRING"], [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
AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([--enable-xorgcfg],
[Build xorgcfg GUI configuration utility (default: yes)]),
[XORGCFG=$enableval],[XORGCFG=yes])
[Build xorgcfg GUI configuration utility (default: no)]),
[XORGCFG=$enableval],[XORGCFG=no])
if test x$XORGCFG = xyes ; then
PKG_CHECK_MODULES([XORGCFG_DEP],
[xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11])

View File

@ -181,7 +181,7 @@ prints a usage message.
causes all remaining command line arguments to be ignored.
.TP 8
.B \-maxbigreqsize \fIsize\fP
sets the maxmium big request to
sets the maximum big request to
.I size
MB.
.TP 8
@ -449,7 +449,7 @@ the text after the /; it is used to distinguish between instances of
<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>

View File

@ -1435,6 +1435,10 @@ fbPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats)
*/
#if !defined(__amd64__) && !defined(__x86_64__)
#ifdef HAVE_GETISAX
#include <sys/auxv.h>
#endif
enum CPUFeatures {
NoFeatures = 0,
MMX = 0x1,
@ -1445,7 +1449,23 @@ enum CPUFeatures {
};
static unsigned int detectCPUFeatures(void) {
unsigned int features = 0;
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];
vendor[0] = 0;
vendor[12] = 0;
@ -1454,7 +1474,8 @@ static unsigned int detectCPUFeatures(void) {
* %esp here. We can't declare either one as clobbered
* since they are special registers (%ebx is the "PIC
* 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"
"pop %%eax\n"
@ -1490,7 +1511,6 @@ static unsigned int detectCPUFeatures(void) {
: "%eax", "%ecx", "%edx"
);
unsigned int features = 0;
if (result) {
/* result now contains the standard feature bits */
if (result & (1 << 15))
@ -1524,6 +1544,7 @@ static unsigned int detectCPUFeatures(void) {
features |= MMX_Extensions;
}
}
#endif /* HAVE_GETISAX */
return features;
}

View File

@ -1,3 +1,5 @@
include $(top_srcdir)/cpprules.in
if DRI
DRI_SUBDIR = dri
endif
@ -82,7 +84,23 @@ endif
optionsdir = $(libdir)/X11
dist_options_DATA = Options
BUILT_SOURCES = xorg.conf.example
CLEAN = xorg.conf.example xorg.conf.example.pre
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:
rm -f Xorg && $(MAKE) Xorg
xorg.conf.example.pre: xorgconf.cpp
cp $< $@

View File

@ -213,7 +213,6 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
ScreenPtr pCursorScreen;
Bool Switched;
int px, py;
int sigstate;
if (!pScr->vtSema || !mode || !pScr->SwitchMode)
return FALSE;
@ -233,10 +232,8 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
if (pScreen == pCursorScreen)
miPointerPosition(&px, &py);
sigstate = xf86BlockSIGIO ();
xf86EnterServerState(SETUP);
Switched = (*pScr->SwitchMode)(pScr->scrnIndex, mode, 0);
xf86EnterServerState(OPERATING);
if (Switched) {
pScr->currentMode = mode;
@ -271,7 +268,7 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
pScr->frameY1 = pScr->virtualY - 1;
}
}
xf86UnblockSIGIO (sigstate);
xf86EnterServerState(OPERATING);
if (pScr->AdjustFrame)
(*pScr->AdjustFrame)(pScr->scrnIndex, pScr->frameX0, pScr->frameY0, 0);

View File

@ -1763,8 +1763,8 @@ xf86PrintBanner()
"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"
"Before reporting bugs in pre-release versions please check the\n"
"latest version in the X.Org Foundation CVS repository.\n"
"See http://wiki.x.org/wiki/CvsPage for CVS access instructions.\n");
"latest version in the X.Org Foundation git repository.\n"
"See http://wiki.x.org/wiki/GitPage for git access instructions.\n");
#endif
ErrorF("\nX Window System Version %d.%d.%d",
XORG_VERSION_MAJOR,

View File

@ -84,7 +84,7 @@ typedef enum {
* mask is 0xFFFF0000.
*/
#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_EXTENSION_VERSION SET_ABI_VERSION(0, 3)
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 5)

View File

@ -92,6 +92,7 @@
#define PCI_VENDOR_TRITECH 0x1292
#define PCI_VENDOR_NVIDIA_SGS 0x12D2
#define PCI_VENDOR_VMWARE 0x15AD
#define PCI_VENDOR_AST 0x1A03
#define PCI_VENDOR_3DLABS 0x3D3D
#define PCI_VENDOR_AVANCE_2 0x4005
#define PCI_VENDOR_HERCULES 0x4843
@ -358,6 +359,9 @@
#define PCI_CHIP_RS350_7834 0x7834
#define PCI_CHIP_RS350_7835 0x7835
/* ASPEED Technology (AST) */
#define PCI_CHIP_AST2000 0x2000
/* Avance Logic */
#define PCI_CHIP_ALG2064 0x2064
#define PCI_CHIP_ALG2301 0x2301

View File

@ -974,6 +974,7 @@ xf86XVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv)
if(!winPriv) {
winPriv = xalloc(sizeof(XF86XVWindowRec));
if(!winPriv) return BadAlloc;
memset(winPriv, 0, sizeof(XF86XVWindowRec));
winPriv->PortRec = portPriv;
winPriv->next = PrivRoot;
pWin->devPrivates[XF86XVWindowIndex].ptr = (pointer)winPriv;
@ -1026,6 +1027,9 @@ xf86XVDestroyWindow(WindowPtr pWin)
pPriv->pDraw = NULL;
tmp = WinPriv;
if(WinPriv->pGC) {
FreeGC(WinPriv->pGC, 0);
}
WinPriv = WinPriv->next;
xfree(tmp);
}
@ -1118,6 +1122,8 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy)
while(WinPriv) {
pPriv = WinPriv->PortRec;
if(!pPriv) goto next;
if(pPriv->pCompositeClip && pPriv->FreeCompositeClip)
REGION_DESTROY(pScreen, pPriv->pCompositeClip);
@ -1148,6 +1154,7 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy)
}
}
next:
pPrev = WinPriv;
WinPriv = WinPriv->next;
}
@ -1739,9 +1746,13 @@ xf86XVPutImage(
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);
}
/* Register our port with the new window */
ret = xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv);
if(ret != Success) goto PUT_IMAGE_BAILOUT;
if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) {
clippedAway = TRUE;
@ -1772,7 +1783,6 @@ xf86XVPutImage(
if((ret == Success) &&
(portPriv->AdaptorRec->flags & VIDEO_OVERLAID_IMAGES)) {
xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv);
portPriv->isOn = XV_ON;
portPriv->pDraw = pDraw;
portPriv->drw_x = drw_x; portPriv->drw_y = drw_y;
@ -1813,6 +1823,56 @@ xf86XVQueryImageAttributes(
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
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
{

View File

@ -232,6 +232,9 @@ void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr);
void
xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes);
void
xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes);
Bool
xf86XVClipVideoHelper(
BoxPtr dst,

View File

@ -80,6 +80,7 @@ typedef struct {
typedef struct _XF86XVWindowRec{
XvPortRecPrivatePtr PortRec;
struct _XF86XVWindowRec *next;
GCPtr pGC;
} XF86XVWindowRec, *XF86XVWindowPtr;
#endif /* _XF86XVPRIV_H_ */

View File

@ -1081,7 +1081,7 @@ Include the set of modes listed in the
.B Modes
section called
.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.
.TP 7
.BI "Mode \*q" name \*q

View File

@ -625,6 +625,7 @@ _X_HIDDEN void *xfree86LookupTab[] = {
SYMFUNC(xf86XVAllocateVideoAdaptorRec)
SYMFUNC(xf86XVFreeVideoAdaptorRec)
SYMFUNC(xf86XVFillKeyHelper)
SYMFUNC(xf86XVFillKeyHelperDrawable)
SYMFUNC(xf86XVClipVideoHelper)
SYMFUNC(xf86XVCopyYUV12ToPacked)
SYMFUNC(xf86XVCopyPacked)

View File

@ -56,6 +56,7 @@ endif
if NEED_STRLCAT
STRL_SRCS = $(top_srcdir)/os/strlcat.c $(top_srcdir)/os/strlcpy.c
endif
endif BUILD_XORGCFG
xorgcfg_SOURCES = \
accessx.c \
@ -95,10 +96,7 @@ xorgcfg_SOURCES = \
xf86config.h \
$(STRL_SRCS)
XBMdir = $(includedir)/X11/bitmaps
XPMdir = $(includedir)/X11/pixmaps
XBM_DATA = \
BITMAPS = \
card.xbm \
keyboard.xbm \
monitor.xbm \
@ -112,7 +110,7 @@ XBM_DATA = \
shorter.xbm \
taller.xbm
XPM_DATA = \
PIXMAPS = \
card.xpm \
computer.xpm \
keyboard.xpm \
@ -122,6 +120,13 @@ XPM_DATA = \
# Rules needed to cpp man page & app-defaults
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)
appdefaultdir = @APPDEFAULTDIR@
@ -146,7 +151,6 @@ appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
all-local: $(appman_PRE) $(appman_DATA)
EXTRA_DIST = $(XBM_DATA) $(XPM_DATA) XOrgCfg.pre xorgcfg.man.pre
BUILT_SOURCES = $(appman_PRE)
CLEANFILES = $(APPDEFAULTFILES) $(BUILT_SOURCES) $(appman_DATA)
@ -156,4 +160,6 @@ SUFFIXES += .$(APP_MAN_SUFFIX) .man
-rm -f $@
$(LN_S) $< $@
endif
endif BUILD_XORGCFG
EXTRA_DIST = $(BITMAPS) $(PIXMAPS) XOrgCfg.pre xorgcfg.man.pre

View File

@ -1128,6 +1128,7 @@ CardConfig(void)
static char *xdrivers[] = {
"apm",
"ark",
"ast",
"ati",
"r128",
"radeon",

View File

@ -51,6 +51,11 @@ NAME ** Ark Logic (generic) [ark]
SERVER SVGA
DRIVER ark
NAME ** ASPEED Technology (generic) [ast]
#CHIPSET ast
SERVER SVGA
DRIVER ast
NAME ** ATI (generic) [ati]
#CHIPSET ati
SERVER SVGA

View File

@ -54,12 +54,9 @@ XCOMM command (or a combination of both methods)
FontPath LOCALFONTPATH
FontPath MISCFONTPATH
FontPath DPI75USFONTPATH
FontPath DPI100USFONTPATH
FontPath T1FONTPATH
FontPath TRUETYPEFONTPATH
FontPath TRUETYPEFONTPATH
FontPath CIDFONTPATH
FontPath SPFONTPATH
FontPath DPI75FONTPATH
FontPath DPI100FONTPATH

View File

@ -112,6 +112,9 @@
/* Define to 1 if you have the `geteuid' function. */
#undef HAVE_GETEUID
/* Define to 1 if you have the `getisax' function. */
#undef HAVE_GETISAX
/* Define to 1 if you have the `getopt' function. */
#undef HAVE_GETOPT