Merge branch 'server-1.3-origin' into server-1.3-branch

This commit is contained in:
Keith Packard 2007-02-17 17:37:56 -08:00
commit 1418fd8ce4
14 changed files with 80 additions and 36 deletions

View file

@ -872,7 +872,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"
XSERVER_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
AC_SUBST([SYS_LIBS])
AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes],
@ -883,9 +883,9 @@ AC_MSG_CHECKING([for a useful monotonic clock ...])
if ! test "x$have_clock_gettime" = xno; then
if ! test "x$have_clock_gettime" = xyes; then
LIBS="$have_clock_gettime"
CLOCK_LIBS="$have_clock_gettime"
else
LIBS=""
CLOCK_LIBS=""
fi
AC_RUN_IFELSE([
@ -910,7 +910,8 @@ AC_MSG_RESULT([$MONOTONIC_CLOCK])
if test "x$MONOTONIC_CLOCK" = xyes; then
AC_DEFINE(MONOTONIC_CLOCK, 1, [Have monotonic clock from clock_gettime()])
XSERVER_LIBS="$XSERVER_LIBS $LIBS"
XSERVER_LIBS="$XSERVER_LIBS $CLOCK_LIBS"
LIBS="$LIBS $CLOCK_LIBS"
fi
dnl Imake defines SVR4 on SVR4 systems, and many files check for it, so
@ -988,7 +989,7 @@ AC_MSG_RESULT([$XVFB])
AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes])
if test "x$XVFB" = xyes; then
XVFB_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB"
XVFB_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS"
AC_SUBST([XVFB_LIBS])
fi
@ -1004,7 +1005,7 @@ AC_MSG_RESULT([$XNEST])
AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes])
if test "x$XNEST" = xyes; then
XNEST_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB"
XNEST_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS"
AC_SUBST([XNEST_LIBS])
fi
@ -1364,7 +1365,7 @@ AC_MSG_RESULT([$XPRINT])
if test "x$XPRINT" = xyes; then
PKG_CHECK_MODULES([XPRINT], [printproto x11 xfont $XDMCP_MODULES xau])
XPRINT_EXTENSIONS="$XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS"
XPRINT_LIBS="$XPRINT_LIBS $DIX_LIB $XKB_LIB $XKB_STUB_LIB $XPRINT_EXTENSIONS $MI_LIB $MIEXT_DAMAGE_LIB $CWRAP_LIB $OS_LIB"
XPRINT_LIBS="$XPRINT_LIBS $DIX_LIB $XKB_LIB $XKB_STUB_LIB $XPRINT_EXTENSIONS $MI_LIB $MIEXT_DAMAGE_LIB $CWRAP_LIB $OS_LIB $LIBS"
AC_SUBST([XPRINT_CFLAGS])
AC_SUBST([XPRINT_LIBS])

View file

@ -75,7 +75,8 @@ Bool
ephyrScreenInitialize (KdScreenInfo *screen, EphyrScrPriv *scrpriv)
{
int width = 640, height = 480;
unsigned long redMask, greenMask, blueMask;
if (hostx_want_screen_size(&width, &height)
|| !screen->width || !screen->height)
{
@ -127,30 +128,24 @@ ephyrScreenInitialize (KdScreenInfo *screen, EphyrScrPriv *scrpriv)
{
screen->fb[0].depth = 15;
screen->fb[0].bitsPerPixel = 16;
hostx_get_visual_masks (&screen->fb[0].redMask,
&screen->fb[0].greenMask,
&screen->fb[0].blueMask);
}
else if (screen->fb[0].depth <= 16)
{
screen->fb[0].depth = 16;
screen->fb[0].bitsPerPixel = 16;
hostx_get_visual_masks (&screen->fb[0].redMask,
&screen->fb[0].greenMask,
&screen->fb[0].blueMask);
}
else
{
screen->fb[0].depth = 24;
screen->fb[0].bitsPerPixel = 32;
hostx_get_visual_masks (&screen->fb[0].redMask,
&screen->fb[0].greenMask,
&screen->fb[0].blueMask);
}
hostx_get_visual_masks (&redMask, &greenMask, &blueMask);
screen->fb[0].redMask = (Pixel) redMask;
screen->fb[0].greenMask = (Pixel) greenMask;
screen->fb[0].blueMask = (Pixel) blueMask;
}
scrpriv->randr = screen->randr;
@ -675,6 +670,8 @@ ephyrRestore (KdCardInfo *card)
void
ephyrScreenFini (KdScreenInfo *screen)
{
xfree(screen->driver);
screen->driver = NULL;
}
/*

View file

@ -118,7 +118,7 @@ extern int ffs(unsigned long);
# if defined(NO_INLINE) || defined(DO_PROTOTYPES)
# if !defined(__arm__)
# if !defined(__sparc__) && !defined(__arm32__) \
# if !defined(__sparc__) && !defined(__sparc) && !defined(__arm32__) \
&& !(defined(__alpha__) && defined(linux)) \
&& !(defined(__ia64__) && defined(linux)) \
@ -1697,7 +1697,7 @@ static __inline__ void ppc_flush_icache(char *addr)
: : "r"(addr) : "memory");
}
# elif defined(__sparc__) || defined(sparc)
# elif defined(__sparc__) || defined(sparc) || defined(__sparc)
/*
* Like powerpc, we provide byteswapping and no byteswapping functions
* here with byteswapping as default, drivers that don't need byteswapping

View file

@ -64,7 +64,7 @@ extern ScrnInfoPtr xf86CurrentScreen;
extern Bool pciSlotClaimed;
extern Bool isaSlotClaimed;
extern Bool fbSlotClaimed;
#ifdef __sparc__
#if defined(__sparc__) || defined(__sparc)
extern Bool sbusSlotClaimed;
#endif
extern confDRIRec xf86ConfigDRI;

View file

@ -113,7 +113,7 @@ void
xf86BusProbe(void)
{
xf86PciProbe();
#if defined(__sparc__) && !defined(__OpenBSD__)
#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
xf86SbusProbe();
#endif
}
@ -2373,7 +2373,7 @@ xf86PostProbe(void)
if (fbSlotClaimed) {
if (pciSlotClaimed || isaSlotClaimed
#if defined(__sparc__) && !defined(__OpenBSD__)
#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
|| sbusSlotClaimed
#endif
) {
@ -3006,7 +3006,7 @@ xf86FindPrimaryDevice()
}
#if !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__)
#if !defined(__sparc) && !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__)
#include "vgaHW.h"
#include "compiler.h"
#endif
@ -3018,7 +3018,7 @@ static void
CheckGenericGA()
{
/* This needs to be changed for multiple domains */
#if !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__) && !defined(__ia64__) && !defined(__arm__) && !defined(__s390__)
#if !defined(__sparc__) && !defined(__sparc) && !defined(__powerpc__) && !defined(__mips__) && !defined(__ia64__) && !defined(__arm__) && !defined(__s390__)
IOADDRESS GenericIOBase = VGAHW_GET_IOBASE();
CARD8 CurrentValue, TestValue;

View file

@ -40,7 +40,7 @@
#define _XF86_BUS_H
#include "xf86pciBus.h"
#ifdef __sparc__
#if defined(__sparc__) || defined(__sparc)
#include "xf86sbusBus.h"
#endif

View file

@ -48,7 +48,7 @@
#include "Configint.h"
#include "vbe.h"
#include "xf86DDC.h"
#if defined(__sparc__) && !defined(__OpenBSD__)
#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
#include "xf86Bus.h"
#include "xf86Sbus.h"
#endif
@ -57,7 +57,7 @@
typedef struct _DevToConfig {
GDevRec GDev;
pciVideoPtr pVideo;
#if defined(__sparc__) && !defined(__OpenBSD__)
#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
sbusDevicePtr sVideo;
#endif
int iDriver;
@ -134,7 +134,7 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int
if (!DevToConfig[i].pVideo)
return NULL;
break;
#if defined(__sparc__) && !defined(__OpenBSD__)
#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
case BUS_SBUS:
for (i = 0; i < nDevToConfig; i++)
if (DevToConfig[i].sVideo &&
@ -213,7 +213,7 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int
NewDevice.GDev.identifier = "ISA Adapter";
NewDevice.GDev.busID = "ISA";
break;
#if defined(__sparc__) && !defined(__OpenBSD__)
#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
case BUS_SBUS: {
char *promPath = NULL;
NewDevice.sVideo = (sbusDevicePtr) busData;

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

@ -510,7 +510,7 @@ _X_HIDDEN void *xfree86LookupTab[] = {
SYMFUNC(xf86AddModuleInfo)
SYMFUNC(xf86DeleteModuleInfo)
#if defined(__sparc__) && !defined(__OpenBSD__)
#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
/* xf86sbusBus.c */
SYMFUNC(xf86MatchSbusInstances)
SYMFUNC(xf86GetSbusInfoForEntity)

View file

@ -181,7 +181,7 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86memchr)
SYMFUNC(xf86memcmp)
SYMFUNC(xf86memcpy)
#if (defined(__powerpc__) && (defined(Lynx) || defined(linux))) || defined(__sparc__) || defined(__ia64__) || defined (__amd64__)
#if (defined(__powerpc__) && (defined(Lynx) || defined(linux))) || defined(__sparc__) || defined(__sparc) || defined(__ia64__) || defined (__amd64__)
/*
* 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

@ -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

@ -63,6 +63,40 @@ static void x86emuOp2_illegal_op(
#define xorl(a,b) ((a) && !(b)) || (!(a) && (b))
/****************************************************************************
REMARKS:
Handles opcode 0x0f,0x31
****************************************************************************/
static void x86emuOp2_rdtsc(u8 X86EMU_UNUSED(op2))
{
#ifdef __HAS_LONG_LONG__
static u64 counter = 0;
#else
static u32 counter = 0;
#endif
counter += 0x10000;
/* read timestamp counter */
/*
* Note that instead of actually trying to accurately measure this, we just
* increase the counter by a fixed amount every time we hit one of these
* instructions. Feel free to come up with a better method.
*/
START_OF_INSTR();
DECODE_PRINTF("RDTSC\n");
TRACE_AND_STEP();
#ifdef __HAS_LONG_LONG__
M.x86.R_EAX = counter & 0xffffffff;
M.x86.R_EDX = counter >> 32;
#else
M.x86.R_EAX = counter;
M.x86.R_EDX = 0;
#endif
DECODE_CLEAR_SEGOVR();
END_OF_INSTR();
}
/****************************************************************************
REMARKS:
Handles opcode 0x0f,0x80-0x8F
@ -2580,7 +2614,7 @@ void (*x86emu_optab2[256])(u8) =
/* 0x2f */ x86emuOp2_illegal_op,
/* 0x30 */ x86emuOp2_illegal_op,
/* 0x31 */ x86emuOp2_illegal_op,
/* 0x31 */ x86emuOp2_rdtsc,
/* 0x32 */ x86emuOp2_illegal_op,
/* 0x33 */ x86emuOp2_illegal_op,
/* 0x34 */ x86emuOp2_illegal_op,

View file

@ -1042,6 +1042,8 @@ CloseDownConnection(ClientPtr client)
XdmcpCloseDisplay(oc->fd);
#endif
CloseDownFileDescriptor(oc);
FreeOsBuffers(oc);
xfree(client->osPrivate);
client->osPrivate = (pointer)NULL;
if (auditTrailLevel > 1)
AuditF("client %d disconnected\n", client->index);