Merge branch 'server-1.5-branch' into xorg-server-1.5-apple

This commit is contained in:
Jeremy Huddleston 2008-04-18 17:23:23 -07:00
commit 5cef157d9d
26 changed files with 115 additions and 57 deletions

View File

@ -317,9 +317,10 @@ createFBConfigsForVisual(__GLXscreen *screen, ScreenPtr pScreen,
for (back = numBack - 1; back >= 0; back--)
for (depth = 0; depth < numDepth; depth++)
for (stencil = 0; stencil < numStencil; stencil++) {
config->next = xalloc(sizeof *config);
config->next = xcalloc(sizeof(*config), 1);
config = config->next;
config->visualRating = GLX_NONE;
config->visualType = glx_visual_types[visual->class];
config->xRenderable = GL_TRUE;
config->drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT;

View File

@ -488,7 +488,7 @@ addMinimalSet(__GLXscreen *pGlxScreen)
continue;
pGlxScreen->visuals[j] = config;
config->visualID = visuals[j].vid;
config->visualID = visuals[i].vid;
j++;
}

View File

@ -64,7 +64,7 @@ ProcXResQueryClients (ClientPtr client)
REQUEST_SIZE_MATCH(xXResQueryClientsReq);
current_clients = xalloc((currentMaxClients - 1) * sizeof(int));
current_clients = xalloc(currentMaxClients * sizeof(int));
num_clients = 0;
for(i = 0; i < currentMaxClients; i++) {

View File

@ -1564,7 +1564,11 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then
abi_xinput=`extract_abi XINPUT`
abi_extension=`extract_abi EXTENSION`
abi_font=`extract_abi FONT`
AC_SUBST([abi_ansic abi_videodrv abi_xinput abi_extension abi_font])
AC_SUBST([abi_ansic])
AC_SUBST([abi_videodrv])
AC_SUBST([abi_xinput])
AC_SUBST([abi_extension])
AC_SUBST([abi_font])
fi
AM_CONDITIONAL([XORG], [test "x$XORG" = xyes])
AM_CONDITIONAL([XORG_BUS_LINUXPCI], [test "x$xorg_bus_linuxpci" = xyes])
@ -2104,7 +2108,9 @@ DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"
AC_SUBST([DIX_CFLAGS])
AC_SUBST([libdir exec_prefix prefix])
AC_SUBST([libdir])
AC_SUBST([exec_prefix])
AC_SUBST([prefix])
# Man page sections - used in config utils & generating man pages
XORG_MANPAGE_SECTIONS

View File

@ -618,12 +618,12 @@ CloseDownDevices(void)
for (dev = inputInfo.devices; dev; dev = next)
{
next = dev->next;
CloseDevice(dev);
DeleteInputDeviceRequest(dev);
}
for (dev = inputInfo.off_devices; dev; dev = next)
{
next = dev->next;
CloseDevice(dev);
DeleteInputDeviceRequest(dev);
}
inputInfo.devices = NULL;
inputInfo.off_devices = NULL;

View File

@ -224,6 +224,30 @@ exaLog2(int val)
return bits - 1;
}
static void
exaSetAccelBlock(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap,
int w, int h, int bpp)
{
pExaPixmap->accel_blocked = 0;
if (pExaScr->info->maxPitchPixels) {
int max_pitch = pExaScr->info->maxPitchPixels * (bpp + 7) / 8;
if (pExaPixmap->fb_pitch > max_pitch)
pExaPixmap->accel_blocked |= EXA_RANGE_PITCH;
}
if (pExaScr->info->maxPitchBytes &&
pExaPixmap->fb_pitch > pExaScr->info->maxPitchBytes)
pExaPixmap->accel_blocked |= EXA_RANGE_PITCH;
if (w > pExaScr->info->maxX)
pExaPixmap->accel_blocked |= EXA_RANGE_WIDTH;
if (h > pExaScr->info->maxY)
pExaPixmap->accel_blocked |= EXA_RANGE_HEIGHT;
}
/**
* exaCreatePixmap() creates a new pixmap.
*
@ -339,25 +363,8 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
REGION_NULL(pScreen, &pExaPixmap->validSys);
REGION_NULL(pScreen, &pExaPixmap->validFB);
/* Check whether this pixmap can be used for acceleration. */
pExaPixmap->accel_blocked = 0;
if (pExaScr->info->maxPitchPixels) {
int max_pitch = pExaScr->info->maxPitchPixels * (bpp + 7) / 8;
if (pExaPixmap->fb_pitch > max_pitch)
pExaPixmap->accel_blocked |= EXA_RANGE_PITCH;
}
if (pExaScr->info->maxPitchBytes &&
pExaPixmap->fb_pitch > pExaScr->info->maxPitchBytes)
pExaPixmap->accel_blocked |= EXA_RANGE_PITCH;
if (w > pExaScr->info->maxX)
pExaPixmap->accel_blocked |= EXA_RANGE_WIDTH;
if (h > pExaScr->info->maxY)
pExaPixmap->accel_blocked |= EXA_RANGE_HEIGHT;
exaSetAccelBlock(pExaScr, pExaPixmap,
w, h, bpp);
return pPixmap;
}
@ -373,12 +380,16 @@ exaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth,
if (!pPixmap)
return FALSE;
pExaScr = ExaGetScreenPriv(pPixmap->drawable.pScreen);
pExaPixmap = ExaGetPixmapPriv(pPixmap);
if (pExaPixmap)
if (pExaPixmap) {
pExaPixmap->sys_ptr = pPixData;
pExaScr = ExaGetScreenPriv(pPixmap->drawable.pScreen);
exaSetAccelBlock(pExaScr, pExaPixmap,
width, height, bitsPerPixel);
}
if (pExaScr->info->ModifyPixmapHeader) {
ret = pExaScr->info->ModifyPixmapHeader(pPixmap, width, height, depth,

View File

@ -51,6 +51,9 @@ static void exaCompositeFallbackPictDesc(PicturePtr pict, char *string, int n)
case PICT_a8r8g8b8:
snprintf(format, 20, "ARGB8888");
break;
case PICT_x8r8g8b8:
snprintf(format, 20, "XRGB8888");
break;
case PICT_r5g6b5:
snprintf(format, 20, "RGB565 ");
break;

View File

@ -141,7 +141,7 @@ typedef unsigned __int64 FbBits;
defined(ia64) || defined(__ia64__) || \
defined(__sparc64__) || defined(_LP64) || \
defined(__s390x__) || \
defined(amd64) || defined (__amd64__) || \
defined(amd64) || defined (__amd64__) || defined(__x86_64__) || \
defined (__powerpc64__) || \
(defined(sgi) && (_MIPS_SZLONG == 64))
typedef unsigned long FbBits;

View File

@ -498,7 +498,7 @@ extern unsigned int inb(unsigned long port);
extern unsigned int inw(unsigned long port);
extern unsigned int inl(unsigned long port);
# elif defined(linux) && defined(__amd64__)
# elif defined(linux) && (defined(__amd64__) || defined(__x86_64__))
# include <inttypes.h>

View File

@ -71,6 +71,7 @@ extern Bool sbusSlotClaimed;
#endif
extern confDRIRec xf86ConfigDRI;
extern Bool xf86inSuspend;
extern Bool xf86DRI2Enabled(void);
#define XF86SCRNINFO(p) ((ScrnInfoPtr)dixLookupPrivate(&(p)->devPrivates, \
xf86ScreenKey))

View File

@ -449,7 +449,7 @@ chooseVideoDriver(void)
if (info != NULL)
chosen_driver = videoPtrToDriverName(info);
if (chosen_driver == NULL) {
#if defined __i386__ || defined __amd64__ || defined __hurd__
#if defined __i386__ || defined __amd64__ || defined __x86_64__ || defined __hurd__
chosen_driver = "vesa";
#elif defined __sparc__
chosen_driver = "sunffb";

View File

@ -766,6 +766,7 @@ typedef enum {
FLAG_AUTO_ADD_DEVICES,
FLAG_AUTO_ENABLE_DEVICES,
FLAG_GLX_VISUALS,
FLAG_DRI2,
} FlagValues;
static OptionInfoRec FlagOptions[] = {
@ -837,16 +838,18 @@ static OptionInfoRec FlagOptions[] = {
{0}, FALSE },
{ FLAG_ALLOW_EMPTY_INPUT, "AllowEmptyInput", OPTV_BOOLEAN,
{0}, FALSE },
{ FLAG_IGNORE_ABI, "IgnoreABI", OPTV_BOOLEAN,
{ FLAG_IGNORE_ABI, "IgnoreABI", OPTV_BOOLEAN,
{0}, FALSE },
{ FLAG_USE_DEFAULT_FONT_PATH, "UseDefaultFontPath", OPTV_BOOLEAN,
{ FLAG_USE_DEFAULT_FONT_PATH, "UseDefaultFontPath", OPTV_BOOLEAN,
{0}, FALSE },
{ FLAG_AUTO_ADD_DEVICES, "AutoAddDevices", OPTV_BOOLEAN,
{ FLAG_AUTO_ADD_DEVICES, "AutoAddDevices", OPTV_BOOLEAN,
{0}, TRUE },
{ FLAG_AUTO_ENABLE_DEVICES, "AutoEnableDevices", OPTV_BOOLEAN,
{ FLAG_AUTO_ENABLE_DEVICES, "AutoEnableDevices", OPTV_BOOLEAN,
{0}, TRUE },
{ FLAG_GLX_VISUALS, "GlxVisuals", OPTV_STRING,
{0}, FALSE },
{ FLAG_DRI2, "DRI2", OPTV_BOOLEAN,
{0}, FALSE },
{ -1, NULL, OPTV_NONE,
{0}, FALSE },
};
@ -1179,9 +1182,23 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
xf86Msg(from, "Xinerama: enabled\n");
#endif
#ifdef DRI2
xf86Info.dri2 = FALSE;
xf86Info.dri2From = X_DEFAULT;
if (xf86GetOptValBool(FlagOptions, FLAG_DRI2, &value)) {
xf86Info.dri2 = value;
xf86Info.dri2From = X_CONFIG;
}
#endif
return TRUE;
}
Bool xf86DRI2Enabled(void)
{
return xf86Info.dri2;
}
/*
* Locate the core input devices. These can be specified/located in
* the following ways, in order of priority:
@ -1338,8 +1355,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
/* 5. Built-in default. */
if (!foundPointer) {
bzero(&defPtr, sizeof(defPtr));
defPtr.inp_identifier = "<default pointer>";
defPtr.inp_driver = "mouse";
defPtr.inp_identifier = strdup("<default pointer>");
defPtr.inp_driver = strdup("mouse");
confInput = &defPtr;
foundPointer = TRUE;
from = X_DEFAULT;
@ -1385,8 +1402,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
if (!found) {
xf86Msg(X_INFO, "No default mouse found, adding one\n");
bzero(&defPtr, sizeof(defPtr));
defPtr.inp_identifier = "<default pointer>";
defPtr.inp_driver = "mouse";
defPtr.inp_identifier = strdup("<default pointer>");
defPtr.inp_driver = strdup("mouse");
confInput = &defPtr;
foundPointer = configInput(&Pointer, confInput, from);
if (foundPointer) {
@ -1474,8 +1491,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
/* 5. Built-in default. */
if (!foundKeyboard) {
bzero(&defKbd, sizeof(defKbd));
defKbd.inp_identifier = "<default keyboard>";
defKbd.inp_driver = "kbd";
defKbd.inp_identifier = strdup("<default keyboard>");
defKbd.inp_driver = strdup("kbd");
confInput = &defKbd;
foundKeyboard = TRUE;
keyboardMsg = "default keyboard configuration";

View File

@ -149,6 +149,9 @@ typedef struct {
Bool autoAddDevices; /* Whether to succeed NIDR, or ignore. */
Bool autoEnableDevices; /* Whether to enable, or let the client
* control. */
Bool dri2;
MessageType dri2From;
} xf86InfoRec, *xf86InfoPtr;
#ifdef DPMSExtension

View File

@ -446,11 +446,19 @@ void
DeleteInputDeviceRequest(DeviceIntPtr pDev)
{
LocalDevicePtr pInfo = (LocalDevicePtr) pDev->public.devicePrivate;
InputDriverPtr drv = pInfo->drv;
IDevRec *idev = pInfo->conf_idev;
InputDriverPtr drv;
IDevRec *idev;
if (pInfo) /* need to get these before RemoveDevice */
{
drv = pInfo->drv;
idev = pInfo->conf_idev;
}
RemoveDevice(pDev);
if (!pInfo) /* VCP and VCK */
return;
if(drv->UnInit)
drv->UnInit(drv, pInfo, 0);
else

View File

@ -63,7 +63,7 @@
#include <string.h>
#if defined(linux) && \
(defined(__alpha__) || defined(__powerpc__) || defined(__ia64__) \
|| defined(__amd64__))
|| defined(__amd64__) || defined(__x86_64__))
#include <malloc.h>
#endif
#include <stdarg.h>

View File

@ -93,6 +93,12 @@ static Bool quirk_prefer_large_60 (int scrnIndex, xf86MonPtr DDC)
DDC->vendor.prod_id == 638)
return TRUE;
/* Acer F51 */
if (memcmp (DDC->vendor.name, "API", 4) == 0 &&
DDC->vendor.prod_id == 0x7602)
return TRUE;
return FALSE;
}

View File

@ -19,7 +19,7 @@
#ifdef INCLUDE_XF86_NO_DOMAIN
#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__)
#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__) || defined(__x86_64__)
resPtr
xf86AccResFromOS(resPtr ret)

View File

@ -55,7 +55,7 @@
#endif
#endif
#if defined(__OpenBSD__) && defined(__amd64__)
#if defined(__OpenBSD__) && (defined(__amd64__) || defined(__x86_64__))
#include <machine/mtrr.h>
#include <machine/sysarch.h>
#endif
@ -108,7 +108,7 @@ static pointer NetBSDsetWC(int, unsigned long, unsigned long, Bool,
MessageType);
static void NetBSDundoWC(int, pointer);
#endif
#if defined(__amd64__) && defined(__OpenBSD__)
#if (defined(__amd64__) || defined(__x86_64__)) && defined(__OpenBSD__)
static pointer amd64setWC(int, unsigned long, unsigned long, Bool,
MessageType);
static void amd64undoWC(int, pointer);
@ -229,7 +229,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
pVidMem->setWC = NetBSDsetWC;
pVidMem->undoWC = NetBSDundoWC;
#endif
#if defined(__amd64__) && defined(__OpenBSD__)
#if (defined(__amd64__) || defined(__x86_64__)) && defined(__OpenBSD__)
pVidMem->setWC = amd64setWC;
pVidMem->undoWC = amd64undoWC;
#endif
@ -953,7 +953,7 @@ NetBSDundoWC(int screenNum, pointer list)
}
#endif
#if defined(__OpenBSD__) && defined(__amd64__)
#if defined(__OpenBSD__) && (defined(__amd64__) || defined(__x86_64__))
static pointer
amd64setWC(int screenNum, unsigned long base, unsigned long size, Bool enable,
MessageType from)

View File

@ -246,7 +246,7 @@
# if !defined(__FreeBSD__) && !defined(linux)
# define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge
# endif
#elif defined(__amd64__) || defined(__amd64)
#elif defined(__amd64__) || defined(__amd64) || defined(__x86_64__)
# if defined(linux)
# define ARCH_PCI_INIT linuxPciInit
# else

View File

@ -179,7 +179,9 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86memchr)
SYMFUNC(xf86memcmp)
SYMFUNC(xf86memcpy)
#if (defined(__powerpc__) && (defined(Lynx) || defined(linux))) || defined(__sparc__) || defined(__sparc) || defined(__ia64__) || defined (__amd64__)
#if (defined(__powerpc__) && (defined(Lynx) || defined(linux))) || \
defined(__sparc__) || defined(__sparc) || defined(__ia64__) || \
defined (__amd64__) || defined(__x86_64__)
/*
* Some PPC, SPARC, and IA64 compilers generate calls to memcpy to handle
* structure copies. This causes a problem both here and in shared

View File

@ -103,7 +103,7 @@
#include "x86emu/x86emui.h"
#if defined(__GNUC__)
# if defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__)
# if defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__) || defined(__x86_64__)
# include "x86emu/prim_x86_gcc.h"
# endif
#endif

View File

@ -42,7 +42,7 @@
#include "x86emu/types.h"
#if !defined(__GNUC__) || !(defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__))
#if !defined(__GNUC__) || !(defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__) || defined(__x86_64__))
#error This file is intended to be used by gcc on i386 or x86-64 system
#endif

View File

@ -75,7 +75,7 @@
defined(__sparc64__) || \
defined(__s390x__) || \
(defined(__hppa__) && defined(__LP64)) || \
defined(__amd64__) || defined(amd64) || \
defined(__amd64__) || defined(amd64) || defined(__x86_64__) || \
(defined(__sgi) && (_MIPS_SZLONG == 64))
#define NUM32 int
#else

View File

@ -169,7 +169,7 @@ typedef signed __int64 PsOutColor;
defined(ia64) || defined(__ia64__) || \
defined(__sparc64__) || defined(_LP64) || \
defined(__s390x__) || \
defined(amd64) || defined (__amd64__) || \
defined(amd64) || defined (__amd64__) || defined(__x86_64__) || \
defined (__powerpc64__) || \
(defined(sgi) && (_MIPS_SZLONG == 64))
typedef signed long PsOutColor;

View File

@ -393,7 +393,7 @@ SOFTWARE.
#endif /* ia64 */
#if defined(__amd64__) || defined(amd64) || defined(__amd64)
#if defined(__amd64__) || defined(amd64) || defined(__amd64) || defined(__x86_64__)
# define IMAGE_BYTE_ORDER LSBFirst
# if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO)

View File

@ -48,7 +48,7 @@
defined(__alpha) || defined(__alpha__) || \
defined(__i386__) || defined(__i386) || defined(__ia64__) || \
defined(__s390x__) || defined(__s390__) || \
defined(__amd64__) || defined(amd64) || defined(__amd64)
defined(__amd64__) || defined(amd64) || defined(__amd64) || defined(__x86_64__)
#define GetHighWord(x) (((int) (x)) >> 16)
#else
#define GetHighWord(x) (((int) (x)) / 65536)