Merge commit 'origin/master' into transform-proposal

Conflicts:

	Xi/exevents.c
	configure.ac
	hw/xfree86/modes/xf86Rotate.c

All of these merges were of differently formated but equivalent code.
This commit is contained in:
Keith Packard 2008-07-08 13:57:30 -07:00
commit f209924c36
112 changed files with 697 additions and 14476 deletions

View file

@ -5,10 +5,6 @@ if COMPOSITE
COMPOSITE_DIR=composite
endif
if XTRAP
XTRAP_DIR=XTrap
endif
if GLX
GLX_DIR=glx
endif
@ -38,7 +34,6 @@ SUBDIRS = \
$(RECORD_DIR) \
xfixes \
damageext \
$(XTRAP_DIR) \
$(COMPOSITE_DIR) \
$(GLX_DIR) \
exa \
@ -80,7 +75,6 @@ DIST_SUBDIRS = \
record \
xfixes \
damageext \
XTrap \
composite \
glx \
exa \

View file

@ -1,5 +0,0 @@
noinst_LTLIBRARIES = libxtrap.la
AM_CFLAGS = $(DIX_CFLAGS)
libxtrap_la_SOURCES = xtrapddmi.c xtrapdi.c xtrapdiswp.c xtrapditbl.c

View file

@ -1,161 +0,0 @@
/*****************************************************************************
Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
*****************************************************************************/
/*
* ABSTRACT:
*
* This module is the platform-specific but conditionally independent
* code for the XTrap extension (usually I/O or platform setup).
* This is shared code and is subject to change only by team approval.
*
* CONTRIBUTORS:
*
* Dick Annicchiarico
* Robert Chesler
* Gene Durso
* Marc Evans
* Alan Jamison
* Mark Henry
* Ken Miller
*
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include <errno.h>
#include <X11/Xos.h>
#ifdef PC
# include "fcntl.h"
# include "io.h"
# define O_NDELAY 0L
#endif
#define NEED_REPLIES
#define NEED_EVENTS
#include <X11/X.h> /* From library include environment */
#include "inputstr.h" /* From server include env. (must be before Xlib.h!) */
#ifdef PC
# include "scrintst.h" /* Screen struct */
# include "extnsist.h"
#else
# include "extnsionst.h" /* Server ExtensionEntry definitions */
# include "scrnintstr.h" /* Screen struct */
#endif
#include "inputstr.h"
#include <X11/extensions/xtrapdi.h>
#include <X11/extensions/xtrapddmi.h>
#include <X11/extensions/xtrapproto.h>
extern int XETrapErrorBase;
extern xXTrapGetAvailReply XETrap_avail;
extern DevicePtr XETrapKbdDev;
extern DevicePtr XETrapPtrDev;
/*
* DESCRIPTION:
*
* This function performs the platform specific setup for server
* extension implementations.
*/
void XETrapPlatformSetup()
{
}
#if !defined _XINPUT
/*
* DESCRIPTION:
*
* This routine processes the simulation of some input event.
*
*/
int XETrapSimulateXEvent(register xXTrapInputReq *request,
register ClientPtr client)
{
ScreenPtr pScr = NULL;
int status = Success;
xEvent xev;
register int x = request->input.x;
register int y = request->input.y;
DevicePtr keydev = (DevicePtr)PickKeyboard(client);
DevicePtr ptrdev = (DevicePtr)PickPointer(client);
if (request->input.screen < screenInfo.numScreens)
{
pScr = screenInfo.screens[request->input.screen];
}
else
{ /* Trying to play bogus events to this WS! */
#ifdef VERBOSE
ErrorF("%s: Trying to send events to screen %d!\n", XTrapExtName,
request->input.screen);
#endif
status = XETrapErrorBase + BadScreen;
}
/* Fill in the event structure with the information
* Note: root, event, child, eventX, eventY, state, and sameScreen
* are all updated by FixUpEventFromWindow() when the events
* are delivered via DeliverDeviceEvents() or whatever. XTrap
* needs to only concern itself with type, detail, time, rootX,
* and rootY.
*/
if (status == Success)
{
xev.u.u.type = request->input.type;
xev.u.u.detail = request->input.detail;
xev.u.keyButtonPointer.time = GetTimeInMillis();
xev.u.keyButtonPointer.rootX = x;
xev.u.keyButtonPointer.rootY = y;
if (request->input.type == MotionNotify)
{ /* Set new cursor position on screen */
XETrap_avail.data.cur_x = x;
XETrap_avail.data.cur_y = y;
NewCurrentScreen (inputInfo.pointer, pScr, x, y); /* fix from amnonc@mercury.co.il */
if (!(*pScr->SetCursorPosition)(inputInfo.pointer, pScr, x, y, xFalse))
{
status = BadImplementation;
}
}
}
if (status == Success)
{
switch(request->input.type)
{ /* Now process the event appropriately */
case KeyPress:
case KeyRelease:
(*XETrapKbdDev->realInputProc)(&xev,(DeviceIntPtr)keydev, 1L);
break;
case MotionNotify:
case ButtonPress:
case ButtonRelease:
(*XETrapPtrDev->realInputProc)(&xev,(DeviceIntPtr)ptrdev, 1L);
break;
default:
status = BadValue;
break;
}
}
return(status);
}
#endif /* _XINPUT */

File diff suppressed because it is too large Load diff

View file

@ -1,937 +0,0 @@
/****************************************************************************
Copyright 1987, 1988, 1989, 1990, 1991, 1992 by
Digital Equipment Corp., Maynard, MA
X11R6 Changes Copyright (c) 1994 by Robert Chesler of Absol-Puter, Hudson, NH.
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL AND ABSOL-PUTER DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL DIGITAL OR ABSOL-PUTER BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*****************************************************************************/
/*
* ABSTRACT:
*
* This module is the device independent module responsible for all
* routines required for proper communication in a heterogeneous
* networking environment (i.e. client & server on different endian
* machines). The bulk of this module is patterned after X11/R4's
* server/dix/swapreq.c ; however, they infact swap fields
* in the exact opposite order since XTrap requires "unswapped" data
* to become "swapped" before sending it to a "swapped" client.
*
* CONTRIBUTORS:
*
* Ken Miller
* Marc Evans
*
* CHANGES:
*
* Robert Chesler - added client arg for X11R6 port in many spots
*
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include <X11/X.h>
#define NEED_REPLIES
#define NEED_EVENTS
#include <X11/Xproto.h>
#include <X11/Xprotostr.h>
#include <X11/extensions/xtrapdi.h>
#include "input.h" /* Server DevicePtr definitions */
#include "misc.h"
#include "dixstruct.h"
#ifdef PC
# include "extnsist.h"
#else
# include "extnsionst.h" /* Server ExtensionEntry definitions */
#endif
# include "swapreq.h" /* Server SwapColorItem definition */
#include <X11/extensions/xtrapddmi.h>
#include <X11/extensions/xtrapproto.h>
/* In-coming XTrap requests needing to be swapped to native format */
int sXETrapReset(xXTrapReq *request, ClientPtr client)
{
register char n;
swaps(&(request->length),n);
return(XETrapReset(request,client));
}
int sXETrapGetAvailable(xXTrapGetReq *request, ClientPtr client)
{
register char n;
swaps(&(request->length),n);
swaps(&(request->protocol),n);
return(XETrapGetAvailable(request,client));
}
int sXETrapConfig(xXTrapConfigReq *request, ClientPtr client)
{
register char n;
swaps(&(request->length),n);
swaps(&(request->config_max_pkt_size),n);
return(XETrapConfig(request,client));
}
int sXETrapStartTrap(xXTrapReq *request, ClientPtr client)
{
register char n;
swaps(&(request->length),n);
return(XETrapStartTrap(request,client));
}
int sXETrapStopTrap(xXTrapReq *request, ClientPtr client)
{
register char n;
swaps(&(request->length),n);
return(XETrapStopTrap(request,client));
}
int sXETrapGetCurrent(xXTrapReq *request, ClientPtr client)
{
register char n;
swaps(&(request->length),n);
return(XETrapGetCurrent(request,client));
}
int sXETrapGetStatistics(xXTrapReq *request, ClientPtr client)
{
register char n;
swaps(&(request->length),n);
return(XETrapGetStatistics(request,client));
}
#ifndef _XINPUT
int sXETrapSimulateXEvent(xXTrapInputReq *request, ClientPtr client)
{
register char n;
swaps(&(request->input.x),n);
swaps(&(request->input.y),n);
return(XETrapSimulateXEvent(request,client));
}
#endif
int sXETrapGetVersion(xXTrapGetReq *request, ClientPtr client)
{
register char n;
swaps(&(request->length),n);
swaps(&(request->protocol),n);
return(XETrapGetVersion(request,client));
}
int sXETrapGetLastInpTime(xXTrapReq *request, ClientPtr client)
{
register char n;
swaps(&(request->length),n);
return(XETrapGetLastInpTime(request,client));
}
/* Out-going XTrap replies needing to be swapped *from* native format */
void sReplyXETrapGetAvail(ClientPtr client, int size, char *reply)
{
xXTrapGetAvailReply *rep = (xXTrapGetAvailReply *)reply;
register char n;
swaps(&(rep->hdr.sequenceNumber),n);
swapl(&(rep->hdr.length),n);
swapl(&(rep->data.pf_ident),n);
swaps(&(rep->data.xtrap_release),n);
swaps(&(rep->data.xtrap_version),n);
swaps(&(rep->data.xtrap_revision),n);
swaps(&(rep->data.max_pkt_size),n);
swapl(&(rep->data.major_opcode),n);
swapl(&(rep->data.event_base),n);
swaps(&(rep->data.cur_x),n);
swaps(&(rep->data.cur_y),n);
(void)WriteToClient(client,size,reply);
return;
}
void sReplyXETrapGetVers(ClientPtr client, int size, char *reply)
{
xXTrapGetVersReply *rep = (xXTrapGetVersReply *)reply;
register char n;
swaps(&(rep->hdr.sequenceNumber),n);
swapl(&(rep->hdr.length),n);
swaps(&(rep->data.xtrap_release),n);
swaps(&(rep->data.xtrap_version),n);
swaps(&(rep->data.xtrap_revision),n);
(void)WriteToClient(client,size,reply);
return;
}
void sReplyXETrapGetLITim(ClientPtr client, int size, char *reply)
{
xXTrapGetLITimReply *rep = (xXTrapGetLITimReply *)reply;
register char n;
swaps(&(rep->hdr.sequenceNumber),n);
swapl(&(rep->hdr.length),n);
swapl(&(rep->data_last_time),n);
(void)WriteToClient(client,size,reply);
return;
}
void sReplyXETrapGetCur(ClientPtr client, int size, char *reply)
{
xXTrapGetCurReply *rep = (xXTrapGetCurReply *)reply;
register char n;
swaps(&(rep->hdr.sequenceNumber),n);
swapl(&(rep->hdr.length),n);
swaps(&(rep->data_config_max_pkt_size),n);
(void)WriteToClient(client,size,reply);
return;
}
void sReplyXETrapGetStats(ClientPtr client, int size, char *reply)
{
xXTrapGetStatsReply *rep = (xXTrapGetStatsReply *)reply;
register char n;
register int i;
long *p;
swaps(&(rep->sequenceNumber),n);
swapl(&(rep->length),n);
for (i=0L, p = (long *)rep->data.requests; i<256L; i++, p++)
{
swapl(p,n);
}
for (i=0L, p = (long *)rep->data.events; i<XETrapCoreEvents; i++, p++)
{
swapl(p,n);
}
(void)WriteToClient(client,size,reply);
return;
}
/* Out-going XTrap I/O header needing to be swapped *from* native format */
void sXETrapHeader(XETrapHeader *hdr)
{
register char n;
swapl(&(hdr->count), n);
swapl(&(hdr->timestamp), n);
swaps(&(hdr->win_x), n);
swaps(&(hdr->win_y), n);
swaps(&(hdr->client), n);
}
/* Out-going requests needing to be swapped *from* native format
* aka swapreq.c "equivalents"
*/
/* The following is used for all requests that have
no fields to be swapped (except "length") */
void XETSwSimpleReq(register xReq *data)
{
register char n;
swaps(&(data->length), n);
}
/* The following is used for all requests that have
only a single 32-bit field to be swapped, coming
right after the "length" field */
void XETSwResourceReq(register xResourceReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->id), n);
}
void XETSwCreateWindow(register xCreateWindowReq *data,ClientPtr client)
{
register char n;
swapl(&(data->wid), n);
swapl(&(data->parent), n);
swaps(&(data->x), n);
swaps(&(data->y), n);
swaps(&(data->width), n);
swaps(&(data->height), n);
swaps(&(data->borderWidth), n);
swaps(&(data->class), n);
swapl(&(data->visual), n);
swapl(&(data->mask), n);
SwapRestL(data);
swaps(&(data->length), n);
}
void XETSwChangeWindowAttributes(register xChangeWindowAttributesReq *data,
ClientPtr client)
{
register char n;
swapl(&(data->window), n);
swapl(&(data->valueMask), n);
SwapRestL(data);
swaps(&(data->length), n);
}
void XETSwReparentWindow(register xReparentWindowReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->window), n);
swapl(&(data->parent), n);
swaps(&(data->x), n);
swaps(&(data->y), n);
}
void XETSwConfigureWindow(xConfigureWindowReq *data, ClientPtr client)
{
register char n;
swapl(&(data->window), n);
swaps(&(data->mask), n);
SwapRestL(data);
swaps(&(data->length), n);
}
void XETSwInternAtom(register xInternAtomReq *data)
{
register char n;
swaps(&(data->length), n);
swaps(&(data->nbytes), n);
}
void XETSwChangeProperty(register xChangePropertyReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->window), n);
swapl(&(data->property), n);
swapl(&(data->type), n);
switch ( data->format ) {
case 8L : break;
case 16L:
SwapShorts((short *)(data + 1), data->nUnits);
break;
case 32L:
SwapLongs((CARD32 *)(data + 1), data->nUnits);
break;
}
swapl(&(data->nUnits), n);
}
void XETSwDeleteProperty(register xDeletePropertyReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->window), n);
swapl(&(data->property), n);
}
void XETSwGetProperty(register xGetPropertyReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->window), n);
swapl(&(data->property), n);
swapl(&(data->type), n);
swapl(&(data->longOffset), n);
swapl(&(data->longLength), n);
}
void XETSwSetSelectionOwner(register xSetSelectionOwnerReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->window), n);
swapl(&(data->selection), n);
swapl(&(data->time), n);
}
void XETSwConvertSelection(register xConvertSelectionReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->requestor), n);
swapl(&(data->selection), n);
swapl(&(data->target), n);
swapl(&(data->property), n);
swapl(&(data->time), n);
}
void XETSwSendEvent(register xSendEventReq *data)
{
register char n;
xEvent eventT;
EventSwapPtr proc;
swapl(&(data->destination), n);
swapl(&(data->eventMask), n);
/* Swap event */
proc = EventSwapVector[data->event.u.u.type & 0177];
if (!proc || proc == NotImplemented)
(*proc)(&(data->event), &eventT);
data->event = eventT;
swaps(&(data->length), n);
}
void XETSwGrabPointer(register xGrabPointerReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->grabWindow), n);
swaps(&(data->eventMask), n);
swapl(&(data->confineTo), n);
swapl(&(data->cursor), n);
swapl(&(data->time), n);
}
void XETSwGrabButton(register xGrabButtonReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->grabWindow), n);
swaps(&(data->eventMask), n);
swapl(&(data->confineTo), n);
swapl(&(data->cursor), n);
swaps(&(data->modifiers), n);
}
void XETSwUngrabButton(register xUngrabButtonReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->grabWindow), n);
swaps(&(data->modifiers), n);
}
void XETSwChangeActivePointerGrab(register xChangeActivePointerGrabReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->cursor), n);
swapl(&(data->time), n);
swaps(&(data->eventMask), n);
}
void XETSwGrabKeyboard(register xGrabKeyboardReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->grabWindow), n);
swapl(&(data->time), n);
}
void XETSwGrabKey(register xGrabKeyReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->grabWindow), n);
swaps(&(data->modifiers), n);
}
void XETSwUngrabKey(register xUngrabKeyReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->grabWindow), n);
swaps(&(data->modifiers), n);
}
void XETSwGetMotionEvents(register xGetMotionEventsReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->window), n);
swapl(&(data->start), n);
swapl(&(data->stop), n);
}
void XETSwTranslateCoords(register xTranslateCoordsReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->srcWid), n);
swapl(&(data->dstWid), n);
swaps(&(data->srcX), n);
swaps(&(data->srcY), n);
}
void XETSwWarpPointer(register xWarpPointerReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->srcWid), n);
swapl(&(data->dstWid), n);
swaps(&(data->srcX), n);
swaps(&(data->srcY), n);
swaps(&(data->srcWidth), n);
swaps(&(data->srcHeight), n);
swaps(&(data->dstX), n);
swaps(&(data->dstY), n);
}
void XETSwSetInputFocus(register xSetInputFocusReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->focus), n);
swapl(&(data->time), n);
}
void XETSwOpenFont(register xOpenFontReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->fid), n);
swaps(&(data->nbytes), n);
}
void XETSwListFonts(register xListFontsReq *data)
{
register char n;
swaps(&(data->length), n);
swaps(&(data->maxNames), n);
swaps(&(data->nbytes), n);
}
void XETSwListFontsWithInfo(register xListFontsWithInfoReq *data)
{
register char n;
swaps(&(data->length), n);
swaps(&(data->maxNames), n);
swaps(&(data->nbytes), n);
}
void XETSwSetFontPath(register xSetFontPathReq *data)
{
register char n;
swaps(&(data->length), n);
swaps(&(data->nFonts), n);
}
void XETSwCreatePixmap(register xCreatePixmapReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->pid), n);
swapl(&(data->drawable), n);
swaps(&(data->width), n);
swaps(&(data->height), n);
}
void XETSwCreateGC(register xCreateGCReq *data, ClientPtr client)
{
register char n;
swapl(&(data->gc), n);
swapl(&(data->drawable), n);
swapl(&(data->mask), n);
SwapRestL(data);
swaps(&(data->length), n);
}
void XETSwChangeGC(register xChangeGCReq *data, ClientPtr client)
{
register char n;
swapl(&(data->gc), n);
swapl(&(data->mask), n);
SwapRestL(data);
swaps(&(data->length), n);
}
void XETSwCopyGC(register xCopyGCReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->srcGC), n);
swapl(&(data->dstGC), n);
swapl(&(data->mask), n);
}
void XETSwSetDashes(register xSetDashesReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->gc), n);
swaps(&(data->dashOffset), n);
swaps(&(data->nDashes), n);
}
void XETSwSetClipRectangles(register xSetClipRectanglesReq *data, ClientPtr
client)
{
register char n;
swapl(&(data->gc), n);
swaps(&(data->xOrigin), n);
swaps(&(data->yOrigin), n);
SwapRestS(data);
swaps(&(data->length), n);
}
void XETSwClearToBackground(register xClearAreaReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->window), n);
swaps(&(data->x), n);
swaps(&(data->y), n);
swaps(&(data->width), n);
swaps(&(data->height), n);
}
void XETSwCopyArea(register xCopyAreaReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->srcDrawable), n);
swapl(&(data->dstDrawable), n);
swapl(&(data->gc), n);
swaps(&(data->srcX), n);
swaps(&(data->srcY), n);
swaps(&(data->dstX), n);
swaps(&(data->dstY), n);
swaps(&(data->width), n);
swaps(&(data->height), n);
}
void XETSwCopyPlane(register xCopyPlaneReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->srcDrawable), n);
swapl(&(data->dstDrawable), n);
swapl(&(data->gc), n);
swaps(&(data->srcX), n);
swaps(&(data->srcY), n);
swaps(&(data->dstX), n);
swaps(&(data->dstY), n);
swaps(&(data->width), n);
swaps(&(data->height), n);
swapl(&(data->bitPlane), n);
}
/* The following routine is used for all Poly drawing requests
(except FillPoly, which uses a different request format) */
void XETSwPoly(register xPolyPointReq *data, ClientPtr client)
{
register char n;
swapl(&(data->drawable), n);
swapl(&(data->gc), n);
SwapRestS(data);
swaps(&(data->length), n);
}
/* cannot use XETSwPoly for this one, because xFillPolyReq
* is longer than xPolyPointReq, and we don't want to swap
* the difference as shorts!
*/
void XETSwFillPoly(register xFillPolyReq *data, ClientPtr client)
{
register char n;
swapl(&(data->drawable), n);
swapl(&(data->gc), n);
SwapRestS(data);
swaps(&(data->length), n);
}
void XETSwPutImage(register xPutImageReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->drawable), n);
swapl(&(data->gc), n);
swaps(&(data->width), n);
swaps(&(data->height), n);
swaps(&(data->dstX), n);
swaps(&(data->dstY), n);
/* Image should already be swapped */
}
void XETSwGetImage(register xGetImageReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->drawable), n);
swaps(&(data->x), n);
swaps(&(data->y), n);
swaps(&(data->width), n);
swaps(&(data->height), n);
swapl(&(data->planeMask), n);
}
/* ProcPolyText used for both PolyText8 and PolyText16 */
void XETSwPolyText(register xPolyTextReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->drawable), n);
swapl(&(data->gc), n);
swaps(&(data->x), n);
swaps(&(data->y), n);
}
/* ProcImageText used for both ImageText8 and ImageText16 */
void XETSwImageText(register xImageTextReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->drawable), n);
swapl(&(data->gc), n);
swaps(&(data->x), n);
swaps(&(data->y), n);
}
void XETSwCreateColormap(register xCreateColormapReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->mid), n);
swapl(&(data->window), n);
swapl(&(data->visual), n);
}
void XETSwCopyColormapAndFree(register xCopyColormapAndFreeReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->mid), n);
swapl(&(data->srcCmap), n);
}
void XETSwAllocColor (register xAllocColorReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->cmap), n);
swaps(&(data->red), n);
swaps(&(data->green), n);
swaps(&(data->blue), n);
}
void XETSwAllocNamedColor (register xAllocNamedColorReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->cmap), n);
swaps(&(data->nbytes), n);
}
void XETSwAllocColorCells (register xAllocColorCellsReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->cmap), n);
swaps(&(data->colors), n);
swaps(&(data->planes), n);
}
void XETSwAllocColorPlanes(register xAllocColorPlanesReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->cmap), n);
swaps(&(data->colors), n);
swaps(&(data->red), n);
swaps(&(data->green), n);
swaps(&(data->blue), n);
}
void XETSwFreeColors (register xFreeColorsReq *data, ClientPtr
client)
{
register char n;
swapl(&(data->cmap), n);
swapl(&(data->planeMask), n);
SwapRestL(data);
swaps(&(data->length), n);
}
void XETSwStoreColors (register xStoreColorsReq *data,ClientPtr
client)
{
register char n;
unsigned long count;
xColorItem *pItem;
swapl(&(data->cmap), n);
pItem = (xColorItem *) &(data[1]);
for(count = LengthRestB(data)/sizeof(xColorItem); count != 0; count--)
SwapColorItem(pItem++);
swaps(&(data->length), n);
}
void XETSwStoreNamedColor (register xStoreNamedColorReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->cmap), n);
swapl(&(data->pixel), n);
swaps(&(data->nbytes), n);
}
void XETSwQueryColors(register xQueryColorsReq *data, ClientPtr client)
{
register char n;
swapl(&(data->cmap), n);
SwapRestL(data);
swaps(&(data->length), n);
}
void XETSwLookupColor(register xLookupColorReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->cmap), n);
swaps(&(data->nbytes), n);
}
void XETSwCreateCursor(register xCreateCursorReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->cid), n);
swapl(&(data->source), n);
swapl(&(data->mask), n);
swaps(&(data->foreRed), n);
swaps(&(data->foreGreen), n);
swaps(&(data->foreBlue), n);
swaps(&(data->backRed), n);
swaps(&(data->backGreen), n);
swaps(&(data->backBlue), n);
swaps(&(data->x), n);
swaps(&(data->y), n);
}
void XETSwCreateGlyphCursor(register xCreateGlyphCursorReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->cid), n);
swapl(&(data->source), n);
swapl(&(data->mask), n);
swaps(&(data->sourceChar), n);
swaps(&(data->maskChar), n);
swaps(&(data->foreRed), n);
swaps(&(data->foreGreen), n);
swaps(&(data->foreBlue), n);
swaps(&(data->backRed), n);
swaps(&(data->backGreen), n);
swaps(&(data->backBlue), n);
}
void XETSwRecolorCursor(register xRecolorCursorReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->cursor), n);
swaps(&(data->foreRed), n);
swaps(&(data->foreGreen), n);
swaps(&(data->foreBlue), n);
swaps(&(data->backRed), n);
swaps(&(data->backGreen), n);
swaps(&(data->backBlue), n);
}
void XETSwQueryBestSize (register xQueryBestSizeReq *data)
{
register char n;
swaps(&(data->length), n);
swapl(&(data->drawable), n);
swaps(&(data->width), n);
swaps(&(data->height), n);
}
void XETSwQueryExtension (register xQueryExtensionReq *data)
{
register char n;
swaps(&(data->length), n);
swaps(&(data->nbytes), n);
}
void XETSwChangeKeyboardMapping (register xChangeKeyboardMappingReq *data)
{
register char n;
register long *p;
register int i, count;
swaps(&(data->length), n);
p = (long *)&(data[1]);
count = data->keyCodes * data->keySymsPerKeyCode;
for(i = 0; i < count; i++)
{
swapl(p, n);
p++;
}
}
void XETSwChangeKeyboardControl (register xChangeKeyboardControlReq *data,
ClientPtr client)
{
register char n;
swapl(&(data->mask), n);
SwapRestL(data);
swaps(&(data->length), n);
}
void XETSwChangePointerControl (register xChangePointerControlReq *data)
{
register char n;
swaps(&(data->length), n);
swaps(&(data->accelNum), n);
swaps(&(data->accelDenum), n);
swaps(&(data->threshold), n);
}
void XETSwSetScreenSaver (register xSetScreenSaverReq *data)
{
register char n;
swaps(&(data->length), n);
swaps(&(data->timeout), n);
swaps(&(data->interval), n);
}
void XETSwChangeHosts(register xChangeHostsReq *data)
{
register char n;
swaps(&(data->length), n);
swaps(&(data->hostLength), n);
}
void XETSwRotateProperties(register xRotatePropertiesReq *data, ClientPtr client)
{
register char n;
swapl(&(data->window), n);
swaps(&(data->nAtoms), n);
swaps(&(data->nPositions), n);
SwapRestL(data);
swaps(&(data->length), n);
}
/*ARGSUSED*/
void XETSwNoOperation(xReq *data)
{
/* noop -- don't do anything */
}

View file

@ -1,243 +0,0 @@
/****************************************************************************
Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
*****************************************************************************/
/*
* ABSTRACT:
*
* This module is contains Vector tables used for swapping and general
* dispatch by the XTrap server extension.
*
* CONTRIBUTORS:
*
* Ken Miller
* Marc Evans
*
*/
/*-----------------*
* Include Files *
*-----------------*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include <stdlib.h>
#include <X11/X.h>
#define NEED_REPLIES
#define NEED_EVENTS
#include <X11/Xproto.h>
#include <X11/Xprotostr.h>
#include <X11/extensions/xtrapdi.h>
#include "input.h" /* Server DevicePtr definitions */
#include "misc.h"
#include "dixstruct.h"
#ifdef PC
# include "extnsist.h"
#else
# include "extnsionst.h" /* Server ExtensionEntry definitions */
#endif
#include <X11/extensions/xtrapddmi.h>
#include <X11/extensions/xtrapproto.h>
globaldef void_function XETSwProcVector[256L] =
{
(void_function)ProcBadRequest,
XETSwCreateWindow,
XETSwChangeWindowAttributes,
XETSwResourceReq, /* GetWindowAttributes */
XETSwResourceReq, /* DestroyWindow */
XETSwResourceReq, /* 5 DestroySubwindows */
XETSwResourceReq, /* XETSwChangeSaveSet, */
XETSwReparentWindow,
XETSwResourceReq, /* MapWindow */
XETSwResourceReq, /* MapSubwindows */
XETSwResourceReq, /* 10 UnmapWindow */
XETSwResourceReq, /* UnmapSubwindows */
XETSwConfigureWindow,
XETSwResourceReq, /* XETSwCirculateWindow, */
XETSwResourceReq, /* GetGeometry */
XETSwResourceReq, /* 15 QueryTree */
XETSwInternAtom,
XETSwResourceReq, /* XETSwGetAtomName, */
XETSwChangeProperty,
XETSwDeleteProperty,
XETSwGetProperty, /* 20 */
XETSwResourceReq, /* XETSwListProperties, */
XETSwSetSelectionOwner,
XETSwResourceReq, /* XETSwGetSelectionOwner, */
XETSwConvertSelection,
XETSwSendEvent, /* 25 */
XETSwGrabPointer,
XETSwResourceReq, /* XETSwUngrabPointer, */
XETSwGrabButton,
XETSwUngrabButton,
XETSwChangeActivePointerGrab, /* 30 */
XETSwGrabKeyboard,
XETSwResourceReq, /* XETSwUngrabKeyboard, */
XETSwGrabKey,
XETSwUngrabKey,
XETSwResourceReq, /* 35 XETSwAllowEvents, */
XETSwSimpleReq, /* XETSwGrabServer, */
XETSwSimpleReq, /* XETSwUngrabServer, */
XETSwResourceReq, /* XETSwQueryPointer, */
XETSwGetMotionEvents,
XETSwTranslateCoords, /*40 */
XETSwWarpPointer,
XETSwSetInputFocus,
XETSwSimpleReq, /* XETSwGetInputFocus, */
XETSwSimpleReq, /* QueryKeymap, */
XETSwOpenFont, /* 45 */
XETSwResourceReq, /* XETSwCloseFont, */
XETSwResourceReq, /* XETSwQueryFont, */
XETSwResourceReq, /* XETSwQueryTextExtents, */
XETSwListFonts,
XETSwListFontsWithInfo, /* 50 */
XETSwSetFontPath,
XETSwSimpleReq, /* GetFontPath, */
XETSwCreatePixmap,
XETSwResourceReq, /* XETSwFreePixmap, */
XETSwCreateGC, /* 55 */
XETSwChangeGC,
XETSwCopyGC,
XETSwSetDashes,
XETSwSetClipRectangles,
XETSwResourceReq, /* 60 XETSwFreeGC, */
XETSwClearToBackground,
XETSwCopyArea,
XETSwCopyPlane,
XETSwPoly, /* PolyPoint, */
XETSwPoly, /* 65 PolyLine */
XETSwPoly, /* PolySegment, */
XETSwPoly, /* PolyRectangle, */
XETSwPoly, /* PolyArc, */
XETSwFillPoly,
XETSwPoly, /* 70 PolyFillRectangle */
XETSwPoly, /* PolyFillArc, */
XETSwPutImage,
XETSwGetImage,
XETSwPolyText,
XETSwPolyText, /* 75 */
XETSwImageText,
XETSwImageText,
XETSwCreateColormap,
XETSwResourceReq, /* XETSwFreeColormap, */
XETSwCopyColormapAndFree, /* 80 */
XETSwResourceReq, /* XETSwInstallColormap, */
XETSwResourceReq, /* XETSwUninstallColormap, */
XETSwResourceReq, /* XETSwListInstalledColormaps, */
XETSwAllocColor,
XETSwAllocNamedColor, /* 85 */
XETSwAllocColorCells,
XETSwAllocColorPlanes,
XETSwFreeColors,
XETSwStoreColors,
XETSwStoreNamedColor, /* 90 */
XETSwQueryColors,
XETSwLookupColor,
XETSwCreateCursor,
XETSwCreateGlyphCursor,
XETSwResourceReq, /* 95 XETSwFreeCursor, */
XETSwRecolorCursor,
XETSwQueryBestSize,
XETSwQueryExtension,
XETSwSimpleReq, /* ListExtensions, */
XETSwChangeKeyboardMapping, /* 100 */
XETSwSimpleReq, /* GetKeyboardMapping, */
XETSwChangeKeyboardControl,
XETSwSimpleReq, /* GetKeyboardControl, */
XETSwSimpleReq, /* Bell, */
XETSwChangePointerControl, /* 105 */
XETSwSimpleReq, /* GetPointerControl, */
XETSwSetScreenSaver,
XETSwSimpleReq, /* GetScreenSaver, */
XETSwChangeHosts,
XETSwSimpleReq, /* 110 ListHosts, */
XETSwSimpleReq, /* XETSwChangeAccessControl, */
XETSwSimpleReq, /* XETSwChangeCloseDownMode, */
XETSwResourceReq, /* XETSwKillClient, */
XETSwRotateProperties,
XETSwSimpleReq, /* 115 ForceScreenSaver */
XETSwSimpleReq, /* SetPointerMapping, */
XETSwSimpleReq, /* GetPointerMapping, */
XETSwSimpleReq, /* SetModifierMapping, */
XETSwSimpleReq, /* GetModifierMapping, */
NotImplemented, /* 120 */
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented,
NotImplemented, /* 125 */
NotImplemented,
XETSwNoOperation
};
/* NOTE: This array must align with the values of the constants used
* as minor_opcode values in the request structure. Failure to do this
* could result in random code paths.
*/
globaldef int_function XETrapDispatchVector[10L] =
{
XETrapReset, /* 0 XETrap_Reset */
XETrapGetAvailable, /* 1 XETrap_GetAvailable */
XETrapConfig, /* 2 XETrap_Config */
XETrapStartTrap, /* 3 XETrap_StartTrap */
XETrapStopTrap, /* 4 XETrap_StopTrap */
XETrapGetCurrent, /* 5 XETrap_GetCurrent */
XETrapGetStatistics, /* 6 XETrap_GetStatistics */
#ifndef _XINPUT
XETrapSimulateXEvent, /* 7 XETrap_SimulateXEvent */
#endif
XETrapGetVersion, /* 8 XETrap_GetVersion */
XETrapGetLastInpTime, /* 9 XETrap_GetLastInpTime */
};
/* NOTE: This array must align with the values of the constants used
* as minor_opcode values in the request structure. Failure to do this
* could result in random code paths.
*/
globaldef int_function XETSwDispatchVector[10L] =
{
sXETrapReset, /* 0 XETrap_Reset */
sXETrapGetAvailable, /* 1 XETrap_GetAvailable */
sXETrapConfig, /* 2 XETrap_Config */
sXETrapStartTrap, /* 3 XETrap_StartTrap */
sXETrapStopTrap, /* 4 XETrap_StopTrap */
sXETrapGetCurrent, /* 5 XETrap_GetCurrent */
sXETrapGetStatistics, /* 6 XETrap_GetStatistics */
#ifndef _XINPUT
sXETrapSimulateXEvent, /* 7 XETrap_SimulateXEvent */
#endif
sXETrapGetVersion, /* 8 XETrap_GetVersion */
sXETrapGetLastInpTime, /* 9 XETrap_GetLastInpTime */
};
/* ProcVector shadow vector */
globaldef int_function XETrapProcVector[256L] = {XETrapRequestVector};
/*
* Events are faked as if they're vectored since that's
* the way it'll eventually be (X11 R5?).
*/
#ifndef VECTORED_EVENTS
globaldef int_function EventProcVector[XETrapCoreEvents] = {NULL};
#endif
globaldef int_function XETrapEventProcVector[XETrapCoreEvents] = {NULL};

View file

@ -2031,6 +2031,8 @@ SELinuxExtensionInit(INITARGS)
ProcSELinuxDispatch, SProcSELinuxDispatch,
SELinuxResetProc, StandardMinorOpcode);
AddExtensionAlias("Flask", extEntry);
/* Label objects that were created before we could register ourself */
SELinuxLabelInitial();
}

View file

@ -1154,9 +1154,11 @@ FixDeviceStateNotify(DeviceIntPtr dev, deviceStateNotify * ev, KeyClassPtr k,
ev->num_valuators = 0;
if (b) {
int i;
ev->classes_reported |= (1 << ButtonClass);
ev->num_buttons = b->numButtons;
memmove((char *)&ev->buttons[0], (char *)b->down, 4);
for (i = 0; i < 32; i++)
SetBitIf(ev->buttons, b->down, i);
} else if (k) {
ev->classes_reported |= (1 << KeyClass);
ev->num_keys = k->curKeySyms.maxKeyCode - k->curKeySyms.minKeyCode;
@ -1271,11 +1273,13 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail,
first += 3;
nval -= 3;
if (nbuttons > 32) {
int i;
(ev - 1)->deviceid |= MORE_EVENTS;
bev = (deviceButtonStateNotify *) ev++;
bev->type = DeviceButtonStateNotify;
bev->deviceid = dev->id;
memmove((char *)&bev->buttons[0], (char *)&b->down[4], 28);
for (i = 32; i < MAP_LENGTH; i++)
SetBitIf(bev->buttons, b->down, i);
}
if (nval > 0) {
(ev - 1)->deviceid |= MORE_EVENTS;
@ -1693,7 +1697,7 @@ SetButtonMapping(ClientPtr client, DeviceIntPtr dev, int nElts, BYTE * map)
if (BadDeviceMap(&map[0], nElts, 1, 255, &client->errorValue))
return BadValue;
for (i = 0; i < nElts; i++)
if ((b->map[i + 1] != map[i]) && BitIsOn(b->down, i + 1))
if ((b->map[i + 1] != map[i]) && (b->down[i + 1]))
return MappingBusy;
for (i = 0; i < nElts; i++)
b->map[i + 1] = map[i];

View file

@ -184,16 +184,11 @@ ProcXExtendedGrabDevice(ClientPtr client)
gemasks->eventMask[xgeMask->extension & 0x7F]= xgeMask->evmask;
}
ExtGrabDevice(client, dev, stuff->device_mode,
grab_window, confineTo, time, stuff->owner_events,
cursor, tmp[stuff->deviceid].mask,
gemasks);
if (rc != Success) {
errval = 0;
goto cleanup;
}
rep.status = ExtGrabDevice(client, dev, stuff->device_mode,
grab_window, confineTo, time,
stuff->owner_events, cursor,
tmp[stuff->deviceid].mask,
gemasks);
cleanup:
if (gemasks)

View file

@ -119,7 +119,7 @@ ProcXQueryDeviceState(ClientPtr client)
total_length += (sizeof(xValuatorState) + (v->numAxes * sizeof(int)));
num_classes++;
}
buf = (char *)xalloc(total_length);
buf = (char *)xcalloc(total_length, 1);
if (!buf)
return BadAlloc;
savbuf = buf;
@ -139,8 +139,8 @@ ProcXQueryDeviceState(ClientPtr client)
tb->class = ButtonClass;
tb->length = sizeof(xButtonState);
tb->num_buttons = b->numButtons;
for (i = 0; i < 32; i++)
tb->buttons[i] = b->down[i];
for (i = 0; i < MAP_LENGTH; i++)
SetBitIf(tb->buttons, b->down, i);
buf += sizeof(xButtonState);
}

View file

@ -106,10 +106,10 @@ HandleDevicePresenceMask(ClientPtr client, WindowPtr win,
if (mask == 0)
return Success;
/* We always only use mksidx = 0 for events not bound to
/* We always only use mksidx = MAX_DEVICES for events not bound to
* devices */
if (AddExtensionClient (win, client, mask, 0) != Success)
if (AddExtensionClient (win, client, mask, MAX_DEVICES) != Success)
return BadAlloc;
RecalculateDeviceDeliverableEvents(win);

View file

@ -82,6 +82,9 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update)
return Success;
}
if (!pWin->parent)
return BadMatch;
/*
* Only one Manual update is allowed
*/

View file

@ -262,6 +262,8 @@ AM_CONDITIONAL(FREEBSD_KLDLOAD, [test "x$ac_cv_sys_linker_h" = xyes])
AC_CACHE_CHECK([for SYSV IPC],
ac_cv_sysv_ipc,
[AC_TRY_LINK([
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
],[
{
@ -379,7 +381,7 @@ case $host_os in
AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console])
AC_DEFINE(SYSCONS_SUPPORT, 1, [System has syscons console])
DRI=yes
PKG_CHECK_EXISTS([dri2proto >= 1.1 libdrm >= 2.3.1], DRI2=yes, DRI2=no)
PKG_CHECK_EXISTS([dri2proto >= 1.1 libdrm >= 2.3.2], DRI2=yes, DRI2=no)
;;
*netbsd*)
AC_DEFINE(CSRG_BASED, 1, [System is BSD-like])
@ -387,7 +389,7 @@ case $host_os in
AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console])
AC_DEFINE(WSCONS_SUPPORT, 1, [System has wscons console])
DRI=yes
PKG_CHECK_EXISTS([dri2proto >= 1.1 libdrm >= 2.3.1], DRI2=yes, DRI2=no)
PKG_CHECK_EXISTS([dri2proto >= 1.1 libdrm >= 2.3.2], DRI2=yes, DRI2=no)
;;
*openbsd*)
AC_DEFINE(CSRG_BASED, 1, [System is BSD-like])
@ -396,7 +398,7 @@ case $host_os in
;;
*linux*)
DRI=yes
PKG_CHECK_EXISTS([dri2proto >= 1.1 libdrm >= 2.3.1], DRI2=yes, DRI2=no)
PKG_CHECK_EXISTS([dri2proto >= 1.1 libdrm >= 2.3.2], DRI2=yes, DRI2=no)
KDRIVE_HW=yes
;;
*solaris*)
@ -503,9 +505,9 @@ AC_ARG_ENABLE(install-libxf86config,
[Install libxf86config (default: disabled)]),
[INSTALL_LIBXF86CONFIG=$enableval],
[INSTALL_LIBXF86CONFIG=no])
AC_ARG_ENABLE(builtin-fonts, AS_HELP_STRING([--enable-builtin-fonts], [Use only built-in fonts (default: use external)]),
AC_ARG_ENABLE(builtin-fonts, AS_HELP_STRING([--enable-builtin-fonts], [Use only built-in fonts (default: yes)]),
[BUILTIN_FONTS=$enableval],
[BUILTIN_FONTS=no])
[BUILTIN_FONTS=yes])
AC_ARG_ENABLE(null-root-cursor, AS_HELP_STRING([--enable-null-root-cursor], [Use an empty root cursor (default: use core cursor)]),
[NULL_ROOT_CURSOR=$enableval],
[NULL_ROOT_CURSOR=no])
@ -529,7 +531,6 @@ AC_ARG_ENABLE(registry, AS_HELP_STRING([--disable-registry], [Build string
AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes])
AC_ARG_ENABLE(mitshm, AS_HELP_STRING([--disable-shm], [Build SHM extension (default: enabled)]), [MITSHM=$enableval], [MITSHM=yes])
AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes extension (default: enabled)]), [RES=$enableval], [RES=yes])
AC_ARG_ENABLE(xtrap, AS_HELP_STRING([--disable-xtrap], [Build XTrap extension (default: enabled)]), [XTRAP=$enableval], [XTRAP=yes])
AC_ARG_ENABLE(record, AS_HELP_STRING([--enable-record], [Build Record extension (default: disabled)]), [RECORD=$enableval], [RECORD=no])
AC_ARG_ENABLE(xv, AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes])
AC_ARG_ENABLE(xvmc, AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes])
@ -817,13 +818,6 @@ if test "x$MITSHM" = xyes; then
AC_DEFINE(HAS_SHM, 1, [Support SHM])
fi
AM_CONDITIONAL(XTRAP, [test "x$XTRAP" = xyes])
if test "x$XTRAP" = xyes; then
AC_DEFINE(XTRAP, 1, [Support XTrap extension])
REQUIRED_MODULES="$REQUIRED_MODULES trapproto"
XTRAP_LIB='$(top_builddir)/XTrap/libxtrap.la'
fi
AM_CONDITIONAL(RECORD, [test "x$RECORD" = xyes])
if test "x$RECORD" = xyes; then
AC_DEFINE(XRECORD, 1, [Support Record extension])
@ -873,7 +867,7 @@ if test "x$DRI" = xyes; then
AC_DEFINE(XF86DRI, 1, [Build DRI extension])
PKG_CHECK_MODULES([DRIPROTO], [xf86driproto])
PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.3.0])
PKG_CHECK_MODULES([GL], [glproto >= 1.4.1 gl >= 7.1.0])
PKG_CHECK_MODULES([GL], [glproto >= 1.4.1 dri >= 7.1.0])
PKG_CHECK_EXISTS(libdrm >= 2.2.0,
[AC_DEFINE([HAVE_LIBDRM_2_2], 1,
[Has version 2.2 (or newer) of the drm library])])
@ -888,7 +882,7 @@ if test "x$DRI2" = xyes; then
# FIXME: Bump the versions once we have releases of these.
AC_DEFINE(DRI2, 1, [Build DRI2 extension])
PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= 1.1])
PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.3.1])
PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.3.2])
fi
AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes])
@ -960,7 +954,6 @@ fi
if test "x$BUILTIN_FONTS" = xyes; then
AC_DEFINE(BUILTIN_FONTS, 1, [Use only built-in fonts])
AC_DEFINE(NOFONTSERVERACCESS, 1, [Avoid using a font server])
FONTPATH="built-ins"
fi
@ -1117,7 +1110,7 @@ if test "x$SHA1_LIB" = "x" ; then
[Define to use libmd SHA1 functions instead of OpenSSL libcrypto])])
fi
if test "x$SHA1_LIB" = "x" ; then
PKG_CHECK_EXISTS([openssl],
AC_CHECK_LIB([crypto], [SHA1_Init], [],
[PKG_CHECK_MODULES([OPENSSL], [openssl],
[OPENSSL_LIB_FLAGS=`$PKG_CONFIG --libs-only-L --libs-only-other openssl`])])
SHA1_LIB="$OPENSSL_LIB_FLAGS -lcrypto"
@ -1208,7 +1201,7 @@ AC_MSG_RESULT([$XVFB])
AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes])
if test "x$XVFB" = xyes; then
XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_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"
XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_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"
XVFB_SYS_LIBS="$XVFBMODULES_LIBS"
AC_SUBST([XVFB_LIBS])
AC_SUBST([XVFB_SYS_LIBS])
@ -1226,7 +1219,7 @@ AC_MSG_RESULT([$XNEST])
AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes])
if test "x$XNEST" = xyes; then
XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DIX_LIB $OS_LIB $CONFIG_LIB"
XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DIX_LIB $OS_LIB $CONFIG_LIB"
XNEST_SYS_LIBS="$XNESTMODULES_LIBS"
AC_SUBST([XNEST_LIBS])
AC_SUBST([XNEST_SYS_LIBS])
@ -1287,8 +1280,6 @@ if test "x$XORG" = xyes; then
;;
alpha*)
linux_alpha=yes
XORG_OS_PCI="axp"
xorg_bus_linuxpci="no"
;;
i*86|amd64*|x86_64*)
linux_acpi="yes"
@ -1590,7 +1581,7 @@ if test "x$XQUARTZ" = xyes; then
AC_DEFINE(ROOTLESS,1,[Build Rootless code])
DARWIN_GLX_LIBS='$(top_builddir)/hw/xquartz/GL/libCGLCore.la $(top_builddir)/glx/libglx.la'
DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $DARWIN_GLX_LIBS"
DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $DARWIN_GLX_LIBS"
AC_SUBST([DARWIN_LIBS])
AC_CHECK_LIB([Xplugin],[xp_init],[:])
@ -1632,9 +1623,9 @@ if test "x$DMX" = xyes; then
AC_MSG_ERROR([Xdmx build explicitly requested, but required
modules not found.])
fi
DMX_INCLUDES="$XEXT_INC $RENDER_INC $XTRAP_INC $RECORD_INC"
DMX_INCLUDES="$XEXT_INC $RENDER_INC $RECORD_INC"
XDMX_CFLAGS="$DMXMODULES_CFLAGS"
XDMX_LIBS="$XEXT_LIB $FB_LIB $CONFIG_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB"
XDMX_LIBS="$XEXT_LIB $FB_LIB $CONFIG_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB"
XDMX_SYS_LIBS="$DMXMODULES_LIBS"
AC_SUBST([XDMX_CFLAGS])
AC_SUBST([XDMX_LIBS])
@ -1760,7 +1751,7 @@ if test "$KDRIVE" = yes; then
KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS"
KDRIVE_PURE_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 $OS_LIB"
KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_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 $OS_LIB"
KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a'
case $host_os in
*linux*)
@ -1830,13 +1821,6 @@ AC_TRY_COMPILE([
AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix])
dnl xorgconfig CLI configuration utility
if test "x$XORG" = xyes; then
PKG_CHECK_MODULES([XORGCONFIG_DEP], [xkbfile x11])
AC_SUBST(XORGCONFIG_DEP_CFLAGS)
AC_SUBST(XORGCONFIG_DEP_LIBS)
fi
dnl xorgcfg GUI configuration utility
AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([--enable-xorgcfg],
[Build xorgcfg GUI configuration utility (default: no)]),
@ -1909,7 +1893,6 @@ dix/Makefile
doc/Makefile
fb/Makefile
record/Makefile
XTrap/Makefile
config/Makefile
mi/Makefile
miext/Makefile
@ -1971,7 +1954,6 @@ hw/xfree86/utils/gtf/Makefile
hw/xfree86/utils/ioport/Makefile
hw/xfree86/utils/kbd_mode/Makefile
hw/xfree86/utils/xorgcfg/Makefile
hw/xfree86/utils/xorgconfig/Makefile
hw/dmx/config/Makefile
hw/dmx/doc/Makefile
hw/dmx/examples/Makefile

View file

@ -275,7 +275,7 @@ EnableDevice(DeviceIntPtr dev)
ev.time = currentTime.milliseconds;
ev.devchange = DeviceEnabled;
ev.deviceid = dev->id;
dummyDev.id = 0;
dummyDev.id = MAX_DEVICES;
SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask,
(xEvent *) &ev, 1);
@ -339,7 +339,7 @@ DisableDevice(DeviceIntPtr dev)
ev.time = currentTime.milliseconds;
ev.devchange = DeviceDisabled;
ev.deviceid = dev->id;
dummyDev.id = 0;
dummyDev.id = MAX_DEVICES;
SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask,
(xEvent *) &ev, 1);
@ -379,6 +379,7 @@ ActivateDevice(DeviceIntPtr dev)
ev.deviceid = dev->id;
memset(&dummyDev, 0, sizeof(DeviceIntRec));
dummyDev.id = MAX_DEVICES;
SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask,
(xEvent *) &ev, 1);
@ -937,7 +938,7 @@ RemoveDevice(DeviceIntPtr dev)
ev.time = currentTime.milliseconds;
ev.devchange = DeviceRemoved;
ev.deviceid = deviceid;
dummyDev.id = 0;
dummyDev.id = MAX_DEVICES;
SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask,
(xEvent *) &ev, 1);
}
@ -1734,7 +1735,7 @@ DoSetPointerMapping(ClientPtr client, DeviceIntPtr device, BYTE *map, int n)
if ((dev->coreEvents || dev == inputInfo.pointer) && dev->button) {
for (i = 0; i < n; i++) {
if ((device->button->map[i + 1] != map[i]) &&
BitIsOn(device->button->down, i + 1)) {
device->button->down[i + 1]) {
return MappingBusy;
}
}

View file

@ -1920,8 +1920,6 @@ InitFonts (void)
BuiltinRegisterFpeFunctions();
#else
FontFileRegisterFpeFunctions();
#endif
#ifndef NOFONTSERVERACCESS
fs_register_fpe_functions();
#endif
}

View file

@ -3389,7 +3389,7 @@ CheckPassiveGrabsOnWindow(
else
gdev = device;
}
if (gdev)
if (gdev && gdev->key)
xkbi= gdev->key->xkbInfo;
#endif
tempGrab.modifierDevice = grab->modifierDevice;
@ -4077,15 +4077,11 @@ ProcessPointerEvent (xEvent *xE, DeviceIntPtr mouse, int count)
if (xE->u.u.type != MotionNotify)
{
int key;
BYTE *kptr;
int bit;
XE_KBPTR.rootX = pSprite->hot.x;
XE_KBPTR.rootY = pSprite->hot.y;
key = xE->u.u.detail;
kptr = &butc->down[key >> 3];
bit = 1 << (key & 7);
switch (xE->u.u.type)
{
case ButtonPress:
@ -4587,6 +4583,9 @@ DoEnterLeaveEvents(DeviceIntPtr pDev,
WindowPtr toWin,
int mode)
{
if (!IsPointerDevice(pDev))
return;
if (fromWin == toWin)
return;
if (IsParent(fromWin, toWin))
@ -5521,14 +5520,15 @@ InitEvents(void)
FatalError("[dix] Failed to allocate input event list.\n");
}
/**
* This function is deprecated! It shouldn't be used anymore. It used to free
* the spriteTraces, but now they are freed when the SpriteRec is freed.
*/
_X_DEPRECATED void
void
CloseDownEvents(void)
{
int len;
EventListPtr list;
len = GetEventList(&list);
while(len--)
xfree(list[len].event);
}
/**
@ -6172,6 +6172,10 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events)
if (events->u.u.type == GenericEvent)
{
eventlength += ((xGenericEvent*)events)->length * 4;
}
if(pClient->swapped)
{
if (eventlength > swapEventLen)
{
swapEventLen = eventlength;
@ -6182,10 +6186,7 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events)
return;
}
}
}
if(pClient->swapped)
{
for(i = 0; i < count; i++)
{
eventFrom = &events[i];
@ -6196,7 +6197,7 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events)
(*EventSwapVector[eventFrom->u.u.type & 0177])
(eventFrom, eventTo);
(void)WriteToClient(pClient, eventlength, (char *)&eventTo);
(void)WriteToClient(pClient, eventlength, (char *)eventTo);
}
}
else

View file

@ -787,7 +787,7 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type,
*
* @param num_events Number of elements in list.
*/
_X_EXPORT EventListPtr
EventListPtr
InitEventList(int num_events)
{
EventListPtr events;

View file

@ -437,6 +437,7 @@ int main(int argc, char *argv[], char *envp[])
memset(WindowTable, 0, MAXSCREENS * sizeof(WindowPtr));
CloseDownDevices();
CloseDownEvents();
for (i = screenInfo.numScreens - 1; i >= 0; i--)
{

View file

@ -359,16 +359,28 @@ V000 SECURITY:AuthorizationRevoked
E000 SECURITY:BadAuthorization
E001 SECURITY:BadAuthorizationProtocol
R000 SELinux:SELinuxQueryVersion
R001 SELinux:SELinuxSetSelectionManager
R002 SELinux:SELinuxGetSelectionManager
R001 SELinux:SELinuxSetDeviceCreateContext
R002 SELinux:SELinuxGetDeviceCreateContext
R003 SELinux:SELinuxSetDeviceContext
R004 SELinux:SELinuxGetDeviceContext
R005 SELinux:SELinuxSetPropertyCreateContext
R006 SELinux:SELinuxGetPropertyCreateContext
R007 SELinux:SELinuxGetPropertyContext
R008 SELinux:SELinuxSetWindowCreateContext
R009 SELinux:SELinuxGetWindowCreateContext
R010 SELinux:SELinuxGetWindowContext
R005 SELinux:SELinuxSetWindowCreateContext
R006 SELinux:SELinuxGetWindowCreateContext
R007 SELinux:SELinuxGetWindowContext
R008 SELinux:SELinuxSetPropertyCreateContext
R009 SELinux:SELinuxGetPropertyCreateContext
R010 SELinux:SELinuxSetPropertyUseContext
R011 SELinux:SELinuxGetPropertyUseContext
R012 SELinux:SELinuxGetPropertyContext
R013 SELinux:SELinuxGetPropertyDataContext
R014 SELinux:SELinuxListProperties
R015 SELinux:SELinuxSetSelectionCreateContext
R016 SELinux:SELinuxGetSelectionCreateContext
R017 SELinux:SELinuxSetSelectionUseContext
R018 SELinux:SELinuxGetSelectionUseContext
R019 SELinux:SELinuxGetSelectionContext
R020 SELinux:SELinuxGetSelectionDataContext
R021 SELinux:SELinuxListSelections
R022 SELinux:SELinuxGetClientContext
R000 SHAPE:QueryVersion
R001 SHAPE:Rectangles
R002 SHAPE:Mask

View file

@ -126,10 +126,12 @@ RegisterExtensionNames(ExtensionEntry *extEntry)
rewind(fh);
while (fgets(buf, sizeof(buf), fh)) {
lineobj = NULL;
ptr = strchr(buf, '\n');
if (ptr)
*ptr = 0;
/* Check for comments or empty lines */
switch (buf[0]) {
case PROT_REQUEST:
case PROT_EVENT:
@ -139,48 +141,54 @@ RegisterExtensionNames(ExtensionEntry *extEntry)
case '\0':
continue;
default:
continue;
goto invalid;
}
/* Check for space character in the fifth position */
ptr = strchr(buf, ' ');
if (!ptr || ptr != buf + 4) {
LogMessage(X_WARNING, "Invalid line in " FILENAME ", skipping\n");
continue;
}
if (!ptr || ptr != buf + 4)
goto invalid;
/* Duplicate the string after the space */
lineobj = strdup(ptr + 1);
if (!lineobj)
continue;
/* Check for a colon somewhere on the line */
ptr = strchr(buf, ':');
if (!ptr) {
LogMessage(X_WARNING, "Invalid line in " FILENAME ", skipping\n");
continue;
}
if (!ptr)
goto invalid;
/* Compare the part before colon with the target extension name */
*ptr = 0;
if (strcmp(buf + 5, extEntry->name))
continue;
goto skip;
/* Get the opcode for the request, event, or error */
offset = strtol(buf + 1, &ptr, 10);
if (offset == 0 && ptr == buf + 1) {
LogMessage(X_WARNING, "Invalid line in " FILENAME ", skipping\n");
continue;
}
if (offset == 0 && ptr == buf + 1)
goto invalid;
/* Save the strdup result in the registry */
switch(buf[0]) {
case PROT_REQUEST:
if (extEntry->base)
RegisterRequestName(extEntry->base, offset, lineobj);
else
RegisterRequestName(offset, 0, lineobj);
break;
continue;
case PROT_EVENT:
RegisterEventName(extEntry->eventBase + offset, lineobj);
break;
continue;
case PROT_ERROR:
RegisterErrorName(extEntry->errorBase + offset, lineobj);
break;
continue;
}
invalid:
LogMessage(X_WARNING, "Invalid line in " FILENAME ", skipping\n");
skip:
free(lineobj);
}
}

View file

@ -929,6 +929,7 @@ CrushTree(WindowPtr pWin)
(*UnrealizeWindow)(pChild);
}
FreeWindowResources(pChild);
dixFreePrivates(pChild->devPrivates);
xfree(pChild);
if ( (pChild = pSib) )
break;
@ -978,6 +979,7 @@ DeleteWindow(pointer value, XID wid)
if (pWin->prevSib)
pWin->prevSib->nextSib = pWin->nextSib;
}
xfree(dixLookupPrivate(&pWin->devPrivates, FocusPrivatesKey));
dixFreePrivates(pWin->devPrivates);
xfree(pWin);
return Success;

View file

@ -314,7 +314,6 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
if (driver_alloc) {
size_t paddedWidth, datasize;
void *driver_priv;
paddedWidth = ((w * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits);
if (paddedWidth / 4 > 32767 || h > 32767)
@ -327,22 +326,21 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
datasize = h * paddedWidth;
driver_priv = pExaScr->info->CreatePixmap(pScreen, datasize, 0);
if (!driver_priv) {
pExaPixmap->driverPriv = pExaScr->info->CreatePixmap(pScreen, datasize, 0);
if (!pExaPixmap->driverPriv) {
fbDestroyPixmap(pPixmap);
return NULL;
}
(*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0,
paddedWidth, NULL);
pExaPixmap->driverPriv = driver_priv;
pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
pExaPixmap->fb_ptr = NULL;
} else {
pExaPixmap->driverPriv = NULL;
/* Scratch pixmaps may have w/h equal to zero, and may not be
* migrated.
*/
pExaPixmap->driverPriv = NULL;
/* Scratch pixmaps may have w/h equal to zero, and may not be
* migrated.
*/
if (!w || !h)
pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
else

View file

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

View file

@ -1,5 +1,4 @@
/*
*
* Copyright © 2000 SuSE, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
@ -544,11 +543,10 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
int oldXoff, oldYoff;
int newXoff, newYoff;
pNewTile = fbCreatePixmapBpp (pScreen,
pOldTile->drawable.width,
pOldTile->drawable.height,
pOldTile->drawable.depth,
bitsPerPixel, 0);
pNewTile = pScreen->CreatePixmap(pScreen, pOldTile->drawable.width,
pOldTile->drawable.height,
pOldTile->drawable.depth,
pOldTile->usage_hint);
if (!pNewTile)
return 0;
fbGetDrawable (&pOldTile->drawable,

View file

@ -251,8 +251,6 @@ extern HIDDEN int __glXDisp_AreTexturesResident(struct __GLXclientStateRec *, GL
extern HIDDEN int __glXDispSwap_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_PointParameterfvEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_PointParameterfvEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_Color3bv(GLbyte * pc);
@ -423,6 +421,8 @@ extern HIDDEN void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc);
extern HIDDEN int __glXDisp_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_RasterPos2sv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_RasterPos2sv(GLbyte * pc);
extern HIDDEN void __glXDisp_Color4ubv(GLbyte * pc);

View file

@ -714,6 +714,17 @@ __glGetBooleanv_size(GLenum e)
case GL_MAX_TEXTURE_COORDS_ARB:
case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
case GL_DEPTH_BOUNDS_TEST_EXT:
case GL_ARRAY_BUFFER_BINDING_ARB:
case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
case GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB:
case GL_MAX_ARRAY_TEXTURE_LAYERS_EXT:
case GL_STENCIL_TEST_TWO_SIDE_EXT:
case GL_ACTIVE_STENCIL_FACE_EXT:
@ -1072,6 +1083,7 @@ __glGetVertexAttribdvARB_size(GLenum e)
case GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB:
case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB:
case GL_CURRENT_VERTEX_ATTRIB_ARB:
case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB:
return 1;
default:
return 0;

View file

@ -1004,8 +1004,7 @@ static int MakeCurrent(__GLXclientState *cl,
prevglxc->pGlxPixmap = 0;
}
if (prevglxc->pGlxReadPixmap &&
prevglxc->pGlxReadPixmap != prevglxc->pGlxPixmap ) {
if (prevglxc->pGlxReadPixmap) {
/*
** The previous drawable was a glx pixmap, release it.
*/
@ -1023,8 +1022,7 @@ static int MakeCurrent(__GLXclientState *cl,
prevglxc->pGlxWindow = 0;
}
if (prevglxc->pGlxReadWindow &&
prevglxc->pGlxReadWindow != prevglxc->pGlxWindow) {
if (prevglxc->pGlxReadWindow) {
/*
** The previous drawable was a glx window, release it.
*/
@ -1042,8 +1040,7 @@ static int MakeCurrent(__GLXclientState *cl,
prevglxc->pGlxPbuffer = 0;
}
if (prevglxc->pGlxReadPbuffer &&
prevglxc->pGlxReadPbuffer != prevglxc->pGlxPbuffer ) {
if (prevglxc->pGlxReadPbuffer) {
/*
** The previous drawable was a glx Pbuffer, release it.
*/
@ -1071,7 +1068,7 @@ static int MakeCurrent(__GLXclientState *cl,
pGlxPixmap->refcnt++;
}
if (pReadGlxPixmap && pReadGlxPixmap != pGlxPixmap) {
if (pReadGlxPixmap) {
pReadGlxPixmap->refcnt++;
}
@ -1079,7 +1076,7 @@ static int MakeCurrent(__GLXclientState *cl,
pGlxWindow->refcnt++;
}
if (pGlxReadWindow && pGlxReadWindow != pGlxWindow) {
if (pGlxReadWindow) {
pGlxReadWindow->refcnt++;
}
@ -1087,7 +1084,7 @@ static int MakeCurrent(__GLXclientState *cl,
pGlxPbuffer->refcnt++;
}
if (pGlxReadPbuffer && pGlxReadPbuffer != pGlxPbuffer) {
if (pGlxReadPbuffer) {
pGlxReadPbuffer->refcnt++;
}

View file

@ -78,6 +78,8 @@ Xephyr_DEPENDENCIES = \
$(LIBXEPHYR_HOSTDRI) \
@KDRIVE_LOCAL_LIBS@
Xephyr_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
relink:
rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS)

View file

@ -565,14 +565,40 @@ hostx_get_visual_masks (EphyrScreenInfo screen,
}
}
static int
hostx_calculate_color_shift(unsigned long mask,
int bits_per_rgb)
{
int shift = 0;
while(mask) {
mask = mask >> bits_per_rgb;
if (mask) shift += bits_per_rgb;
}
return shift;
}
void
hostx_set_cmap_entry(unsigned char idx,
unsigned char r,
unsigned char g,
unsigned char b)
{
/* XXX Will likely break for 8 on 16, not sure if this is correct */
HostX.cmap[idx] = (r << 16) | (g << 8) | (b);
/* need to calculate the shifts for RGB because server could be BGR. */
/* XXX Not sure if this is correct for 8 on 16, but this works for 8 on 24.*/
static int rshift, bshift, gshift = 0;
static int first_time = 1;
if (first_time) {
first_time = 0;
rshift = hostx_calculate_color_shift(HostX.visual->red_mask,
HostX.visual->bits_per_rgb);
gshift = hostx_calculate_color_shift(HostX.visual->green_mask,
HostX.visual->bits_per_rgb);
bshift = hostx_calculate_color_shift(HostX.visual->blue_mask,
HostX.visual->bits_per_rgb);
}
HostX.cmap[idx] = ((r << rshift) & HostX.visual->red_mask) |
((g << gshift) & HostX.visual->green_mask) |
((b << bshift) & HostX.visual->blue_mask);
}
/**

View file

@ -21,6 +21,8 @@ Xfake_LDADD = \
@KDRIVE_LIBS@ \
@XSERVER_LIBS@
Xfake_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
Xfake_DEPENDENCIES = \
libfake.a \
@KDRIVE_LOCAL_LIBS@

View file

@ -22,6 +22,8 @@ Xfbdev_DEPENDENCIES = \
libfbdev.a \
$(KDRIVE_PURE_LIBS)
Xfbdev_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
relink:
rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS)
endif

View file

@ -13,5 +13,7 @@ Xsdl_LDADD = \
Xsdl_DEPENDENCIES = @KDRIVE_LOCAL_LIBS@
Xsdl_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
relink:
rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS)

View file

@ -12,12 +12,14 @@ KDRIVE_HW_SOURCES = \
vga.h
endif
if XV
KDRIVE_XV_SOURCES = \
kxv.c \
kxv.h
endif
libkdrive_a_SOURCES = \
fourcc.h \
kaa.c \
kaa.h \
kaapict.c \
kasync.c \
kcmap.c \
kcurscol.c \
kdrive.c \
@ -31,8 +33,7 @@ libkdrive_a_SOURCES = \
koffscreen.c \
kshadow.c \
ktest.c \
kxv.c \
kxv.h \
$(KDRIVE_XV_SOURCES) \
$(KDRIVE_HW_SOURCES) \
$(top_srcdir)/mi/miinitext.c

File diff suppressed because it is too large Load diff

View file

@ -1,120 +0,0 @@
/*
* Copyright © 2001 Keith Packard
*
* Partly based on code that is Copyright © The XFree86 Project Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _KAA_H_
#define _KAA_H_
#include "picturestr.h"
#define KaaGetScreenPriv(s) ((KaaScreenPrivPtr) \
dixLookupPrivate(&(s)->devPrivates, kaaScreenPrivateKey))
#define KaaScreenPriv(s) KaaScreenPrivPtr pKaaScr = KaaGetScreenPriv(s)
#define KaaGetPixmapPriv(p) ((KaaPixmapPrivPtr) \
dixLookupPrivate(&(p)->devPrivates, kaaPixmapPrivateKey))
#define KaaSetPixmapPriv(p,a) \
dixSetPrivate(&(p)->devPrivates, kaaPixmapPrivateKey, a)
#define KaaPixmapPriv(p) KaaPixmapPrivPtr pKaaPixmap = KaaGetPixmapPriv(p)
typedef struct {
KaaScreenInfoPtr info;
} KaaScreenPrivRec, *KaaScreenPrivPtr;
typedef struct {
KdOffscreenArea *area;
int score;
int devKind;
DevUnion devPrivate;
Bool dirty;
} KaaPixmapPrivRec, *KaaPixmapPrivPtr;
extern DevPrivateKey kaaScreenPrivateKey;
extern DevPrivateKey kaaPixmapPrivateKey;
void
kaaPixmapUseScreen (PixmapPtr pPixmap);
void
kaaPixmapUseMemory (PixmapPtr pPixmap);
void
kaaDrawableDirty(DrawablePtr pDrawable);
Bool
kaaDrawableIsOffscreen (DrawablePtr pDrawable);
Bool
kaaPixmapIsOffscreen(PixmapPtr p);
PixmapPtr
kaaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp);
void
kaaMoveInPixmap (PixmapPtr pPixmap);
void
kaaMarkSync (ScreenPtr pScreen);
void
kaaWaitSync (ScreenPtr pScreen);
void
kaaCopyNtoN (DrawablePtr pSrcDrawable,
DrawablePtr pDstDrawable,
GCPtr pGC,
BoxPtr pbox,
int nbox,
int dx,
int dy,
Bool reverse,
Bool upsidedown,
Pixel bitplane,
void *closure);
void
kaaComposite(CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
PicturePtr pDst,
INT16 xSrc,
INT16 ySrc,
INT16 xMask,
INT16 yMask,
INT16 xDst,
INT16 yDst,
CARD16 width,
CARD16 height);
void
kaaRasterizeTrapezoid(PicturePtr pPict,
xTrapezoid *trap,
int xoff,
int yoff);
void
kaaInitTrapOffsets(int grid_order, float *x_offsets, float *y_offsets,
float x_offset, float y_offset);
#endif /* _KAA_H_ */

View file

@ -1,719 +0,0 @@
/*
* Copyright © 2001 Keith Packard
*
* Partly based on code that is Copyright © The XFree86 Project Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include <kdrive-config.h>
#endif
#include "kdrive.h"
#include "kaa.h"
#ifdef RENDER
#include "mipict.h"
#define KAA_DEBUG_FALLBACKS 0
#if KAA_DEBUG_FALLBACKS
static void kaaCompositeFallbackPictDesc(PicturePtr pict, char *string, int n)
{
char format[20];
char size[20];
char loc;
int temp;
if (!pict) {
snprintf(string, n, "None");
return;
}
switch (pict->format)
{
case PICT_a8r8g8b8:
snprintf(format, 20, "ARGB8888");
break;
case PICT_r5g6b5:
snprintf(format, 20, "RGB565 ");
break;
case PICT_x1r5g5b5:
snprintf(format, 20, "RGB555 ");
break;
case PICT_a8:
snprintf(format, 20, "A8 ");
break;
case PICT_a1:
snprintf(format, 20, "A1 ");
break;
default:
snprintf(format, 20, "0x%x", (int)pict->format);
break;
}
loc = kaaGetOffscreenPixmap(pict->pDrawable, &temp, &temp) ? 's' : 'm';
snprintf(size, 20, "%dx%d%s", pict->pDrawable->width,
pict->pDrawable->height, pict->repeat ?
" R" : "");
snprintf(string, n, "0x%lx:%c fmt %s (%s)", (long)pict, loc, format, size);
}
static void
kaaPrintCompositeFallback(CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
PicturePtr pDst)
{
char sop[20];
char srcdesc[40], maskdesc[40], dstdesc[40];
switch(op)
{
case PictOpSrc:
sprintf(sop, "Src");
break;
case PictOpOver:
sprintf(sop, "Over");
break;
default:
sprintf(sop, "0x%x", (int)op);
break;
}
kaaCompositeFallbackPictDesc(pSrc, srcdesc, 40);
kaaCompositeFallbackPictDesc(pMask, maskdesc, 40);
kaaCompositeFallbackPictDesc(pDst, dstdesc, 40);
ErrorF("Composite fallback: op %s, \n"
" src %s, \n"
" mask %s, \n"
" dst %s, \n",
sop, srcdesc, maskdesc, dstdesc);
}
static void
kaaPrintTrapezoidFallback(PicturePtr pDst)
{
char dstdesc[40];
kaaCompositeFallbackPictDesc(pDst, dstdesc, 40);
ErrorF("Trapezoid fallback: dst %s, %c/%s\n",
dstdesc,
(pDst->polyMode == PolyModePrecise) ? 'p' : 'i',
(pDst->polyEdge == PolyEdgeSharp) ? "a" : "aa");
}
#endif
static Bool
kaaGetPixelFromRGBA(CARD32 *pixel,
CARD16 red,
CARD16 green,
CARD16 blue,
CARD16 alpha,
CARD32 format)
{
int rbits, bbits, gbits, abits;
int rshift, bshift, gshift, ashift;
*pixel = 0;
if (!PICT_FORMAT_COLOR(format))
return FALSE;
rbits = PICT_FORMAT_R(format);
gbits = PICT_FORMAT_G(format);
bbits = PICT_FORMAT_B(format);
abits = PICT_FORMAT_A(format);
if (PICT_FORMAT_TYPE(format) == PICT_TYPE_ARGB) {
bshift = 0;
gshift = bbits;
rshift = gshift + gbits;
ashift = rshift + rbits;
} else { /* PICT_TYPE_ABGR */
rshift = 0;
gshift = rbits;
bshift = gshift + gbits;
ashift = bshift + bbits;
}
*pixel |= ( blue >> (16 - bbits)) << bshift;
*pixel |= ( red >> (16 - rbits)) << rshift;
*pixel |= (green >> (16 - gbits)) << gshift;
*pixel |= (alpha >> (16 - abits)) << ashift;
return TRUE;
}
static Bool
kaaGetRGBAFromPixel(CARD32 pixel,
CARD16 *red,
CARD16 *green,
CARD16 *blue,
CARD16 *alpha,
CARD32 format)
{
int rbits, bbits, gbits, abits;
int rshift, bshift, gshift, ashift;
if (!PICT_FORMAT_COLOR(format))
return FALSE;
rbits = PICT_FORMAT_R(format);
gbits = PICT_FORMAT_G(format);
bbits = PICT_FORMAT_B(format);
abits = PICT_FORMAT_A(format);
if (PICT_FORMAT_TYPE(format) == PICT_TYPE_ARGB) {
bshift = 0;
gshift = bbits;
rshift = gshift + gbits;
ashift = rshift + rbits;
} else { /* PICT_TYPE_ABGR */
rshift = 0;
gshift = rbits;
bshift = gshift + gbits;
ashift = bshift + bbits;
}
*red = ((pixel >> rshift ) & ((1 << rbits) - 1)) << (16 - rbits);
while (rbits < 16) {
*red |= *red >> rbits;
rbits <<= 1;
}
*green = ((pixel >> gshift ) & ((1 << gbits) - 1)) << (16 - gbits);
while (gbits < 16) {
*green |= *green >> gbits;
gbits <<= 1;
}
*blue = ((pixel >> bshift ) & ((1 << bbits) - 1)) << (16 - bbits);
while (bbits < 16) {
*blue |= *blue >> bbits;
bbits <<= 1;
}
if (abits) {
*alpha = ((pixel >> ashift ) & ((1 << abits) - 1)) << (16 - abits);
while (abits < 16) {
*alpha |= *alpha >> abits;
abits <<= 1;
}
} else
*alpha = 0xffff;
return TRUE;
}
static int
kaaTryDriverSolidFill(PicturePtr pSrc,
PicturePtr pDst,
INT16 xSrc,
INT16 ySrc,
INT16 xDst,
INT16 yDst,
CARD16 width,
CARD16 height)
{
KaaScreenPriv (pDst->pDrawable->pScreen);
RegionRec region;
BoxPtr pbox;
int nbox;
int dst_off_x, dst_off_y;
PixmapPtr pSrcPix, pDstPix;
CARD32 pixel;
CARD16 red, green, blue, alpha;
xDst += pDst->pDrawable->x;
yDst += pDst->pDrawable->y;
xSrc += pSrc->pDrawable->x;
ySrc += pSrc->pDrawable->y;
if (!miComputeCompositeRegion (&region, pSrc, NULL, pDst,
xSrc, ySrc, 0, 0, xDst, yDst,
width, height))
return 1;
if (pSrc->pDrawable->type == DRAWABLE_PIXMAP)
kaaPixmapUseMemory ((PixmapPtr) pSrc->pDrawable);
if (pDst->pDrawable->type == DRAWABLE_PIXMAP)
kaaPixmapUseScreen ((PixmapPtr) pDst->pDrawable);
pDstPix = kaaGetOffscreenPixmap (pDst->pDrawable, &dst_off_x, &dst_off_y);
if (!pDstPix) {
REGION_UNINIT(pDst->pDrawable->pScreen, &region);
return 0;
}
if (pSrc->pDrawable->type == DRAWABLE_WINDOW)
pSrcPix = (*pSrc->pDrawable->pScreen->GetWindowPixmap)(
(WindowPtr) (pSrc->pDrawable));
else
pSrcPix = (PixmapPtr) (pSrc->pDrawable);
/* If source is offscreen, we need to sync the accelerator
* before accessing it. We'd prefer for it to be in memory.
*/
if (kaaPixmapIsOffscreen(pSrcPix)) {
kaaWaitSync(pDst->pDrawable->pScreen);
}
pixel = *(CARD32 *)(pSrcPix->devPrivate.ptr);
if (!kaaGetRGBAFromPixel(pixel, &red, &green, &blue, &alpha,
pSrc->format))
{
REGION_UNINIT(pDst->pDrawable->pScreen, &region);
return -1;
}
kaaGetPixelFromRGBA(&pixel, red, green, blue, alpha,
pDst->format);
if (!(*pKaaScr->info->PrepareSolid) (pDstPix, GXcopy, 0xffffffff, pixel))
{
REGION_UNINIT(pDst->pDrawable->pScreen, &region);
return -1;
}
nbox = REGION_NUM_RECTS(&region);
pbox = REGION_RECTS(&region);
while (nbox--)
{
(*pKaaScr->info->Solid) (pbox->x1 + dst_off_x,
pbox->y1 + dst_off_y,
pbox->x2 + dst_off_x,
pbox->y2 + dst_off_y);
pbox++;
}
(*pKaaScr->info->DoneSolid) ();
kaaMarkSync (pDst->pDrawable->pScreen);
kaaDrawableDirty (pDst->pDrawable);
REGION_UNINIT(pDst->pDrawable->pScreen, &region);
return 1;
}
static int
kaaTryDriverBlend(CARD8 op,
PicturePtr pSrc,
PicturePtr pDst,
INT16 xSrc,
INT16 ySrc,
INT16 xDst,
INT16 yDst,
CARD16 width,
CARD16 height)
{
KaaScreenPriv (pDst->pDrawable->pScreen);
RegionRec region;
BoxPtr pbox;
int nbox;
int src_off_x, src_off_y, dst_off_x, dst_off_y;
PixmapPtr pSrcPix, pDstPix;
struct _Pixmap srcScratch;
xDst += pDst->pDrawable->x;
yDst += pDst->pDrawable->y;
xSrc += pSrc->pDrawable->x;
ySrc += pSrc->pDrawable->y;
if (!miComputeCompositeRegion (&region, pSrc, NULL, pDst,
xSrc, ySrc, 0, 0, xDst, yDst,
width, height))
return 1;
if (pSrc->pDrawable->type == DRAWABLE_PIXMAP)
kaaPixmapUseScreen ((PixmapPtr) pSrc->pDrawable);
if (pDst->pDrawable->type == DRAWABLE_PIXMAP)
kaaPixmapUseScreen ((PixmapPtr) pDst->pDrawable);
pSrcPix = kaaGetOffscreenPixmap (pSrc->pDrawable, &src_off_x, &src_off_y);
pDstPix = kaaGetOffscreenPixmap (pDst->pDrawable, &dst_off_x, &dst_off_y);
if (!pDstPix) {
REGION_UNINIT(pDst->pDrawable->pScreen, &region);
return 0;
}
if (!pSrcPix && pKaaScr->info->UploadToScratch) {
if ((*pKaaScr->info->UploadToScratch) ((PixmapPtr) pSrc->pDrawable,
&srcScratch))
pSrcPix = &srcScratch;
}
if (!pSrcPix) {
REGION_UNINIT(pDst->pDrawable->pScreen, &region);
return 0;
}
if (!(*pKaaScr->info->PrepareBlend) (op, pSrc, pDst, pSrcPix,
pDstPix))
{
REGION_UNINIT(pDst->pDrawable->pScreen, &region);
return -1;
}
nbox = REGION_NUM_RECTS(&region);
pbox = REGION_RECTS(&region);
xSrc -= xDst;
ySrc -= yDst;
while (nbox--)
{
(*pKaaScr->info->Blend) (pbox->x1 + xSrc + src_off_x,
pbox->y1 + ySrc + src_off_y,
pbox->x1 + dst_off_x,
pbox->y1 + dst_off_y,
pbox->x2 - pbox->x1,
pbox->y2 - pbox->y1);
pbox++;
}
(*pKaaScr->info->DoneBlend) ();
kaaMarkSync (pDst->pDrawable->pScreen);
kaaDrawableDirty (pDst->pDrawable);
REGION_UNINIT(pDst->pDrawable->pScreen, &region);
return 1;
}
static int
kaaTryDriverComposite(CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
PicturePtr pDst,
INT16 xSrc,
INT16 ySrc,
INT16 xMask,
INT16 yMask,
INT16 xDst,
INT16 yDst,
CARD16 width,
CARD16 height)
{
KaaScreenPriv (pDst->pDrawable->pScreen);
RegionRec region;
BoxPtr pbox;
int nbox;
int src_off_x, src_off_y, mask_off_x, mask_off_y, dst_off_x, dst_off_y;
PixmapPtr pSrcPix, pMaskPix = NULL, pDstPix;
struct _Pixmap scratch;
xDst += pDst->pDrawable->x;
yDst += pDst->pDrawable->y;
if (pMask) {
xMask += pMask->pDrawable->x;
yMask += pMask->pDrawable->y;
}
xSrc += pSrc->pDrawable->x;
ySrc += pSrc->pDrawable->y;
if (!miComputeCompositeRegion (&region, pSrc, pMask, pDst,
xSrc, ySrc, xMask, yMask, xDst, yDst,
width, height))
return 1;
if (pKaaScr->info->CheckComposite &&
!(*pKaaScr->info->CheckComposite) (op, pSrc, pMask, pDst))
{
REGION_UNINIT(pDst->pDrawable->pScreen, &region);
return -1;
}
if (pSrc->pDrawable->type == DRAWABLE_PIXMAP)
kaaPixmapUseScreen ((PixmapPtr) pSrc->pDrawable);
if (pMask && pMask->pDrawable->type == DRAWABLE_PIXMAP)
kaaPixmapUseScreen ((PixmapPtr) pMask->pDrawable);
if (pDst->pDrawable->type == DRAWABLE_PIXMAP)
kaaPixmapUseScreen ((PixmapPtr) pDst->pDrawable);
pSrcPix = kaaGetOffscreenPixmap (pSrc->pDrawable, &src_off_x, &src_off_y);
if (pMask)
pMaskPix = kaaGetOffscreenPixmap (pMask->pDrawable, &mask_off_x,
&mask_off_y);
pDstPix = kaaGetOffscreenPixmap (pDst->pDrawable, &dst_off_x, &dst_off_y);
if (!pDstPix) {
REGION_UNINIT(pDst->pDrawable->pScreen, &region);
return 0;
}
if (!pSrcPix && (!pMask || pMaskPix) && pKaaScr->info->UploadToScratch) {
if (pSrc->pDrawable->type == DRAWABLE_WINDOW)
pSrcPix = (*pSrc->pDrawable->pScreen->GetWindowPixmap) (
(WindowPtr) pSrc->pDrawable);
else
pSrcPix = (PixmapPtr) pSrc->pDrawable;
if ((*pKaaScr->info->UploadToScratch) (pSrcPix, &scratch))
pSrcPix = &scratch;
} else if (pSrcPix && pMask && !pMaskPix && pKaaScr->info->UploadToScratch) {
if (pMask->pDrawable->type == DRAWABLE_WINDOW)
pMaskPix = (*pMask->pDrawable->pScreen->GetWindowPixmap) (
(WindowPtr) pMask->pDrawable);
else
pMaskPix = (PixmapPtr) pMask->pDrawable;
if ((*pKaaScr->info->UploadToScratch) (pMaskPix, &scratch))
pMaskPix = &scratch;
}
if (!pSrcPix || (pMask && !pMaskPix)) {
REGION_UNINIT(pDst->pDrawable->pScreen, &region);
return 0;
}
if (!(*pKaaScr->info->PrepareComposite) (op, pSrc, pMask, pDst, pSrcPix,
pMaskPix, pDstPix))
{
REGION_UNINIT(pDst->pDrawable->pScreen, &region);
return -1;
}
nbox = REGION_NUM_RECTS(&region);
pbox = REGION_RECTS(&region);
xMask -= xDst;
yMask -= yDst;
xSrc -= xDst;
ySrc -= yDst;
while (nbox--)
{
(*pKaaScr->info->Composite) (pbox->x1 + xSrc + src_off_x,
pbox->y1 + ySrc + src_off_y,
pbox->x1 + xMask + mask_off_x,
pbox->y1 + yMask + mask_off_y,
pbox->x1 + dst_off_x,
pbox->y1 + dst_off_y,
pbox->x2 - pbox->x1,
pbox->y2 - pbox->y1);
pbox++;
}
(*pKaaScr->info->DoneComposite) ();
kaaMarkSync (pDst->pDrawable->pScreen);
kaaDrawableDirty (pDst->pDrawable);
REGION_UNINIT(pDst->pDrawable->pScreen, &region);
return 1;
}
void
kaaComposite(CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
PicturePtr pDst,
INT16 xSrc,
INT16 ySrc,
INT16 xMask,
INT16 yMask,
INT16 xDst,
INT16 yDst,
CARD16 width,
CARD16 height)
{
KdScreenPriv (pDst->pDrawable->pScreen);
KaaScreenPriv (pDst->pDrawable->pScreen);
int ret = -1;
if (!pMask && pSrc->pDrawable)
{
if (op == PictOpSrc)
{
if (pScreenPriv->enabled && pSrc->pDrawable && pSrc->pDrawable->width == 1 &&
pSrc->pDrawable->height == 1 && pSrc->repeat)
{
ret = kaaTryDriverSolidFill(pSrc, pDst, xSrc, ySrc, xDst, yDst,
width, height);
if (ret == 1)
return;
}
else if (!pSrc->repeat && !pSrc->transform &&
pSrc->format == pDst->format)
{
RegionRec region;
xDst += pDst->pDrawable->x;
yDst += pDst->pDrawable->y;
xSrc += pSrc->pDrawable->x;
ySrc += pSrc->pDrawable->y;
if (!miComputeCompositeRegion (&region, pSrc, pMask, pDst,
xSrc, ySrc, xMask, yMask, xDst,
yDst, width, height))
return;
kaaCopyNtoN (pSrc->pDrawable, pDst->pDrawable, 0,
REGION_RECTS(&region), REGION_NUM_RECTS(&region),
xSrc - xDst, ySrc - yDst,
FALSE, FALSE, 0, 0);
return;
}
}
if (pScreenPriv->enabled && pKaaScr->info->PrepareBlend &&
!pSrc->alphaMap && !pDst->alphaMap)
{
ret = kaaTryDriverBlend(op, pSrc, pDst, xSrc, ySrc, xDst, yDst,
width, height);
if (ret == 1)
return;
}
}
if (pSrc->pDrawable && (!pMask || pMask->pDrawable) &&
pScreenPriv->enabled && pKaaScr->info->PrepareComposite &&
!pSrc->alphaMap && (!pMask || !pMask->alphaMap) && !pDst->alphaMap)
{
ret = kaaTryDriverComposite(op, pSrc, pMask, pDst, xSrc, ySrc, xMask,
yMask, xDst, yDst, width, height);
if (ret == 1)
return;
}
if (ret != 0) {
/* failure to accelerate was not due to pixmaps being in the wrong
* locations.
*/
if (pSrc->pDrawable->type == DRAWABLE_PIXMAP)
kaaPixmapUseMemory ((PixmapPtr) pSrc->pDrawable);
if (pMask && pMask->pDrawable->type == DRAWABLE_PIXMAP)
kaaPixmapUseMemory ((PixmapPtr) pMask->pDrawable);
if (pDst->pDrawable->type == DRAWABLE_PIXMAP)
kaaPixmapUseMemory ((PixmapPtr) pDst->pDrawable);
}
#if KAA_DEBUG_FALLBACKS
kaaPrintCompositeFallback (op, pSrc, pMask, pDst);
#endif
KdCheckComposite (op, pSrc, pMask, pDst, xSrc, ySrc,
xMask, yMask, xDst, yDst, width, height);
}
#endif
static xFixed
miLineFixedX (xLineFixed *l, xFixed y, Bool ceil)
{
xFixed dx = l->p2.x - l->p1.x;
xFixed_32_32 ex = (xFixed_32_32) (y - l->p1.y) * dx;
xFixed dy = l->p2.y - l->p1.y;
if (ceil)
ex += (dy - 1);
return l->p1.x + (xFixed) (ex / dy);
}
/* Need to decide just how much to trim, to maintain translation independence
* when converted to floating point.
*/
#define XFIXED_TO_FLOAT(x) (((float)((x) & 0xffffff00)) / 65536.0)
/* This is just to allow us to work on the hardware side of the problem while
* waiting for cairo to get a new tesselator. We may not be able to support
* RasterizeTrapezoid at all due to the abutting edges requirement, but it might
* be technically legal if we widened the trap by some epsilon, so that alpha
* values at abutting edges were a little too big and capped at one, rather than
* a little too small and looked bad.
*/
void kaaRasterizeTrapezoid(PicturePtr pDst,
xTrapezoid *trap,
int xoff,
int yoff)
{
KdScreenPriv (pDst->pDrawable->pScreen);
KaaScreenPriv (pDst->pDrawable->pScreen);
KaaTrapezoid ktrap;
PixmapPtr pPix;
xFixed x1, x2;
if (!pScreenPriv->enabled ||
!pKaaScr->info->PrepareTrapezoids ||
pDst->pDrawable->type != DRAWABLE_PIXMAP ||
pDst->alphaMap || pDst->format != PICT_a8)
{
KdCheckRasterizeTrapezoid (pDst, trap, xoff, yoff);
#if KAA_DEBUG_FALLBACKS
kaaPrintTrapezoidFallback (pDst);
#endif
return;
}
pPix = (PixmapPtr)pDst->pDrawable;
kaaPixmapUseScreen (pPix);
if (!kaaPixmapIsOffscreen (pPix) ||
!(*pKaaScr->info->PrepareTrapezoids) (pDst, pPix))
{
#if KAA_DEBUG_FALLBACKS
kaaPrintTrapezoidFallback (pDst);
#endif
KdCheckRasterizeTrapezoid (pDst, trap, xoff, yoff);
return;
}
ktrap.ty = XFIXED_TO_FLOAT(trap->top) + yoff;
x1 = miLineFixedX (&trap->left, trap->top, FALSE);
x2 = miLineFixedX (&trap->right, trap->top, TRUE);
ktrap.tl = XFIXED_TO_FLOAT(x1) + xoff;
ktrap.tr = XFIXED_TO_FLOAT(x2) + xoff;
ktrap.by = XFIXED_TO_FLOAT(trap->bottom) + yoff;
x1 = miLineFixedX (&trap->left, trap->bottom, FALSE);
x2 = miLineFixedX (&trap->right, trap->bottom, TRUE);
ktrap.bl = XFIXED_TO_FLOAT(x1) + xoff;
ktrap.br = XFIXED_TO_FLOAT(x2) + xoff;
(*pKaaScr->info->Trapezoids) (&ktrap, 1);
(*pKaaScr->info->DoneTrapezoids) ();
}
void
kaaInitTrapOffsets(int grid_order, float *x_offsets, float *y_offsets,
float x_offset, float y_offset)
{
int i = 0;
float x, y, x_count, y_count;
x_count = (1 << (grid_order / 2)) + 1;
y_count = (1 << (grid_order / 2)) - 1;
x_offset += 1.0 / x_count / 2.0;
y_offset += 1.0 / y_count / 2.0;
for (x = 0; x < x_count; x++) {
for (y = 0; y < y_count; y++) {
x_offsets[i] = x / x_count + x_offset;
y_offsets[i] = y / y_count + y_offset;
i++;
}
}
}

View file

@ -1,341 +0,0 @@
/*
* Copyright © 1999 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include <kdrive-config.h>
#endif
#include "kdrive.h"
#include "kaa.h"
#include "picturestr.h"
#include "mipict.h"
#include "fbpict.h"
/*
* These functions wrap the low-level fb rendering functions and
* synchronize framebuffer/accelerated drawing by stalling until
* the accelerator is idle
*/
void
KdCheckFillSpans (DrawablePtr pDrawable, GCPtr pGC, int nspans,
DDXPointPtr ppt, int *pwidth, int fSorted)
{
kaaWaitSync (pDrawable->pScreen);
kaaDrawableDirty (pDrawable);
fbFillSpans (pDrawable, pGC, nspans, ppt, pwidth, fSorted);
}
void
KdCheckSetSpans (DrawablePtr pDrawable, GCPtr pGC, char *psrc,
DDXPointPtr ppt, int *pwidth, int nspans, int fSorted)
{
kaaWaitSync (pDrawable->pScreen);
kaaDrawableDirty (pDrawable);
fbSetSpans (pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted);
}
void
KdCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth,
int x, int y, int w, int h, int leftPad, int format,
char *bits)
{
kaaWaitSync (pDrawable->pScreen);
kaaDrawableDirty (pDrawable);
fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits);
}
RegionPtr
KdCheckCopyArea (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
int srcx, int srcy, int w, int h, int dstx, int dsty)
{
kaaWaitSync (pSrc->pScreen);
kaaDrawableDirty (pDst);
return fbCopyArea (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty);
}
RegionPtr
KdCheckCopyPlane (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
int srcx, int srcy, int w, int h, int dstx, int dsty,
unsigned long bitPlane)
{
kaaWaitSync (pSrc->pScreen);
kaaDrawableDirty (pDst);
return fbCopyPlane (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty,
bitPlane);
}
void
KdCheckPolyPoint (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
DDXPointPtr pptInit)
{
kaaWaitSync (pDrawable->pScreen);
kaaDrawableDirty (pDrawable);
fbPolyPoint (pDrawable, pGC, mode, npt, pptInit);
}
void
KdCheckPolylines (DrawablePtr pDrawable, GCPtr pGC,
int mode, int npt, DDXPointPtr ppt)
{
if (pGC->lineWidth == 0) {
kaaWaitSync(pDrawable->pScreen);
kaaDrawableDirty (pDrawable);
}
kaaDrawableDirty (pDrawable);
fbPolyLine (pDrawable, pGC, mode, npt, ppt);
}
void
KdCheckPolySegment (DrawablePtr pDrawable, GCPtr pGC,
int nsegInit, xSegment *pSegInit)
{
if (pGC->lineWidth == 0) {
kaaWaitSync(pDrawable->pScreen);
kaaDrawableDirty (pDrawable);
}
kaaDrawableDirty (pDrawable);
fbPolySegment (pDrawable, pGC, nsegInit, pSegInit);
}
void
KdCheckPolyRectangle (DrawablePtr pDrawable, GCPtr pGC,
int nrects, xRectangle *prect)
{
if (pGC->lineWidth == 0) {
kaaWaitSync(pDrawable->pScreen);
kaaDrawableDirty (pDrawable);
}
fbPolyRectangle (pDrawable, pGC, nrects, prect);
}
void
KdCheckPolyArc (DrawablePtr pDrawable, GCPtr pGC,
int narcs, xArc *pArcs)
{
if (pGC->lineWidth == 0)
{
kaaWaitSync(pDrawable->pScreen);
kaaDrawableDirty (pDrawable);
fbPolyArc (pDrawable, pGC, narcs, pArcs);
}
else
miPolyArc (pDrawable, pGC, narcs, pArcs);
}
#if 0
void
KdCheckFillPolygon (DrawablePtr pDrawable, GCPtr pGC,
int shape, int mode, int count, DDXPointPtr pPts)
{
kaaWaitSync(pDrawable->pScreen);
kaaDrawableDirty (pDrawable);
fbFillPolygon (pDrawable, pGC, mode, count, pPts);
}
#endif
void
KdCheckPolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
int nrect, xRectangle *prect)
{
kaaWaitSync(pDrawable->pScreen);
kaaDrawableDirty (pDrawable);
fbPolyFillRect (pDrawable, pGC, nrect, prect);
}
void
KdCheckPolyFillArc (DrawablePtr pDrawable, GCPtr pGC,
int narcs, xArc *pArcs)
{
kaaWaitSync(pDrawable->pScreen);
kaaDrawableDirty (pDrawable);
fbPolyFillArc (pDrawable, pGC, narcs, pArcs);
}
void
KdCheckImageGlyphBlt (DrawablePtr pDrawable, GCPtr pGC,
int x, int y, unsigned int nglyph,
CharInfoPtr *ppci, pointer pglyphBase)
{
kaaWaitSync(pDrawable->pScreen);
kaaDrawableDirty (pDrawable);
fbImageGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
}
void
KdCheckPolyGlyphBlt (DrawablePtr pDrawable, GCPtr pGC,
int x, int y, unsigned int nglyph,
CharInfoPtr *ppci, pointer pglyphBase)
{
kaaWaitSync(pDrawable->pScreen);
kaaDrawableDirty (pDrawable);
fbPolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
}
void
KdCheckPushPixels (GCPtr pGC, PixmapPtr pBitmap,
DrawablePtr pDrawable,
int w, int h, int x, int y)
{
kaaWaitSync(pDrawable->pScreen);
kaaDrawableDirty (pDrawable);
fbPushPixels (pGC, pBitmap, pDrawable, w, h, x, y);
}
void
KdCheckGetImage (DrawablePtr pDrawable,
int x, int y, int w, int h,
unsigned int format, unsigned long planeMask,
char *d)
{
kaaWaitSync(pDrawable->pScreen);
fbGetImage (pDrawable, x, y, w, h, format, planeMask, d);
}
void
KdCheckGetSpans (DrawablePtr pDrawable,
int wMax,
DDXPointPtr ppt,
int *pwidth,
int nspans,
char *pdstStart)
{
kaaWaitSync(pDrawable->pScreen);
fbGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
}
void
KdCheckCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
{
kaaWaitSync (pWin->drawable.pScreen);
kaaDrawableDirty ((DrawablePtr)pWin);
fbCopyWindow (pWin, ptOldOrg, prgnSrc);
}
#if KD_MAX_FB > 1
void
KdCheckPaintKey(DrawablePtr pDrawable,
RegionPtr pRegion,
CARD32 pixel,
int layer)
{
kaaWaitSync (pDrawable->pScreen);
kaaDrawableDirty (pDrawable);
fbOverlayPaintKey (pDrawable, pRegion, pixel, layer);
}
void
KdCheckOverlayCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
{
kaaWaitSync (pWin->drawable.pScreen);
kaaDrawableDirty ((DrawablePtr)pWin);
fbOverlayCopyWindow (pWin, ptOldOrg, prgnSrc);
}
#endif
void
KdScreenInitAsync (ScreenPtr pScreen)
{
pScreen->GetImage = KdCheckGetImage;
pScreen->GetSpans = KdCheckGetSpans;
pScreen->CopyWindow = KdCheckCopyWindow;
#ifdef RENDER
KdPictureInitAsync (pScreen);
#endif
}
void
KdCheckComposite (CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
PicturePtr pDst,
INT16 xSrc,
INT16 ySrc,
INT16 xMask,
INT16 yMask,
INT16 xDst,
INT16 yDst,
CARD16 width,
CARD16 height)
{
kaaWaitSync (pDst->pDrawable->pScreen);
kaaDrawableDirty (pDst->pDrawable);
fbComposite (op,
pSrc,
pMask,
pDst,
xSrc,
ySrc,
xMask,
yMask,
xDst,
yDst,
width,
height);
}
void
KdCheckRasterizeTrapezoid(PicturePtr pMask,
xTrapezoid *trap,
int x_off,
int y_off)
{
kaaWaitSync (pMask->pDrawable->pScreen);
kaaDrawableDirty (pMask->pDrawable);
fbRasterizeTrapezoid (pMask, trap, x_off, y_off);
}
/*
* Only need to stall for copyarea/copyplane
*/
const GCOps kdAsyncPixmapGCOps = {
fbFillSpans,
fbSetSpans,
fbPutImage,
KdCheckCopyArea,
KdCheckCopyPlane,
fbPolyPoint,
fbPolyLine,
fbPolySegment,
fbPolyRectangle,
fbPolyArc,
fbFillPolygon,
fbPolyFillRect,
fbPolyFillArc,
miPolyText8,
miPolyText16,
miImageText8,
miImageText16,
fbImageGlyphBlt,
fbPolyGlyphBlt,
fbPushPixels
};
void
KdPictureInitAsync (ScreenPtr pScreen)
{
PictureScreenPtr ps;
ps = GetPictureScreen(pScreen);
ps->Composite = KdCheckComposite;
ps->RasterizeTrapezoid = KdCheckRasterizeTrapezoid;
}

View file

@ -515,119 +515,6 @@ extern KdOsFuncs *kdOsFuncs;
dixSetPrivate(&(pScreen)->devPrivates, kdScreenPrivateKey, v)
#define KdScreenPriv(pScreen) KdPrivScreenPtr pScreenPriv = KdGetScreenPriv(pScreen)
/* kaa.c */
Bool
kaaDrawInit (ScreenPtr pScreen,
KaaScreenInfoPtr pScreenInfo);
void
kaaDrawFini (ScreenPtr pScreen);
void
kaaWrapGC (GCPtr pGC);
void
kaaUnwrapGC (GCPtr pGC);
/* kasync.c */
void
KdCheckFillSpans (DrawablePtr pDrawable, GCPtr pGC, int nspans,
DDXPointPtr ppt, int *pwidth, int fSorted);
void
KdCheckSetSpans (DrawablePtr pDrawable, GCPtr pGC, char *psrc,
DDXPointPtr ppt, int *pwidth, int nspans, int fSorted);
void
KdCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth,
int x, int y, int w, int h, int leftPad, int format,
char *bits);
RegionPtr
KdCheckCopyArea (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
int srcx, int srcy, int w, int h, int dstx, int dsty);
RegionPtr
KdCheckCopyPlane (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
int srcx, int srcy, int w, int h, int dstx, int dsty,
unsigned long bitPlane);
void
KdCheckPolyPoint (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
DDXPointPtr pptInit);
void
KdCheckPolylines (DrawablePtr pDrawable, GCPtr pGC,
int mode, int npt, DDXPointPtr ppt);
void
KdCheckPolySegment (DrawablePtr pDrawable, GCPtr pGC,
int nsegInit, xSegment *pSegInit);
void
KdCheckPolyRectangle (DrawablePtr pDrawable, GCPtr pGC,
int nrects, xRectangle *prect);
void
KdCheckPolyArc (DrawablePtr pDrawable, GCPtr pGC,
int narcs, xArc *pArcs);
#define KdCheckFillPolygon miFillPolygon
void
KdCheckPolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
int nrect, xRectangle *prect);
void
KdCheckPolyFillArc (DrawablePtr pDrawable, GCPtr pGC,
int narcs, xArc *pArcs);
void
KdCheckImageGlyphBlt (DrawablePtr pDrawable, GCPtr pGC,
int x, int y, unsigned int nglyph,
CharInfoPtr *ppci, pointer pglyphBase);
void
KdCheckPolyGlyphBlt (DrawablePtr pDrawable, GCPtr pGC,
int x, int y, unsigned int nglyph,
CharInfoPtr *ppci, pointer pglyphBase);
void
KdCheckPushPixels (GCPtr pGC, PixmapPtr pBitmap,
DrawablePtr pDrawable,
int w, int h, int x, int y);
void
KdCheckGetImage (DrawablePtr pDrawable,
int x, int y, int w, int h,
unsigned int format, unsigned long planeMask,
char *d);
void
KdCheckGetSpans (DrawablePtr pDrawable,
int wMax,
DDXPointPtr ppt,
int *pwidth,
int nspans,
char *pdstStart);
void
KdCheckCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
void
KdCheckPaintKey(DrawablePtr pDrawable,
RegionPtr pRegion,
CARD32 pixel,
int layer);
void
KdCheckOverlayCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
void
KdScreenInitAsync (ScreenPtr pScreen);
extern const GCOps kdAsyncPixmapGCOps;
/* knoop.c */
extern GCOps kdNoopOps;
@ -921,32 +808,6 @@ KdRandRGetTiming (ScreenPtr pScreen,
RRScreenSizePtr pSize);
#endif
/* kpict.c */
void
KdPictureInitAsync (ScreenPtr pScreen);
#ifdef RENDER
void
KdCheckComposite (CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
PicturePtr pDst,
INT16 xSrc,
INT16 ySrc,
INT16 xMask,
INT16 yMask,
INT16 xDst,
INT16 yDst,
CARD16 width,
CARD16 height);
void
KdCheckRasterizeTrapezoid(PicturePtr pMask,
xTrapezoid *trap,
int x_off,
int y_off);
#endif
/* kshadow.c */
Bool
KdShadowFbAlloc (KdScreenInfo *screen, int fb, Bool rotate);
@ -981,9 +842,6 @@ KdOffscreenAlloc (ScreenPtr pScreen, int size, int align,
KdOffscreenArea *
KdOffscreenFree (ScreenPtr pScreen, KdOffscreenArea *area);
void
KdOffscreenMarkUsed (PixmapPtr pPixmap);
void
KdOffscreenSwapOut (ScreenPtr pScreen);

View file

@ -24,7 +24,6 @@
#include <kdrive-config.h>
#endif
#include "kdrive.h"
#include "kaa.h"
#define DEBUG_OFFSCREEN 0
#if DEBUG_OFFSCREEN
@ -310,29 +309,6 @@ KdOffscreenFree (ScreenPtr pScreen, KdOffscreenArea *area)
return area;
}
void
KdOffscreenMarkUsed (PixmapPtr pPixmap)
{
KaaPixmapPriv (pPixmap);
KdScreenPriv (pPixmap->drawable.pScreen);
static int iter = 0;
if (!pKaaPixmap->area)
return;
/* The numbers here are arbitrary. We may want to tune these. */
pKaaPixmap->area->score += 100;
if (++iter == 10) {
KdOffscreenArea *area;
for (area = pScreenPriv->off_screen_areas; area != NULL;
area = area->next)
{
if (area->state == KdOffscreenRemovable)
area->score = (area->score * 7) / 8;
}
}
}
Bool
KdOffscreenInit (ScreenPtr pScreen)
{

View file

@ -27,5 +27,7 @@ Xvesa_DEPENDENCIES = \
libvesa.a \
@KDRIVE_LOCAL_LIBS@
Xvesa_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
relink:
rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS)

View file

@ -26,6 +26,7 @@ XVFB_LIBS = \
Xvfb_LDADD = $(XVFB_LIBS) $(XVFB_SYS_LIBS) $(XSERVER_SYS_LIBS)
Xvfb_DEPENDENCIES = $(XVFB_LIBS)
Xvfb_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
# Man page
include $(top_srcdir)/cpprules.in

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__) || defined(__x86_64__))
# elif defined(linux) && defined(__amd64__)
# include <inttypes.h>

View file

@ -7,18 +7,12 @@
# 832x624 @ 75Hz (74.55Hz) (fix if the official/Apple spec is different) hsync: 49.725kHz
ModeLine "832x624" 57.284 832 864 928 1152 624 625 628 667 -Hsync -Vsync
# 1152x768 @ 54.8Hz (Titanium PowerBook) hsync: 44.2kHz
ModeLine "1152x768" 64.995 1152 1178 1314 1472 768 771 777 806 +hsync +vsync
# 1400x1050 @ 60Hz (VESA GTF) hsync: 65.5kHz
ModeLine "1400x1050" 122.0 1400 1488 1640 1880 1050 1052 1064 1082 +hsync +vsync
# 1400x1050 @ 75Hz (VESA GTF) hsync: 82.2kHz
ModeLine "1400x1050" 155.8 1400 1464 1784 1912 1050 1052 1064 1090 +hsync +vsync
# 1600x1024 @ 60Hz (SGI 1600SW) hsync: 64.0kHz
Modeline "1600x1024" 106.910 1600 1620 1640 1670 1024 1027 1030 1067 -hsync -vsync
# 1920x1440 @ 85Hz (VESA GTF) hsync: 128.5kHz
Modeline "1920x1440" 341.35 1920 2072 2288 2656 1440 1441 1444 1512 -hsync +vsync

View file

@ -340,7 +340,6 @@ Bool xf86IsUnblank(int mode);
_X_DEPRECATED void xf86AddModuleInfo(pointer info, pointer module);
_X_DEPRECATED void xf86DeleteModuleInfo(int idx);
void xf86getsecs(long *, long *);
/* xf86Debug.c */
#ifdef BUILDDEBUG

View file

@ -41,6 +41,11 @@
#include "xf86_OSlib.h"
#include "dirent.h"
#ifdef sun
# include <sys/visual_io.h>
# include <ctype.h>
#endif
/* Sections for the default built-in configuration. */
#define BUILTIN_DEVICE_NAME \
@ -79,11 +84,8 @@
static const char **builtinConfig = NULL;
static int builtinLines = 0;
static const char *deviceList[] = {
"fbdev",
"vesa",
NULL
};
static void listPossibleVideoDrivers(char *matches[], int nmatches);
/*
* A built-in config file is stored as an array of strings, with each string
@ -135,87 +137,91 @@ AppendToConfig(const char *s)
AppendToList(s, &builtinConfig, &builtinLines);
}
static const char *
videoPtrToDriverName(struct pci_device *dev)
static int
videoPtrToDriverList(struct pci_device *dev,
char *returnList[], int returnListMax)
{
/*
* things not handled yet:
* cyrix/nsc. should be merged into geode anyway.
* xgi.
*/
int i;
/* Add more entries here if we ever return more than 4 drivers for
any device */
char *driverList[5] = { NULL, NULL, NULL, NULL, NULL };
switch (dev->vendor_id)
{
case 0x1022:
if (dev->device_id == 0x2081)
return "geode";
else
return NULL;
case 0x1142: return "apm";
case 0xedd8: return "ark";
case 0x1a03: return "ast";
case 0x1002: return "ati";
case 0x102c: return "chips";
case 0x1013: return "cirrus";
if (dev->device_id == 0x2081) {
driverList[0] = "geode";
driverList[1] = "amd";
}
break;
case 0x1142: driverList[0] = "apm"; break;
case 0xedd8: driverList[0] = "ark"; break;
case 0x1a03: driverList[0] = "ast"; break;
case 0x1002: driverList[0] = "ati"; break;
case 0x102c: driverList[0] = "chips"; break;
case 0x1013: driverList[0] = "cirrus"; break;
case 0x8086:
if ((dev->device_id == 0x00d1) || (dev->device_id == 0x7800))
return "i740";
else return "intel";
case 0x102b: return "mga";
case 0x10c8: return "neomagic";
case 0x105d: return "i128";
case 0x10de: case 0x12d2: return "nv";
case 0x1163: return "rendition";
if ((dev->device_id == 0x00d1) || (dev->device_id == 0x7800)) {
driverList[0] = "i740";
} else {
driverList[0] = "intel";
driverList[1] = "i810";
}
break;
case 0x102b: driverList[0] = "mga"; break;
case 0x10c8: driverList[0] = "neomagic"; break;
case 0x105d: driverList[0] = "i128"; break;
case 0x10de: case 0x12d2: driverList[0] = "nv"; break;
case 0x1163: driverList[0] = "rendition"; break;
case 0x5333:
switch (dev->device_id)
{
case 0x88d0: case 0x88d1: case 0x88f0: case 0x8811:
case 0x8812: case 0x8814: case 0x8901:
return "s3";
driverList[0] = "s3"; break;
case 0x5631: case 0x883d: case 0x8a01: case 0x8a10:
case 0x8c01: case 0x8c03: case 0x8904: case 0x8a13:
return "s3virge";
driverList[0] = "s3virge"; break;
default:
return "savage";
driverList[0] = "savage"; break;
}
case 0x1039: return "sis";
case 0x126f: return "siliconmotion";
break;
case 0x1039: driverList[0] = "sis"; break;
case 0x126f: driverList[0] = "siliconmotion"; break;
case 0x121a:
if (dev->device_id < 0x0003)
return "voodoo";
driverList[0] = "voodoo";
else
return "tdfx";
case 0x3d3d: return "glint";
case 0x1023: return "trident";
case 0x100c: return "tseng";
case 0x1106: return "openchrome";
case 0x15ad: return "vmware";
driverList[0] = "tdfx";
break;
case 0x3d3d: driverList[0] = "glint"; break;
case 0x1023: driverList[0] = "trident"; break;
case 0x100c: driverList[0] = "tseng"; break;
case 0x1106: driverList[0] = "openchrome"; break;
case 0x15ad: driverList[0] = "vmware"; break;
default: break;
}
return NULL;
for (i = 0; (i < returnListMax) && (driverList[i] != NULL); i++) {
returnList[i] = xnfstrdup(driverList[i]);
}
return i; /* Number of entries added */
}
Bool
xf86AutoConfig(void)
{
const char **p;
char *deviceList[20];
char **p;
const char **cp;
char buf[1024];
const char *driver = NULL;
ConfigStatus ret;
driver = chooseVideoDriver();
if (driver) {
snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION_PRE,
driver, 0, driver);
AppendToConfig(buf);
ErrorF("New driver is \"%s\"\n", driver);
buf[0] = '\t';
AppendToConfig(BUILTIN_DEVICE_SECTION_POST);
snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION,
driver, 0, driver, 0);
AppendToConfig(buf);
}
listPossibleVideoDrivers(deviceList, 20);
for (p = deviceList; *p; p++) {
snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION, *p, 0, *p);
@ -225,23 +231,23 @@ xf86AutoConfig(void)
}
AppendToConfig(BUILTIN_LAYOUT_SECTION_PRE);
if (driver) {
snprintf(buf, sizeof(buf), BUILTIN_LAYOUT_SCREEN_LINE, driver, 0);
AppendToConfig(buf);
}
for (p = deviceList; *p; p++) {
snprintf(buf, sizeof(buf), BUILTIN_LAYOUT_SCREEN_LINE, *p, 0);
AppendToConfig(buf);
}
AppendToConfig(BUILTIN_LAYOUT_SECTION_POST);
for (p = deviceList; *p; p++) {
xfree(*p);
}
xf86MsgVerb(X_DEFAULT, 0,
"Using default built-in configuration (%d lines)\n",
builtinLines);
xf86MsgVerb(X_DEFAULT, 3, "--- Start of built-in configuration ---\n");
for (p = builtinConfig; *p; p++)
xf86ErrorFVerb(3, "\t%s", *p);
for (cp = builtinConfig; *cp; cp++)
xf86ErrorFVerb(3, "\t%s", *cp);
xf86MsgVerb(X_DEFAULT, 3, "--- End of built-in configuration ---\n");
xf86setBuiltinConfig(builtinConfig);
@ -416,17 +422,51 @@ matchDriverFromFiles (char** matches, uint16_t match_vendor, uint16_t match_chip
}
#endif /* __linux__ */
char*
chooseVideoDriver(void)
static void
listPossibleVideoDrivers(char *matches[], int nmatches)
{
struct pci_device * info = NULL;
struct pci_device_iterator *iter;
char *chosen_driver = NULL;
int i;
char *matches[20]; /* If we have more than 20 drivers we're in trouble */
for (i=0 ; i<20 ; i++)
for (i = 0 ; i < nmatches ; i++) {
matches[i] = NULL;
}
i = 0;
#ifdef sun
/* Check for driver type based on /dev/fb type and if valid, use
it instead of PCI bus probe results */
if (xf86Info.consoleFd >= 0) {
struct vis_identifier visid;
const char *cp;
if (ioctl(xf86Info.consoleFd, VIS_GETIDENTIFIER, &visid) >= 0) {
xf86Msg(X_PROBED, "console driver: %s\n", visid.name);
/* Special case from before the general case was set */
if (strcmp(visid.name, "NVDAnvda") == 0) {
matches[i++] = xnfstrdup("nvidia");
}
/* General case - split into vendor name (initial all-caps
prefix) & driver name (rest of the string). */
if (strcmp(visid.name, "SUNWtext") != 0) {
for (cp = visid.name; (*cp != '\0') && isupper(*cp); cp++) {
/* find end of all uppercase vendor section */
}
if ((cp != visid.name) && (*cp != '\0')) {
char *driverName = xnfstrdup(cp);
char *vendorName = xnfstrdup(visid.name);
vendorName[cp - visid.name] = '\0';
matches[i++] = vendorName;
matches[i++] = driverName;
}
}
}
}
#endif
/* Find the primary device, and get some information about it. */
iter = pci_slot_match_iterator_create(NULL);
@ -447,31 +487,52 @@ chooseVideoDriver(void)
}
#endif /* __linux__ */
/* TODO Handle multiple drivers claiming to support the same PCI ID */
if (matches[0]) {
chosen_driver = matches[0];
} else {
if (info != NULL)
chosen_driver = videoPtrToDriverName(info);
if (chosen_driver == NULL) {
#if defined __i386__ || defined __amd64__ || defined __x86_64__ || defined __hurd__
chosen_driver = "vesa";
#elif defined __sparc__
chosen_driver = "sunffb";
#else
chosen_driver = "fbdev";
#endif
}
for (i = 0; (i < nmatches) && (matches[i]); i++) {
/* find end of matches list */
}
xf86Msg(X_DEFAULT, "Matched %s for the autoconfigured driver\n", chosen_driver);
if ((info != NULL) && (i < nmatches)) {
i += videoPtrToDriverList(info, &(matches[i]), nmatches - i);
}
i = 0;
while (matches[i]) {
/* Fallback to platform default hardware */
if (i < (nmatches - 1)) {
#if defined(__i386__) || defined(__amd64__) || defined(__hurd__)
matches[i++] = xnfstrdup("vesa");
#elif defined(__sparc__) && !defined(sun)
matches[i++] = xnfstrdup("sunffb");
#endif
}
/* Fallback to platform default frame buffer driver */
if (i < (nmatches - 1)) {
#if !defined(__linux__) && defined(__sparc__)
matches[i++] = xnfstrdup("wsfb");
#else
matches[i++] = xnfstrdup("fbdev");
#endif
}
}
char*
chooseVideoDriver(void)
{
char *chosen_driver = NULL;
int i;
char *matches[20]; /* If we have more than 20 drivers we're in trouble */
listPossibleVideoDrivers(matches, 20);
/* TODO Handle multiple drivers claiming to support the same PCI ID */
chosen_driver = matches[0];
xf86Msg(X_DEFAULT, "Matched %s for the autoconfigured driver\n",
chosen_driver);
for (i = 0; matches[i] ; i++) {
if (matches[i] != chosen_driver) {
xfree(matches[i]);
}
i++;
}
return chosen_driver;

View file

@ -121,7 +121,9 @@ static ModuleDefault ModuleDefaults[] = {
{.name = "record", .toLoad = TRUE, .load_opt=NULL},
#endif
{.name = "dri", .toLoad = TRUE, .load_opt=NULL},
#ifdef DRI2
{.name = "dri2", .toLoad = TRUE, .load_opt=NULL},
#endif
{.name = NULL, .toLoad = FALSE, .load_opt=NULL}
};
@ -305,7 +307,7 @@ xf86ModulelistFromConfig(pointer **optlist)
}
}
if (found == FALSE) {
XF86ConfModulePtr ptr = xf86configptr->conf_modules;
XF86LoadPtr ptr = (XF86LoadPtr)xf86configptr->conf_modules;
ptr = xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt);
xf86Msg(X_INFO, "\"%s\" will be loaded by default.\n", ModuleDefaults[i].name);
}
@ -314,7 +316,7 @@ xf86ModulelistFromConfig(pointer **optlist)
xf86configptr->conf_modules = xnfcalloc(1, sizeof(XF86ConfModuleRec));
for (i=0 ; ModuleDefaults[i].name != NULL ; i++) {
if (ModuleDefaults[i].toLoad == TRUE) {
XF86ConfModulePtr ptr = xf86configptr->conf_modules;
XF86LoadPtr ptr = (XF86LoadPtr)xf86configptr->conf_modules;
ptr = xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt);
}
}
@ -599,8 +601,9 @@ configFiles(XF86ConfFilesPtr fileconf)
pathFrom = X_CONFIG;
if (*f) {
if (xf86Info.useDefaultFontPath) {
char *g;
xf86Msg(X_DEFAULT, "Including the default font path %s.\n", defaultFontPath);
char *g = xnfalloc(strlen(defaultFontPath) + strlen(f) + 3);
g = xnfalloc(strlen(defaultFontPath) + strlen(f) + 3);
strcpy(g, f);
strcat(g, ",");
defaultFontPath = strcat(g, defaultFontPath);
@ -1084,9 +1087,9 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
}
#endif
xf86Info.allowEmptyInput = FALSE;
if (xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &value))
xf86Info.allowEmptyInput = TRUE;
/* AllowEmptyInput is automatically true if we're hotplugging */
xf86Info.allowEmptyInput = (xf86Info.autoAddDevices && xf86Info.autoEnableDevices);
xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &xf86Info.allowEmptyInput);
xf86Info.useDefaultFontPath = TRUE;
xf86Info.useDefaultFontPathFrom = X_DEFAULT;
@ -1233,8 +1236,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
* remove the core attribute from the later ones.
*/
for (devs = servlayoutp->inputs; devs && *devs; devs++) {
indp = *devs;
pointer opt1 = NULL, opt2 = NULL;
indp = *devs;
if (indp->commonOptions &&
xf86CheckBoolOption(indp->commonOptions, "CorePointer", FALSE)) {
opt1 = indp->commonOptions;
@ -1605,10 +1608,14 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
count++;
adjp = (XF86ConfAdjacencyPtr)adjp->list.next;
}
#ifdef DEBUG
ErrorF("Found %d screens in the layout section %s",
count, conf_layout->lay_identifier);
#endif
if (!count) /* alloc enough storage even if no screen is specified */
count = 1;
slp = xnfcalloc(1, (count + 1) * sizeof(screenLayoutRec));
slp[count].screen = NULL;
/*
@ -1663,6 +1670,20 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
adjp = (XF86ConfAdjacencyPtr)adjp->list.next;
}
/* No screen was specified in the layout. take the first one from the
* config file, or - if it is NULL - configScreen autogenerates one for
* us */
if (!count)
{
slp[0].screen = xnfcalloc(1, sizeof(confScreenRec));
if (!configScreen(slp[0].screen, xf86configptr->conf_screen_lst,
0, X_CONFIG)) {
xfree(slp[0].screen);
xfree(slp);
return FALSE;
}
}
/* XXX Need to tie down the upper left screen. */
/* Fill in the refscreen and top/bottom/left/right values */
@ -1853,9 +1874,7 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen)
indp = xnfalloc(sizeof(IDevPtr));
*indp = NULL;
servlayoutp->inputs = indp;
if (!xf86Info.allowEmptyInput && !checkCoreInputDevices(servlayoutp, TRUE))
return FALSE;
return TRUE;
}
@ -2040,6 +2059,7 @@ configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor)
XF86ConfModesLinkPtr modeslnk = conf_monitor->mon_modes_sect_lst;
Gamma zeros = {0.0, 0.0, 0.0};
float badgamma = 0.0;
double maxPixClock;
xf86Msg(X_CONFIG, "| |-->Monitor \"%s\"\n",
conf_monitor->mon_identifier);
@ -2174,8 +2194,11 @@ configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor)
xf86ProcessOptions(-1, monitorp->options, MonitorOptions);
xf86GetOptValBool(MonitorOptions, MON_REDUCEDBLANKING,
&monitorp->reducedblanking);
xf86GetOptValFreq(MonitorOptions, MON_MAX_PIX_CLOCK, OPTUNITS_KHZ,
&monitorp->maxPixClock);
if (xf86GetOptValFreq(MonitorOptions, MON_MAX_PIX_CLOCK, OPTUNITS_KHZ,
&maxPixClock) == TRUE) {
monitorp->maxPixClock = (int) maxPixClock;
}
return TRUE;
}
@ -2416,14 +2439,14 @@ configInput(IDevPtr inputp, XF86ConfInputPtr conf_input, MessageType from)
}
static Bool
modeIsPresent(char * modename,MonPtr monitorp)
modeIsPresent(DisplayModePtr mode, MonPtr monitorp)
{
DisplayModePtr knownmodes = monitorp->Modes;
/* all I can think of is a linear search... */
while(knownmodes != NULL)
{
if(!strcmp(modename,knownmodes->name) &&
if(!strcmp(mode->name, knownmodes->name) &&
!(knownmodes->type & M_T_DEFAULT))
return TRUE;
knownmodes = knownmodes->next;
@ -2454,6 +2477,12 @@ addDefaultModes(MonPtr monitorp)
return TRUE;
}
static void
checkInput(serverLayoutPtr layout) {
if (!xf86Info.allowEmptyInput)
checkCoreInputDevices(layout, FALSE);
}
/*
* load the config file and fill the global data structure
*/
@ -2574,6 +2603,8 @@ xf86HandleConfigFile(Bool autoconfig)
configDRI(xf86configptr->conf_dri);
#endif
checkInput(&xf86ConfigLayout);
/*
* Handle some command line options that can override some of the
* ServerFlags settings.

View file

@ -196,45 +196,6 @@ void
ProcessInputEvents ()
{
int x, y;
#ifdef INHERIT_LOCK_STATE
static int generation = 0;
#endif
/*
* With INHERIT_LOCK_STATE defined, the initial state of CapsLock, NumLock
* and ScrollLock will be set to match that of the VT the server is
* running on.
*/
#ifdef INHERIT_LOCK_STATE
if (generation != serverGeneration) {
xEvent kevent;
DevicePtr pKeyboard = xf86Info.pKeyboard;
extern unsigned int xf86InitialCaps, xf86InitialNum, xf86InitialScroll;
generation = serverGeneration;
kevent.u.keyButtonPointer.time = GetTimeInMillis();
kevent.u.keyButtonPointer.rootX = 0;
kevent.u.keyButtonPointer.rootY = 0;
kevent.u.u.type = KeyPress;
if (xf86InitialCaps) {
kevent.u.u.detail = xf86InitialCaps;
(* pKeyboard->processInputProc)(&kevent, (DeviceIntPtr)pKeyboard, 1);
xf86InitialCaps = 0;
}
if (xf86InitialNum) {
kevent.u.u.detail = xf86InitialNum;
(* pKeyboard->processInputProc)(&kevent, (DeviceIntPtr)pKeyboard, 1);
xf86InitialNum = 0;
}
if (xf86InitialScroll) {
kevent.u.u.detail = xf86InitialScroll;
(* pKeyboard->processInputProc)(&kevent, (DeviceIntPtr)pKeyboard, 1);
xf86InitialScroll = 0;
}
}
#endif
mieqProcessInputEvents();

View file

@ -2937,17 +2937,3 @@ xf86GetMotionEvents(DeviceIntPtr pDev, xTimecoord *buff, unsigned long start,
{
return GetMotionHistory(pDev, buff, start, stop, pScreen, core);
}
_X_EXPORT void
xf86getsecs(long * secs, long * usecs)
{
struct timeval tv;
X_GETTIMEOFDAY(&tv);
if (secs)
*secs = tv.tv_sec;
if (usecs)
*usecs= tv.tv_usec;
return;
}

View file

@ -472,6 +472,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
MessageType pix24From = X_DEFAULT;
Bool pix24Fail = FALSE;
Bool autoconfig = FALSE;
GDevPtr configured_device;
xf86Initialising = TRUE;
@ -555,7 +556,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
/* If there aren't any specified in the config file, autoconfig them */
/* FIXME: Does not handle multiple active screen sections, but I'm not
* sure if we really want to handle that case*/
GDevPtr configured_device = xf86ConfigLayout.screens->screen->device;
configured_device = xf86ConfigLayout.screens->screen->device;
if ((!configured_device) || (!configured_device->driver)) {
if (!autoConfigDevice(configured_device)) {
xf86Msg(X_ERROR, "Automatic driver configuration failed\n");

View file

@ -82,11 +82,11 @@ typedef enum {
* changed. The minor revision mask is 0x0000FFFF and the major revision
* mask is 0xFFFF0000.
*/
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 3)
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(4, 0)
#define ABI_XINPUT_VERSION SET_ABI_VERSION(3, 0)
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(1, 0)
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 5)
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(4, 1)
#define ABI_XINPUT_VERSION SET_ABI_VERSION(3, 1)
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(1, 1)
#define ABI_FONT_VERSION SET_ABI_VERSION(0, 6)
#define MODINFOSTRING1 0xef23fdc5
#define MODINFOSTRING2 0x10dc023a

View file

@ -163,8 +163,6 @@ void DoConfigure(void);
/* xf86Events.c */
void xf86PostKbdEvent(unsigned key);
void xf86PostMseEvent(DeviceIntPtr device, int buttons, int dx, int dy);
void xf86Wakeup(pointer blockData, int err, pointer pReadmask);
void xf86SigHandler(int signo);
void xf86HandlePMEvents(int fd, pointer data);

View file

@ -171,6 +171,25 @@ xf86RandRSetMode (ScreenPtr pScreen,
scrp->virtualX = mode->HDisplay;
scrp->virtualY = mode->VDisplay;
}
/*
* The DIX forgets the physical dimensions we passed into RRRegisterSize, so
* reconstruct them if possible.
*/
if(scrp->DriverFunc) {
xorgRRModeMM RRModeMM;
RRModeMM.mode = mode;
RRModeMM.virtX = scrp->virtualX;
RRModeMM.virtY = scrp->virtualY;
RRModeMM.mmWidth = mmWidth;
RRModeMM.mmHeight = mmHeight;
(*scrp->DriverFunc)(scrp, RR_GET_MODE_MM, &RRModeMM);
mmWidth = RRModeMM.mmWidth;
mmHeight = RRModeMM.mmHeight;
}
if(randrp->rotation & (RR_Rotate_90 | RR_Rotate_270))
{
/* If the screen is rotated 90 or 270 degrees, swap the sizes. */
@ -224,7 +243,7 @@ xf86RandRSetConfig (ScreenPtr pScreen,
Bool useVirtual = FALSE;
Rotation oldRotation = randrp->rotation;
miPointerPosition (&px, &py);
miPointerGetPosition(inputInfo.pointer, &px, &py);
for (mode = scrp->modes; ; mode = mode->next)
{
if (mode->HDisplay == pSize->width &&

View file

@ -131,7 +131,7 @@ xf86ProcessCommonOptions(LocalDevicePtr local,
local->history_size = GetMotionHistorySize();
/* Preallocate xEvent store */
if (!xf86Events)
xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum());
GetEventList(&xf86Events);
if (!xf86Events)
FatalError("Couldn't allocate event store\n");
}
@ -467,7 +467,6 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev)
LocalDevicePtr pInfo = (LocalDevicePtr) pDev->public.devicePrivate;
InputDriverPtr drv;
IDevRec *idev;
BOOL found;
IDevPtr *it;
if (pInfo) /* need to get these before RemoveDevice */

View file

@ -531,6 +531,9 @@ struct detailed_monitor_section {
} section; /* max: 80 */
};
/* flags */
#define EDID_COMPLETE_RAWDATA 0x1
typedef struct {
int scrnIndex;
struct vendor vendor;
@ -539,7 +542,7 @@ typedef struct {
struct established_timings timings1;
struct std_timings timings2[8];
struct detailed_monitor_section det_mon[4];
void *vdif; /* unused */
unsigned long flags;
int no_sections;
Uchar *rawData;
} xf86Monitor, *xf86MonPtr;

View file

@ -118,6 +118,20 @@ xf86InterpretEDID(int scrnIndex, Uchar *block)
return NULL;
}
xf86MonPtr
xf86InterpretEEDID(int scrnIndex, Uchar *block)
{
xf86MonPtr m;
m = xf86InterpretEDID(scrnIndex, block);
if (!m)
return NULL;
/* extension parse */
return m;
}
static void
get_vendor_section(Uchar *c, struct vendor *r)
{

View file

@ -462,22 +462,28 @@ print_number_sections(int scrnIndex, int num)
xf86MonPtr
xf86PrintEDID(xf86MonPtr m)
{
CARD16 i, j;
CARD16 i, j, n;
char buf[EDID_WIDTH * 2 + 1];
if (!(m)) return NULL;
if (!m) return NULL;
print_vendor(m->scrnIndex,&m->vendor);
print_version(m->scrnIndex,&m->ver);
print_display(m->scrnIndex,&m->features, &m->ver);
print_established_timings(m->scrnIndex,&m->timings1);
print_std_timings(m->scrnIndex,m->timings2);
print_detailed_monitor_section(m->scrnIndex,m->det_mon);
print_number_sections(m->scrnIndex,m->no_sections);
print_vendor(m->scrnIndex, &m->vendor);
print_version(m->scrnIndex, &m->ver);
print_display(m->scrnIndex, &m->features, &m->ver);
print_established_timings(m->scrnIndex, &m->timings1);
print_std_timings(m->scrnIndex, m->timings2);
print_detailed_monitor_section(m->scrnIndex, m->det_mon);
print_number_sections(m->scrnIndex, m->no_sections);
/* extension block section stuff */
xf86DrvMsg(m->scrnIndex, X_INFO, "EDID (in hex):\n");
for (i = 0; i < 128; i += j) {
n = 128;
if (m->flags & EDID_COMPLETE_RAWDATA)
n += m->no_sections * 128;
for (i = 0; i < n; i += j) {
for (j = 0; j < EDID_WIDTH; ++j) {
sprintf(&buf[j * 2], "%02x", m->rawData[i + j]);
}

View file

@ -197,21 +197,17 @@ DDC2Read(I2CDevPtr dev, int block, unsigned char *R_Buffer)
* Attempts to probe the monitor for EDID information, if NoDDC and NoDDC2 are
* unset. EDID information blocks are interpreted and the results returned in
* an xf86MonPtr. Unlike xf86DoEDID_DDC[12](), this function will return
* the complete EDID data, including all extension blocks.
* the complete EDID data, including all extension blocks, if the 'complete'
* parameter is TRUE;
*
* This function does not affect the list of modes used by drivers -- it is up
* to the driver to decide policy on what to do with EDID information.
*
* @return pointer to a new xf86MonPtr containing the EDID information.
* @return NULL if no monitor attached or failure to interpret the EDID.
*
* nblocks is an in/out parameter. If non-zero, it defines the number of
* blocks to read from the monitor; zero (or NULL pointer) means read all.
* If non-NULL, on return it will be filled in with the number of blocks
* read.
*/
xf86MonPtr
xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, int *nblocks)
xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool complete)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
unsigned char *EDID_block = NULL;
@ -242,15 +238,20 @@ xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, int *nblocks)
return NULL;
if (DDC2Read(dev, 0, EDID_block)) {
tmp = xf86InterpretEDID(scrnIndex, EDID_block);
int i, n = EDID_block[0x7e];
if (complete && n) {
EDID_block = xrealloc(EDID_block, EDID1_LEN * (1+n));
for (i = 0; i < n; i++)
DDC2Read(dev, i+1, EDID_block + (EDID1_LEN * (1+i)));
}
tmp = xf86InterpretEEDID(scrnIndex, EDID_block);
}
if (nblocks) {
if (tmp)
*nblocks = tmp->no_sections;
else
*nblocks = 0;
}
if (tmp && complete)
tmp->flags |= EDID_COMPLETE_RAWDATA;
return tmp;
}
@ -269,8 +270,7 @@ xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, int *nblocks)
xf86MonPtr
xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus)
{
int nblocks = 1;
return xf86DoEEDID(scrnIndex, pBus, &nblocks);
return xf86DoEEDID(scrnIndex, pBus, FALSE);
}
/*

View file

@ -35,7 +35,7 @@ extern xf86MonPtr xf86DoEDID_DDC2(
I2CBusPtr pBus
);
extern xf86MonPtr xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, int *nblocks);
extern xf86MonPtr xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool);
extern xf86MonPtr xf86PrintEDID(
xf86MonPtr monPtr
@ -45,6 +45,10 @@ extern xf86MonPtr xf86InterpretEDID(
int screenIndex, Uchar *block
);
extern xf86MonPtr xf86InterpretEEDID(
int screenIndex, Uchar *block
);
extern void
xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC);

View file

@ -6,10 +6,6 @@ if GLX
GLXMODS = libglx.la
endif
if XTRAP
XTRAPMOD = libxtrap.la
endif
if DBE
DBEMOD = libdbe.la
endif
@ -25,8 +21,7 @@ module_LTLIBRARIES = libfb.la \
extsmoduledir = $(moduledir)/extensions
extsmodule_LTLIBRARIES = $(RECORDMOD) \
$(DBEMOD) \
$(GLXMODS) \
$(XTRAPMOD)
$(GLXMODS)
fontsmoduledir = $(moduledir)/fonts
fontsmodule_LTLIBRARIES = libfreetype.la
@ -77,7 +72,3 @@ libdixmods_la_CFLAGS = -DXFree86LOADER $(AM_CFLAGS)
libxorgxkb_la_SOURCES = xkbVT.c xkbPrivate.c xkbKillSrv.c
libxorgxkb_la_LIBADD = $(top_builddir)/dix/libdix.la
libxtrap_la_LDFLAGS = -avoid-version
libxtrap_la_LIBADD = $(top_builddir)/XTrap/libxtrap.la
libxtrap_la_SOURCES = xf86XTrapModule.c

View file

@ -1,45 +0,0 @@
/* This is the xf86 module code for the DEC_XTRAP extension. */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "xf86Module.h"
#include <X11/extensions/xtrapdi.h>
extern void DEC_XTRAPInit(INITARGS);
static MODULESETUPPROTO(xtrapSetup);
static ExtensionModule xtrapExt =
{
DEC_XTRAPInit,
XTrapExtName,
NULL,
NULL,
NULL
};
static XF86ModuleVersionInfo xtrapVersRec =
{
"xtrap",
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
XORG_VERSION_CURRENT,
1, 0, 0,
ABI_CLASS_EXTENSION, /* needs the server extension ABI */
ABI_EXTENSION_VERSION,
MOD_CLASS_EXTENSION,
{0,0,0,0}
};
_X_EXPORT XF86ModuleData xtrapModuleData = { &xtrapVersRec, xtrapSetup, NULL };
static pointer
xtrapSetup(pointer module, pointer opts, int *errmaj, int *errmin) {
LoadExtension(&xtrapExt, FALSE);
/* Need a non-NULL return value to indicate success */
return (pointer)1;
}

View file

@ -696,7 +696,8 @@ the X server to load. Disabled by default.
.TP 7
.BI "Option \*qAllowEmptyInput\*q \*q" boolean \*q
If enabled, don't add the standard keyboard and mouse drivers, if there are no
input devices in the config file. Disabled by default.
input devices in the config file. Enabled by default if AutoAddDevices and
AutoEnableDevices is enabled, otherwise disabled.
.TP 7
.BI "Option \*qAutoAddDevices\*q \*q" boolean \*q
If this option is disabled, then no devices will be added from HAL events.

View file

@ -2301,7 +2301,7 @@ DRIAdjustFrame(int scrnIndex, int x, int y, int flags)
pScrn->frameY1 = pScrn->frameY0 + pDRIPriv->pSAREA->frame.height - 1;
/* Fix up cursor */
miPointerPosition(&px, &py);
miPointerGetPosition(inputInfo.pointer, &px, &py);
if (px < pScrn->frameX0) px = pScrn->frameX0;
if (px > pScrn->frameX1) px = pScrn->frameX1;
if (py < pScrn->frameY0) py = pScrn->frameY0;

View file

@ -179,13 +179,6 @@ exaDDXDriverInit(ScreenPtr pScreen)
}
/*ARGSUSED*/
static const OptionInfoRec *
EXAAvailableOptions(void *unused)
{
return (EXAOptions);
}
static XF86ModuleVersionInfo exaVersRec =
{
"exa",

View file

@ -730,7 +730,7 @@ int1A_handler(xf86Int10InfoPtr pInt)
return 1;
case 0xb108:
if ((dev = findPci(pInt, X86_EBX)) != NULL) {
pci_device_cfg_read_u8(dev, & X86_CL, X86_EDI);
pci_device_cfg_read_u8(dev, & X86_CL, X86_DI);
X86_EAX = X86_AL | (SUCCESSFUL << 8);
X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
} else {
@ -743,7 +743,7 @@ int1A_handler(xf86Int10InfoPtr pInt)
return 1;
case 0xb109:
if ((dev = findPci(pInt, X86_EBX)) != NULL) {
pci_device_cfg_read_u16(dev, & X86_CX, X86_EDI);
pci_device_cfg_read_u16(dev, & X86_CX, X86_DI);
X86_EAX = X86_AL | (SUCCESSFUL << 8);
X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
} else {
@ -756,7 +756,7 @@ int1A_handler(xf86Int10InfoPtr pInt)
return 1;
case 0xb10a:
if ((dev = findPci(pInt, X86_EBX)) != NULL) {
pci_device_cfg_read_u32(dev, & X86_ECX, X86_EDI);
pci_device_cfg_read_u32(dev, & X86_ECX, X86_DI);
X86_EAX = X86_AL | (SUCCESSFUL << 8);
X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
} else {
@ -769,7 +769,7 @@ int1A_handler(xf86Int10InfoPtr pInt)
return 1;
case 0xb10b:
if ((dev = findPci(pInt, X86_EBX)) != NULL) {
pci_device_cfg_write_u8(dev, X86_CL, X86_EDI);
pci_device_cfg_write_u8(dev, X86_CL, X86_DI);
X86_EAX = X86_AL | (SUCCESSFUL << 8);
X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
} else {
@ -782,7 +782,7 @@ int1A_handler(xf86Int10InfoPtr pInt)
return 1;
case 0xb10c:
if ((dev = findPci(pInt, X86_EBX)) != NULL) {
pci_device_cfg_write_u16(dev, X86_CX, X86_EDI);
pci_device_cfg_write_u16(dev, X86_CX, X86_DI);
X86_EAX = X86_AL | (SUCCESSFUL << 8);
X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
} else {
@ -795,7 +795,7 @@ int1A_handler(xf86Int10InfoPtr pInt)
return 1;
case 0xb10d:
if ((dev = findPci(pInt, X86_EBX)) != NULL) {
pci_device_cfg_write_u32(dev, X86_ECX, X86_EDI);
pci_device_cfg_write_u32(dev, X86_ECX, X86_DI);
X86_EAX = X86_AL | (SUCCESSFUL << 8);
X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
} else {

View file

@ -87,16 +87,15 @@ DLFindSymbolLocal(pointer module, const char *name)
static const char symPrefix[] = DLSYM_PREFIX;
if (strlen(symPrefix)) {
if (sizeof(symPrefix) > 1) {
n = malloc(strlen(symPrefix) + strlen(name) + 1);
sprintf(n, "%s%s", symPrefix, name);
} else {
n = name;
name = n;
}
p = dlsym(module, n);
p = dlsym(module, name);
if (strlen(symPrefix))
if (sizeof(symPrefix) > 1)
free(n);
return p;

View file

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

View file

@ -160,7 +160,6 @@ _X_HIDDEN void *miLookupTab[] = {
SYMFUNC(miPutImage)
SYMFUNC(miPushPixels)
SYMFUNC(miPointerInitialize)
SYMFUNC(miPointerPosition)
SYMFUNC(miRecolorCursor)
SYMFUNC(miPointerWarpCursor)
SYMFUNC(miDCInitialize)

View file

@ -1007,6 +1007,7 @@ _X_HIDDEN void *xfree86LookupTab[] = {
SYMFUNC(xf86DoEDID_DDC2)
SYMFUNC(xf86InterpretEDID)
SYMFUNC(xf86PrintEDID)
SYMFUNC(xf86DoEEDID)
SYMFUNC(xf86DDCMonitorSet)
SYMFUNC(xf86SetDDCproperties)

View file

@ -1045,6 +1045,54 @@ xf86DefaultScreenLimits (ScrnInfoPtr scrn, int *widthp, int *heightp,
#define POSITION_UNSET -100000
/*
* check if the user configured any outputs at all
* with either a position or a relative setting or a mode.
*/
static Bool
xf86UserConfiguredOutputs(ScrnInfoPtr scrn, DisplayModePtr *modes)
{
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
int o;
Bool user_conf = FALSE;
for (o = 0; o < config->num_output; o++)
{
xf86OutputPtr output = config->output[o];
char *position;
char *relative_name;
OutputOpts relation;
int r;
static const OutputOpts relations[] = {
OPTION_BELOW, OPTION_RIGHT_OF, OPTION_ABOVE, OPTION_LEFT_OF
};
position = xf86GetOptValString (output->options,
OPTION_POSITION);
if (position)
user_conf = TRUE;
relation = 0;
relative_name = NULL;
for (r = 0; r < 4; r++)
{
relation = relations[r];
relative_name = xf86GetOptValString (output->options,
relation);
if (relative_name)
break;
}
if (relative_name)
user_conf = TRUE;
modes[o] = xf86OutputHasUserPreferredMode(output);
if (modes[o])
user_conf = TRUE;
}
return user_conf;
}
static Bool
xf86InitialOutputPositions (ScrnInfoPtr scrn, DisplayModePtr *modes)
{
@ -1753,9 +1801,11 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn)
/* Set scrn->modes to the mode list for the 'compat' output */
scrn->modes = xf86DuplicateModes(scrn, output->probed_modes);
for (mode = scrn->modes; mode; mode = mode->next)
if (xf86ModesEqual (mode, &crtc->desiredMode))
break;
if (crtc) {
for (mode = scrn->modes; mode; mode = mode->next)
if (xf86ModesEqual (mode, &crtc->desiredMode))
break;
}
if (scrn->modes != NULL) {
/* For some reason, scrn->modes is circular, unlike the other mode
@ -2030,6 +2080,9 @@ xf86TargetUserpref(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
{
int o;
if (xf86UserConfiguredOutputs(scrn, modes))
return xf86TargetFallback(scrn, config, modes, enabled, width, height);
for (o = -1; nextEnabledOutput(config, enabled, &o); )
if (xf86OutputHasUserPreferredMode(config->output[o]))
return
@ -2672,15 +2725,16 @@ xf86OutputGetEDIDModes (xf86OutputPtr output)
return xf86DDCGetModes(scrn->scrnIndex, edid_mon);
}
/* maybe we should care about DDC1? meh. */
_X_EXPORT xf86MonPtr
xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus)
{
ScrnInfoPtr scrn = output->scrn;
xf86MonPtr mon;
mon = xf86DoEDID_DDC2 (scrn->scrnIndex, pDDCBus);
mon = xf86DoEEDID(scrn->scrnIndex, pDDCBus, TRUE);
if (mon)
xf86DDCApplyQuirks (scrn->scrnIndex, mon);
xf86DDCApplyQuirks(scrn->scrnIndex, mon);
return mon;
}

View file

@ -526,7 +526,6 @@ xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList,
_X_EXPORT void
xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList)
{
Bool mode_is_reduced = FALSE;
DisplayModePtr mode;
for (mode = modeList; mode != NULL; mode = mode->next) {
@ -682,7 +681,7 @@ xf86GetMonitorModes (ScrnInfoPtr pScrn, XF86ConfMonitorPtr conf_monitor)
_X_EXPORT DisplayModePtr
xf86GetDefaultModes (Bool interlaceAllowed, Bool doubleScanAllowed)
{
DisplayModePtr head = NULL, prev = NULL, mode;
DisplayModePtr head = NULL, mode;
int i;
for (i = 0; i < xf86NumDefaultModes; i++)

View file

@ -34,12 +34,11 @@ have been made in implementation.
at build time via Imakefile rules. This is alway
preferable to reproducing functions in more than one
OS library.
bsd/ OS support for the 386BSD/NetBSD/FreeBSD operating
bsd/ OS support for the NetBSD/FreeBSD/OpenBSD operating
systems.
bsdi/ OS support for the BSD/386 operating system.
linux/ OS support for the Linux operating system.
sco/ OS support for the SCO SVR3.x operating system.
solx86/ OS support for the Solaris x86 operating system.
solaris/ OS support for the Solaris operating system.
sysv/ OS support for all SVR4.0 and SVR4.2, and for
ISC and AT&T SVR3.2 operating systems.
@ -214,288 +213,6 @@ void xf86UseMsg(void)
*/
}
void xf86SoundKbdBell(int loudness, int pitch, int duration)
{
/*
* Sound the keyboard bell. pitch is in Hz, duration in ms,
* loudness is in the range 0-100 (0 -> off). For systems
* where the loudness can't be controlled, scale the duration
* by loudness/50.
*/
}
void xf86SetKbdLeds(int leds)
{
/*
* Set the keyboard LEDs to the state indicated in leds
*/
}
int xf86GetKbdLeds(void)
{
/*
* Return the state of the keyboard LEDs. If the OS doesn't
* support this, return 0.
*/
}
void xf86SetKbdRepeat(char rad)
{
/*
* Set the keyboard repeat rate and delay according the
* the rad value. The lower 5 bits determine the repeat
* rate (lower value -> higher rate). The next 2 bits
* determine the delay.
* This should possibly be changed to take separate rate and
* delay parameters.
*/
}
void xf86KbdInit(void)
{
/*
* Save initial keyboard state. This is called at the start of
* each server generation.
*/
}
int xf86KbdOn(void)
{
/*
* Set the keyboard up for use with X. This is called whenever
* the server becomes active (ie at the start of each generation and
* whenever its VT becomes active). Return the file descriptor
* for keyboard input. Return -1 if there is no file descriptor
* to add as an input device. If there are errors encountered,
* call FatalError(). A return value of -1 is not considered an
* error condition.
*/
}
int xf86KbdOff(void)
{
/*
* Return the keyboard to the state saved by xf86KbdInit(). This is
* called at the end of a server generation, and also when the
* server's VT ceases being active. Returns the keyboard file
* descriptor. Returns -1 if there is no file descriptor to be
* removed as an input device. Errors should be handled the same
* way as in xf86KbdOn().
*/
}
void xf86KbdEvents(void)
{
/*
* Read characters from the keyboard device, and post the events
* by calling xf86PostKbdEvent(). Read as much as is available
* without waiting.
*/
}
void xf86SetMouseSpeed(int old, int new, unsigned cflag)
{
/*
* Set the speed of the mouse port. old is the previous speed,
* new is the new speed, and cflag is the value of the termio[s]
* c_cflag field. For mice that have programmable speed operation,
* this should send the appropriate commands to the mouse.
*/
}
void xf86MouseInit(void)
{
/*
* This is called at the start of each server generation. In most
* cases this is a noop. If the mouse must not be opened/closed
* when VT switching, the open should be done here.
*/
}
int xf86MousedOn(void)
{
/*
* Set the mouse up for use with X. This is called whenever
* the server becomes active (ie at the start of each generation and
* whenever its VT becomes active). This function normally opens
* the mouse device, and may call xf86SetupMouse() to initialise
* the mouse parameters. Return the file descriptor for mouse input.
* Return -1 if there is no file descriptor to add as an input
* device. If there are errors encountered, call FatalError().
* A return value of -1 is not considered an error condition.
*/
}
int xf86MouseOff(Bool doclose)
{
/*
* Release the mouse from use with X. This is called at the end
* of a server generation (with doclose==TRUE), and also when the
* server's VT ceases being active (with doclose==FALSE). If the
* mouse should not be opened/closed when VT switching, the close
* should be done here when doclose==TRUE. For other systems, the
* mouse device should be closed regardless of the doclose value.
* Returns the mouse file descriptor. Returns -1 if there is no
* file descriptor to be removed as an input device. Errors
* should be handled the same way as in xf86MouseOn().
*/
}
void xf86MouseEvents(void)
{
/*
* Read characters from the mouse device, and post the events
* by calling xf86PostMseEvent(). Read as much as is available
* without waiting. If the OS doesn't handle the mouse protocol
* translation, xf86MouseProtocol() may be called to do the
* translation and event posting. If the OS does handle the protocol
* translation, MOUSE_PROTOCOL_IN_KERNEL should be #define'd in
* xf86_OSlib.h.
*/
}
int xf86OsMouseProc(DevicePtr pPointer, int what)
{
/*
* Implements the device-proc for the pointer device when an
* OS-based mouse driver is being used (as opposed to the
* server's internal mouse driver). Implemented as any other
* device-proc in the server.
*
* This function only needs to be implemented if USE_OSMOUSE is
* defined for the OS.
*/
}
int xf86OsMouseEvents(void)
{
/*
* When supporting an OS-based mouse driver (as opposed to the
* server's internal mouse driver), read some events from the device
* and post them to the DIX layer through xf86PostMseEvent().
*
* This function only needs to be implemented if USE_OSMOUSE is
* defined for the OS.
*/
}
void xf86OsMouseOption(int token, pointer lex_ptr)
{
/*
* Used in parsing an OsMouse keyword from the Xconfig file.
* Passed the token type and a pointer to the token value.
* The function should do whatever is appropriate for the OS's
* mouse driver.
*
* This function only needs to be implemented if USE_OSMOUSE is
* defined for the OS.
*/
}
/*
* The following functions are simply wrappers around the OS specific
* libc functions
*/
void *
xf86memmove(void * dest, const void * src, INT32 n)
{
return(memmove(dest,src,n));
}
void *
xf86memset(void * s, int c, INT32 n)
{
return(memset(s,c,n));
}
void *
xf86memcpy(void * dest, const void * src, INT32 n)
{
return(memcpy(dest,src,n));
}
int
xf86memcmp(const void * s1, const void * s2, INT32 n)
{
return(memcmp(s1,s2,n));
}
char *
xf86strcat(char * dest, const char * src)
{
return(strcat(dest,src));
}
char *
xf86strcpy(char * dest, const char * src)
{
return(strcpy(dest,src));
}
int
xf86strcmp(const char * s1, const char * s2)
{
return(strcmp(s1,s2));
}
int
xf86strncmp(const char * s1, const char * s2, INT32 n)
{
return(strncmp(s1,s2,n));
}
size_t
xf86strlen(const char * s)
{
return(strlen(s));
}
void
xf86getsecs(INT32 * secs, INT32 * usecs)
{
struct timeval tv;
gettimeofday(&tv, NULL);
*secs = tv.tv_sec;
*usecs= tv.tv_usec;
return;
}
double
xf86exp(double x)
{
return(exp(x));
}
double
xf86log(double x)
{
return(log(x));
}
double
xf86pow(double x, double y)
{
return(pow(x,y));
}
double
xf86sqrt(double x)
{
return(sqrt(x));
}
double
xf86cos(double x)
{
return(cos(x));
}
$XFree86: xc/programs/Xserver/hw/xfree86/os-support/README.OS-lib,v 3.10 2001/12/17 20:00:45 dawes Exp $

View file

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

View file

@ -7,7 +7,7 @@
#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86Axp.h"
#include "shared/xf86Axp.h"
#include <sys/param.h>
#include "xf86_OSlib.h"
#include <stdio.h>

View file

@ -310,8 +310,7 @@ acquire_vt:
#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
#ifdef WSCONS_SUPPORT
case WSCONS:
fprintf(stderr, "xf86OpenConsole\n");
/* xf86Info.consoleFd = open("/dev/wskbd0", 0); */
/* Nothing to do */
break;
#endif
}
@ -575,8 +574,14 @@ xf86OpenPcvt()
sprintf(vtname, "%s%01x", vtprefix, xf86Info.vtno - 1);
if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0)
{
FatalError("xf86OpenPcvt: Cannot open %s (%s)",
ErrorF("xf86OpenPcvt: Cannot open %s (%s)",
vtname, strerror(errno));
xf86Info.vtno = initialVT;
sprintf(vtname, "%s%01x", vtprefix, xf86Info.vtno - 1);
if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0) {
FatalError("xf86OpenPcvt: Cannot open %s (%s)",
vtname, strerror(errno));
}
}
if (ioctl(fd, VT_GETMODE, &vtmode) < 0)
{
@ -585,8 +590,8 @@ xf86OpenPcvt()
xf86Info.consType = PCVT;
#ifdef WSCONS_SUPPORT
xf86Msg(X_PROBED,
"Using wscons driver in pcvt compatibility mode "
"(version %d.%d)\n",
"Using wscons driver on %s in pcvt compatibility mode "
"(version %d.%d)\n", vtname,
pcvt_version.rmajor, pcvt_version.rminor);
#else
xf86Msg(X_PROBED, "Using pcvt driver (version %d.%d)\n",
@ -620,7 +625,7 @@ xf86OpenWScons()
#if defined(__NetBSD__)
sprintf(ttyname, "/dev/ttyE%d", i);
#elif defined(__OpenBSD__)
sprintf(ttyname, "/dev/ttyC%d", i);
sprintf(ttyname, "/dev/ttyC%x", i);
#endif
if ((fd = open(ttyname, 2)) != -1)
break;
@ -662,7 +667,7 @@ xf86CloseConsole()
VT.mode = VT_AUTO;
ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); /* dflt vt handling */
}
#if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
#if !defined(OpenBSD) && !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
if (ioctl(xf86Info.consoleFd, KDDISABIO, 0) < 0)
{
xf86FatalError("xf86CloseConsole: KDDISABIO failed (%s)",

View file

@ -23,10 +23,6 @@ if XORG_BUS_SPARCPCI
PCI_SOURCES += sparcPci.c
endif
if LINUX_ALPHA
PCI_SOURCES += axpPci.c
endif
if XORG_BUS_SPARC
PLATFORM_SOURCES = Sbus.c
sdk_HEADERS += xf86Sbus.h

View file

@ -189,75 +189,26 @@
#define ARCH_PCI_INIT bsdPciInit
#endif
#if defined(linux)
# define ARCH_PCI_INIT linuxPciInit
# if defined(__m32r__)
# define INCLUDE_XF86_MAP_PCI_MEM
# define INCLUDE_XF86_NO_DOMAIN
# endif
#endif /* defined(linux) */
#if !defined(ARCH_PCI_INIT)
/*
* Select architecture specific PCI init function
*/
#if defined(__alpha__)
# if defined(linux)
# define ARCH_PCI_INIT axpPciInit
# endif
#elif defined(__arm__)
# if defined(linux)
# define ARCH_PCI_INIT linuxPciInit
# endif
#elif defined(__hppa__)
# if defined(linux)
# define ARCH_PCI_INIT linuxPciInit
# endif
#elif defined(__ia64__)
# if defined(linux)
# define ARCH_PCI_INIT linuxPciInit
# endif
#elif defined(__i386__) || defined(__i386)
# if defined(linux)
# define ARCH_PCI_INIT linuxPciInit
# else
# define ARCH_PCI_INIT ix86PciInit
# endif
#elif defined(__mc68000__)
# if defined(linux)
# define ARCH_PCI_INIT linuxPciInit
# endif
#elif defined(__mips__)
# if defined(linux)
# define ARCH_PCI_INIT linuxPciInit
# endif
#if defined(__i386__) || defined(__i386) || defined(__amd64__) || defined(__amd64)
# define ARCH_PCI_INIT ix86PciInit
#elif defined(__powerpc__) || defined(__powerpc64__)
# if defined(linux)
# define ARCH_PCI_INIT linuxPciInit
# else
# define ARCH_PCI_INIT ppcPciInit
# endif
#elif defined(__s390__)
# if defined(linux)
# define ARCH_PCI_INIT linuxPciInit
# endif
#elif defined(__sh__)
# if defined(linux)
# define ARCH_PCI_INIT linuxPciInit
# endif
#elif defined(__m32r__)
# if defined(linux)
# define ARCH_PCI_INIT linuxPciInit
# define INCLUDE_XF86_MAP_PCI_MEM
# define INCLUDE_XF86_NO_DOMAIN
# endif
# define ARCH_PCI_INIT ppcPciInit
#elif defined(__sparc__) || defined(sparc)
# if defined(linux)
# define ARCH_PCI_INIT linuxPciInit
# elif defined(sun)
# define ARCH_PCI_INIT sparcPciInit
# endif
# if !defined(__FreeBSD__) && !defined(linux)
# define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge
# endif
#elif defined(__amd64__) || defined(__amd64) || defined(__x86_64__)
# if defined(linux)
# define ARCH_PCI_INIT linuxPciInit
# else
# define ARCH_PCI_INIT ix86PciInit
# endif
# define ARCH_PCI_INIT sparcPciInit
# define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge
#endif
#endif /* !defined(ARCH_PCI_INIT) */

View file

@ -1,415 +0,0 @@
/*
* Copyright 1998 by Concurrent Computer Corporation
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and that
* both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of Concurrent Computer
* Corporation not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. Concurrent Computer Corporation makes no representations
* about the suitability of this software for any purpose. It is
* provided "as is" without express or implied warranty.
*
* CONCURRENT COMPUTER CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD
* TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL CONCURRENT COMPUTER CORPORATION BE
* LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
* DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*
* Copyright 1998 by Metro Link Incorporated
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and that
* both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of Metro Link
* Incorporated not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. Metro Link Incorporated makes no representations
* about the suitability of this software for any purpose. It is
* provided "as is" without express or implied warranty.
*
* METRO LINK INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD
* TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS, IN NO EVENT SHALL METRO LINK INCORPORATED BE
* LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
* DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
#include <stdio.h>
#include "compiler.h"
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86_OSlib.h"
#include "Pci.h"
#include <asm/unistd.h>
#include "../linux/lnx.h" /* for _iobase */
/*
* Alpha/Linux platform specific PCI access functions
*/
static CARD32 axpPciCfgRead(PCITAG tag, int off);
static void axpPciCfgWrite(PCITAG, int off, CARD32 val);
static void axpPciCfgSetBits(PCITAG tag, int off, CARD32 mask, CARD32 bits);
static pciBusFuncs_t axpFuncs0 = {
/* pciReadLong */ axpPciCfgRead,
/* pciWriteLong */ axpPciCfgWrite,
/* pciSetBitsLong */ axpPciCfgSetBits,
/* pciAddrHostToBus */ pciAddrNOOP,
/* pciAddrBusToHost */ pciAddrNOOP
};
typedef struct _axpDomainRec {
int domain, hose;
int root_bus;
unsigned long dense_io, sparse_io;
unsigned long dense_mem, sparse_mem;
IOADDRESS mapped_io;
} axpDomainRec, *axpDomainPtr;
#define MAX_DOMAINS (MAX_PCI_BUSES / 256)
static axpDomainPtr xf86DomainInfo[MAX_DOMAINS] = { NULL, };
static int pciNumDomains = 0;
/*
* For debug, domain assignment can start downward from a fixed base
* (instead of up from 0) by defining FORCE_HIGH_DOMAINS. This allows
* debug of large domain numbers and sparse domain numbering on systems
* which don't have as many hoses.
*/
#if 0
# define FORCE_HIGH_DOMAINS MAX_DOMAINS /* assign domains downward from here */
#endif
/*
* If FORCE_HIGH_DOMAINS is set, make sure it's not larger than the
* max domain
*/
#if defined(FORCE_HIGH_DOMAINS) && (FORCE_HIGH_DOMAINS > MAX_DOMAINS)
# undef FORCE_HIGH_DOMAINS
# define FORCE_HIGH_DOMAINS MAX_DOMAINS
#endif
static int
axpSetupDomains(void)
{
axpDomainRec axpDomain;
int numDomains = 0;
int hose;
#ifndef INCLUDE_XF86_NO_DOMAIN
#ifdef FORCE_HIGH_DOMAINS
xf86Msg(X_WARNING,
"DEBUG OPTION FORCE_HIGH_DOMAINS in use - DRI will *NOT* work\n");
numDomains = FORCE_HIGH_DOMAINS;
#endif
/*
* Since each hose has a different address space, hoses are a perfect
* overlay for domains, so set up one domain for each hose present
* in the system. We have to loop through all possible hoses because
* some systems allow sparse I/O controllers.
*/
for(hose = 0; hose < MAX_DOMAINS; hose++) {
axpDomain.root_bus = _iobase(IOBASE_ROOT_BUS, hose, -1, -1);
if (axpDomain.root_bus < 0) continue;
axpDomain.hose = hose;
#ifndef FORCE_HIGH_DOMAINS
axpDomain.domain = axpDomain.hose = hose;
numDomains = axpDomain.domain + 1;
#else /* FORCE_HIGH_DOMAINS */
axpDomain.domain = numDomains - hose - 1;
xf86Msg(X_WARNING,
"FORCE_HIGH_DOMAINS - assigned hose %d to domain %d\n",
axpDomain.hose, axpDomain.domain);
#endif /* FORCE_HIGH_DOMAINS */
axpDomain.dense_io = _iobase(IOBASE_DENSE_IO, hose, -1, -1);
axpDomain.sparse_io = _iobase(IOBASE_SPARSE_IO, hose, -1, -1);
axpDomain.mapped_io = 0;
axpDomain.dense_mem = _iobase(IOBASE_DENSE_MEM, hose, -1, -1);
axpDomain.sparse_mem = _iobase(IOBASE_SPARSE_MEM, hose, -1, -1);
xf86DomainInfo[axpDomain.domain] = xnfalloc(sizeof(axpDomainRec));
*(xf86DomainInfo[axpDomain.domain]) = axpDomain;
/*
* For now, only allow a single domain (hose) on sparse i/o systems.
*
* Allowing multiple domains on sparse systems would require:
* 1) either
* a) revamping the sparse video mapping code to allow
* for multiple unrelated address regions
* -- OR --
* b) implementing sparse mapping directly in
* xf86MapDomainMemory
* 2) revaming read/write sparse routines to correctly handle
* the solution to 1)
* 3) implementing a sparse I/O system (mapping, inX/outX)
* independent of glibc, since the glibc version only
* supports hose 0
*/
if (axpDomain.sparse_io) {
if (_iobase(IOBASE_ROOT_BUS, hose + 1, -1, -1) >= 0) {
/*
* It's a sparse i/o system with (at least) one more hose,
* show a message indicating that video is constrained to
* hose 0
*/
xf86Msg(X_INFO,
"Sparse I/O system - constraining video to hose 0\n");
}
break;
}
}
#else /* INCLUDE_XF86_NO_DOMAIN */
/*
* domain support is not included, so just set up a single domain (0)
* to represent the first hose so that axpPciInit will still have
* be able to set up the root bus
*/
xf86DomainInfo[0] = xnfalloc(sizeof(axpDomainRec));
*(xf86DomainInfo[0]) = axpDomain;
numDomains = 1;
#endif /* INCLUDE_XF86_NO_DOMAIN */
return numDomains;
}
void
axpPciInit()
{
axpDomainPtr pDomain;
int domain, bus;
pciNumDomains = axpSetupDomains();
for(domain = 0; domain < pciNumDomains; domain++) {
if (!(pDomain = xf86DomainInfo[domain])) continue;
/*
* Since any bridged buses will be behind a probed pci-pci bridge,
* only set up the root bus for each domain (hose) and the bridged
* buses will be set up as they are found.
*/
/* make a bus with both the domain and the root bus in it */
bus = PCI_MAKE_BUS(domain, pDomain->root_bus);
pciBusInfo[bus] = xnfalloc(sizeof(pciBusInfo_t));
(void)memset(pciBusInfo[bus], 0, sizeof(pciBusInfo_t));
pciBusInfo[bus]->configMech = PCI_CFG_MECH_OTHER;
pciBusInfo[bus]->numDevices = 32;
pciBusInfo[bus]->funcs = &axpFuncs0;
pciBusInfo[bus]->pciBusPriv = pDomain;
pciNumBuses = bus + 1;
}
}
/*
* Alpha/Linux PCI configuration space access routines
*/
static int
axpPciBusFromTag(PCITAG tag)
{
pciBusInfo_t *pBusInfo;
axpDomainPtr pDomain;
int bus, dfn;
bus = PCI_BUS_FROM_TAG(tag);
if ((bus >= pciNumBuses)
|| !(pBusInfo = pciBusInfo[bus])
|| !(pDomain = pBusInfo->pciBusPriv)
|| (pDomain->domain != PCI_DOM_FROM_TAG(tag))) return -1;
bus = PCI_BUS_NO_DOMAIN(bus); /* should just be root_bus */
dfn = PCI_DFN_FROM_TAG(tag);
if (_iobase(IOBASE_HOSE, -1, bus, dfn) != pDomain->hose) return -1;
return bus;
}
static CARD32
axpPciCfgRead(PCITAG tag, int off)
{
int bus, dfn;
CARD32 val = 0xffffffff;
if ((bus = axpPciBusFromTag(tag)) >= 0) {
dfn = PCI_DFN_FROM_TAG(tag);
syscall(__NR_pciconfig_read, bus, dfn, off, 4, &val);
}
return(val);
}
static void
axpPciCfgWrite(PCITAG tag, int off, CARD32 val)
{
int bus, dfn;
if ((bus = axpPciBusFromTag(tag)) >= 0) {
dfn = PCI_DFN_FROM_TAG(tag);
syscall(__NR_pciconfig_write, bus, dfn, off, 4, &val);
}
}
static void
axpPciCfgSetBits(PCITAG tag, int off, CARD32 mask, CARD32 bits)
{
int bus, dfn;
CARD32 val = 0xffffffff;
if ((bus = axpPciBusFromTag(tag)) >= 0) {
dfn = PCI_DFN_FROM_TAG(tag);
syscall(__NR_pciconfig_read, bus, dfn, off, 4, &val);
val = (val & ~mask) | (bits & mask);
syscall(__NR_pciconfig_write, bus, dfn, off, 4, &val);
}
}
#ifndef INCLUDE_XF86_NO_DOMAIN
/*
* Alpha/Linux addressing domain support
*/
_X_EXPORT int
xf86GetPciDomain(PCITAG Tag)
{
return PCI_DOM_FROM_TAG(Tag);
}
_X_EXPORT pointer
xf86MapDomainMemory(int ScreenNum, int Flags, PCITAG Tag,
ADDRESS Base, unsigned long Size)
{
axpDomainPtr pDomain;
int domain = PCI_DOM_FROM_TAG(Tag);
if ((domain < 0) || (domain >= pciNumDomains) ||
!(pDomain = xf86DomainInfo[domain]))
FatalError("%s called with invalid parameters\n", __FUNCTION__);
/*
* xf86MapVidMem already does what we need, but remember to subtract
* _bus_base() (the physical dense memory root of hose 0) since
* xf86MapVidMem is expecting an offset relative to _bus_base() rather
* than an actual physical address.
*/
return xf86MapVidMem(ScreenNum, Flags,
pDomain->dense_mem + Base - _bus_base(), Size);
}
IOADDRESS
xf86MapLegacyIO(struct pci_device *dev)
{
axpDomainPtr pDomain;
const int domain = dev->domain;
if ((domain < 0) || (domain >= pciNumDomains) ||
!(pDomain = xf86DomainInfo[domain]))
FatalError("%s called with invalid parameters\n", __FUNCTION__);
/*
* Use glibc inx/outx routines for sparse I/O, so just return the
* base [this is ok since we also constrain sparse I/O systems to
* a single domain in axpSetupDomains()]
*/
if (pDomain->sparse_io) return 0;
/*
* I/O addresses on Alpha are really just different physical memory
* addresses that the system corelogic turns into I/O commands on the
* bus, so just use xf86MapVidMem to map I/O as well, but remember
* to subtract _bus_base() (the physical dense memory root of hose 0)
* since xf86MapVidMem is expecting an offset relative to _bus_base()
* rather than an actual physical address.
*
* Map the entire I/O space (64kB) at once and only once.
*/
if (!pDomain->mapped_io)
pDomain->mapped_io = (IOADDRESS)xf86MapVidMem(-1, VIDMEM_MMIO,
pDomain->dense_io - _bus_base(),
0x10000);
return pDomain->mapped_io;
}
resPtr
xf86AccResFromOS(resPtr pRes)
{
resRange range;
int domain;
for(domain = 0; domain < pciNumDomains; domain++) {
if (!xf86DomainInfo[domain]) continue;
/*
* Fallback is to claim the following areas:
*
* 0x000c0000 - 0x000effff location of VGA and other extensions ROMS
*/
RANGE(range, 0x000c0000, 0x000effff,
RANGE_TYPE(ResExcMemBlock, domain));
pRes = xf86AddResToList(pRes, &range, -1);
/*
* Fallback would be to claim well known ports in the 0x0 - 0x3ff
* range along with their sparse I/O aliases, but that's too
* imprecise. Instead claim a bare minimum here.
*/
RANGE(range, 0x00000000, 0x000000ff,
RANGE_TYPE(ResExcIoBlock, domain)); /* For mainboard */
pRes = xf86AddResToList(pRes, &range, -1);
/*
* At minimum, the top and bottom resources must be claimed, so that
* resources that are (or appear to be) unallocated can be relocated.
*/
RANGE(range, 0x00000000, 0x00000000,
RANGE_TYPE(ResExcMemBlock, domain));
pRes = xf86AddResToList(pRes, &range, -1);
RANGE(range, 0xffffffff, 0xffffffff,
RANGE_TYPE(ResExcMemBlock, domain));
pRes = xf86AddResToList(pRes, &range, -1);
/* RANGE(range, 0x00000000, 0x00000000,
RANGE_TYPE(ResExcIoBlock, domain));
pRes = xf86AddResToList(pRes, &range, -1); */
RANGE(range, 0xffffffff, 0xffffffff,
RANGE_TYPE(ResExcIoBlock, domain));
pRes = xf86AddResToList(pRes, &range, -1);
}
return pRes;
}
#endif /* !INCLUDE_XF86_NO_DOMAIN */

View file

@ -30,7 +30,7 @@ xf86SetReallySlowBcopy(void)
really_slow_bcopy = 1;
}
#if defined(__i386__) || defined(__x86_64__)
#if defined(__i386__) || defined(__amd64__)
static void xf86_really_slow_bcopy(unsigned char *src, unsigned char *dst, int len)
{
while(len--)
@ -45,7 +45,7 @@ static void xf86_really_slow_bcopy(unsigned char *src, unsigned char *dst, int l
_X_EXPORT void
xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len)
{
#if defined(__i386__) || defined(__x86_64__)
#if defined(__i386__) || defined(__amd64__)
if (really_slow_bcopy) {
xf86_really_slow_bcopy(src, dst, len);
return;

View file

@ -101,6 +101,7 @@ xf86SIGIO (int sig)
int i;
fd_set ready;
struct timeval to;
int save_errno = errno; /* do not clobber the global errno */
int r;
ready = xf86SigIOMask;
@ -117,6 +118,8 @@ xf86SIGIO (int sig)
if (r > 0) {
xf86Msg(X_ERROR, "SIGIO %d descriptors not handled\n", r);
}
/* restore global errno */
errno = save_errno;
}
static int

View file

@ -378,7 +378,7 @@ xf86CursorMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y)
/* only update coordinate state for first sprite, otherwise we get jumps
when removing a sprite. The second sprite is never HW rendered anyway */
if (pDev == inputInfo.pointer ||
!pDev->isMaster && pDev->u.master == inputInfo.pointer)
(!pDev->isMaster && pDev->u.master == inputInfo.pointer))
{
ScreenPriv->x = x;
ScreenPriv->y = y;

View file

@ -3,5 +3,4 @@ SUBDIRS = \
cvt \
ioport \
kbd_mode \
xorgcfg \
xorgconfig
xorgcfg

View file

@ -1,4 +1,3 @@
# $Id$
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
#

View file

@ -110,189 +110,6 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(LoaderFreeDirList)
SYMFUNC(LoaderGetOS)
/*
* these here are our own interfaces to libc functions
*/
SYMFUNC(xf86abort)
SYMFUNC(xf86abs)
SYMFUNC(xf86acos)
SYMFUNC(xf86asin)
SYMFUNC(xf86atan)
SYMFUNC(xf86atan2)
SYMFUNC(xf86atof)
SYMFUNC(xf86atoi)
SYMFUNC(xf86atol)
SYMFUNC(xf86bsearch)
SYMFUNC(xf86ceil)
SYMFUNC(xf86calloc)
SYMFUNC(xf86clearerr)
SYMFUNC(xf86close)
SYMFUNC(xf86cos)
SYMFUNC(xf86exit)
SYMFUNC(xf86exp)
SYMFUNC(xf86fabs)
SYMFUNC(xf86fclose)
SYMFUNC(xf86feof)
SYMFUNC(xf86ferror)
SYMFUNC(xf86fflush)
SYMFUNC(xf86fgetc)
SYMFUNC(xf86fgetpos)
SYMFUNC(xf86fgets)
SYMFUNC(xf86finite)
SYMFUNC(xf86floor)
SYMFUNC(xf86fmod)
SYMFUNC(xf86fopen)
SYMFUNC(xf86fprintf)
SYMFUNC(xf86fputc)
SYMFUNC(xf86fputs)
SYMFUNC(xf86fread)
SYMFUNC(xf86free)
SYMFUNC(xf86freopen)
SYMFUNC(xf86frexp)
SYMFUNC(xf86fscanf)
SYMFUNC(xf86fseek)
SYMFUNC(xf86fsetpos)
SYMFUNC(xf86ftell)
SYMFUNC(xf86fwrite)
SYMFUNC(xf86getc)
SYMFUNC(xf86getenv)
SYMFUNC(xf86getpagesize)
SYMFUNC(xf86hypot)
SYMFUNC(xf86ioctl)
SYMFUNC(xf86isalnum)
SYMFUNC(xf86isalpha)
SYMFUNC(xf86iscntrl)
SYMFUNC(xf86isdigit)
SYMFUNC(xf86isgraph)
SYMFUNC(xf86islower)
SYMFUNC(xf86isprint)
SYMFUNC(xf86ispunct)
SYMFUNC(xf86isspace)
SYMFUNC(xf86isupper)
SYMFUNC(xf86isxdigit)
SYMFUNC(xf86labs)
SYMFUNC(xf86ldexp)
SYMFUNC(xf86log)
SYMFUNC(xf86log10)
SYMFUNC(xf86lseek)
SYMFUNC(xf86malloc)
SYMFUNC(xf86memchr)
SYMFUNC(xf86memcmp)
SYMFUNC(xf86memcpy)
#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
* libraries as there is no way to map the name of the call to the
* correct function.
*/
SYMFUNC(memcpy)
/*
* Some PPC, SPARC, and IA64 compilers generate calls to memset to handle
* aggregate initializations.
*/
SYMFUNC(memset)
#endif
SYMFUNC(xf86memmove)
SYMFUNC(xf86memset)
SYMFUNC(xf86mmap)
SYMFUNC(xf86modf)
SYMFUNC(xf86munmap)
SYMFUNC(xf86open)
SYMFUNC(xf86perror)
SYMFUNC(xf86pow)
SYMFUNC(xf86printf)
SYMFUNC(xf86qsort)
SYMFUNC(xf86read)
SYMFUNC(xf86realloc)
SYMFUNC(xf86remove)
SYMFUNC(xf86rename)
SYMFUNC(xf86rewind)
SYMFUNC(xf86setbuf)
SYMFUNC(xf86setvbuf)
SYMFUNC(xf86sin)
SYMFUNC(xf86snprintf)
SYMFUNC(xf86sprintf)
SYMFUNC(xf86sqrt)
SYMFUNC(xf86sscanf)
SYMFUNC(xf86strcat)
SYMFUNC(xf86strcmp)
SYMFUNC(xf86strcasecmp)
SYMFUNC(xf86strcpy)
SYMFUNC(xf86strcspn)
SYMFUNC(xf86strerror)
SYMFUNC(xf86strlen)
SYMFUNC(xf86strncmp)
SYMFUNC(xf86strncasecmp)
SYMFUNC(xf86strncpy)
SYMFUNC(xf86strpbrk)
SYMFUNC(xf86strchr)
SYMFUNC(xf86strrchr)
SYMFUNC(xf86strspn)
SYMFUNC(xf86strstr)
SYMFUNC(xf86strtod)
SYMFUNC(xf86strtok)
SYMFUNC(xf86strtol)
SYMFUNC(xf86strtoul)
SYMFUNC(xf86tan)
SYMFUNC(xf86tmpfile)
SYMFUNC(xf86tolower)
SYMFUNC(xf86toupper)
SYMFUNC(xf86ungetc)
SYMFUNC(xf86vfprintf)
SYMFUNC(xf86vsnprintf)
SYMFUNC(xf86vsprintf)
SYMFUNC(xf86write)
/* non-ANSI C functions */
SYMFUNC(xf86opendir)
SYMFUNC(xf86closedir)
SYMFUNC(xf86readdir)
SYMFUNC(xf86rewinddir)
SYMFUNC(xf86ffs)
SYMFUNC(xf86strdup)
SYMFUNC(xf86bzero)
SYMFUNC(xf86usleep)
SYMFUNC(xf86execl)
SYMFUNC(xf86getsecs)
SYMFUNC(xf86fpossize) /* for returning sizeof(fpos_t) */
SYMFUNC(xf86stat)
SYMFUNC(xf86fstat)
SYMFUNC(xf86access)
SYMFUNC(xf86geteuid)
SYMFUNC(xf86getegid)
SYMFUNC(xf86getpid)
SYMFUNC(xf86mknod)
SYMFUNC(xf86chmod)
SYMFUNC(xf86chown)
SYMFUNC(xf86sleep)
SYMFUNC(xf86mkdir)
SYMFUNC(xf86shmget)
SYMFUNC(xf86shmat)
SYMFUNC(xf86shmdt)
SYMFUNC(xf86shmctl)
#ifdef HAS_GLIBC_SIGSETJMP
SYMFUNC(xf86setjmp)
SYMFUNC(xf86setjmp0)
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
SYMFUNCALIAS("xf86setjmp1",__sigsetjmp)
#else
SYMFUNC(xf86setjmp1)
#endif
#else
SYMFUNCALIAS("xf86setjmp",setjmp)
SYMFUNCALIAS("xf86setjmp0",setjmp)
SYMFUNC(xf86setjmp1)
#endif
SYMFUNCALIAS("xf86longjmp",longjmp)
SYMFUNC(xf86getjmptype)
SYMFUNC(xf86setjmp1_arg2)
SYMFUNC(xf86setjmperror)
SYMFUNC(xf86AddDriver)
SYMFUNC(xf86ServerIsOnlyDetecting)
SYMFUNC(xf86AddInputDriver)

View file

@ -1 +0,0 @@
xorgconfig.1

File diff suppressed because it is too large Load diff

View file

@ -1,647 +0,0 @@
# $XFree86: xc/programs/Xserver/hw/xfree98/xf86config/Cards98,v 1.7 1998/06/04 16:43:45 hohndel Exp $
#
#
#
# $XConsortium: Cards /main/27 1996/10/28 05:43:53 kaleb $
# This is the database of card definitions used by xf86config.
# Each definition should have a NAME entry, CHIPSET (descriptive) and
# SERVER (one of EGC, GANBWAP, PEGC, NKVNEC, WABS, WABEP, WSNA, TGUI,
# MGA, SVGA, NECS3, PWSKB, PWLB, GA968).
# A reference to another definition is made with SEE (already defined
# entries are not overridden).
# Optional entries are RAMDAC (identifier), CLOCKCHIP (identifier),
# DACSPEED, NOCLOCKPROBE (advises never to probe clocks), UNSUPPORTED
# (indicates card that is not yet properly supported by a dedicated
# server). A LINE entry adds a line of text to be included in the
# Device section (can include options or comments).
# There's no CLOCKS option (although a Clocks line can be included
# with LINE), as it is very undesirable to have a Clocks line that
# is incorrect. The idea is that the Clocks are probed for to be
# sure (a commented suggested Clocks line can be included).
#
# The majority of entries are just a binding of a model name to a
# chipset/server and untested.
#
# EGC
NAME EGC16
CHIPSET EGC
SERVER EGC
LINE Chipset "vga"
# PEGC
NAME PEGC
CHIPSET PEGC
SERVER PEGC
LINE VideoRam 512
LINE Clocks 31.5
LINE # Virtual resolution for 640x400
LINE # Clocks 28.322
# GANBWAP
NAME GA-98NBI
CHIPSET CL-GD5434
SERVER GANBWAP
LINE ClockChip "cirrus"
LINE Option "ga98nb1"
LINE Option "no_mmio"
LINE # Option "sw_cursor"
NAME GA-98NBII
CHIPSET CL-GD5434
SERVER GANBWAP
LINE ClockChip "cirrus"
LINE Option "ga98nb2"
LINE Option "no_mmio"
LINE # Option "sw_cursor"
NAME GA-98NBIV
CHIPSET CL-GD5434
SERVER GANBWAP
LINE ClockChip "cirrus"
LINE Option "ga98nb4"
LINE Option "no_mmio"
LINE # Option "sw_cursor"
NAME WAP-2000/4000
CHIPSET CL-GD5434
SERVER GANBWAP
LINE Option "wap"
LINE Option "no_mmio"
LINE # Option "epsonmemwin"
# NKVNEC
NAME PCNKV/PCNKV2/NEC_CIRRUS
CHIPSET CL-GD5428/5429/5430
SERVER NKVNEC
LINE # Option "fast_dram"
LINE VideoRam 1024
NAME PC9821Bf/U8W
LINE Option "nec_cirrus"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Bp/U8W/U7W
LINE Option "nec_cirrus"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Bs/U7W
LINE Option "nec_cirrus"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Be/U7W
LINE Option "nec_cirrus"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821BA3/U2/W
LINE Option "nec_cirrus"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821BX3/U2/W
LINE Option "nec_cirrus"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821BX4/U2
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Cb
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Ce
LINE Option "nec_cirrus"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Cf
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Ce2
LINE Option "nec_cirrus"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Cs
LINE Option "nec_cirrus"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Cs2
LINE Option "nec_cirrus"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Cx
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Cx2
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Es
LINE Option "nec_cirrus"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Nd
LINE Option "nec_cirrus"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Ne2
LINE Option "nec_cirrus"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Nf
LINE Option "nec_cirrus"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Np
LINE Option "nec_cirrus"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Ns
LINE Option "nec_cirrus"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821V7/C
LINE Chipset "clgd5430"
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821V10/C,S
LINE Chipset "clgd5430"
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821V12/S
LINE Chipset "clgd5430"
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821V13/S
LINE Chipset "clgd5430"
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821V16/S
LINE Chipset "clgd5430"
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821V16/S5V,P
LINE Chipset "clgd5446"
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821V20/S7
LINE Chipset "clgd5430"
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Xb10
LINE Chipset "clgd5430"
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Xc13/S5
LINE Chipset "clgd5446"
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Xc16/M,S
LINE Chipset "clgd5446"
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Xc200/M,S
LINE Chipset "clgd5446"
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Xa7e
LINE Chipset "clgd5430"
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Xe
LINE Chipset "clgd5430"
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC9821Xe10
LINE Chipset "clgd5430"
LINE Option "nec_cirrus"
LINE Option "no_mmio"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC486MR
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC486MS
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC486MU
LINE Chipset "clgd5429"
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC486MV
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC586MV
SEE PCNKV/PCNKV2/NEC_CIRRUS
NAME PC586RV
LINE Chipset "clgd5429"
SEE PCNKV/PCNKV2/NEC_CIRRUS
# WABS
NAME WAB-S
CHIPSET CL-GD5426/5428
SERVER WABS
LINE VideoRam 1024
LINE # VideoRam 2048
NAME WAB-1000/2000
CHIPSET CL-GD5428
SERVER WABS
LINE VideoRam 1024
LINE # VideoRam 2048
NAME WSR-E/G
SEE WAB-1000/2000
# WABEP
NAME WAB-EP
CHIPSET CL-GD5428
SERVER WABEP
LINE Option "med_dram"
# WSNA
NAME WSN-A2F
CHIPSET CL-GD5434
SERVER WSNA
LINE Option "no_mmio"
LINE Option "med_dram"
# TGUI
NAME NEC Trident
CHIPSET TGUI9680/9682
SERVER TGUI
LINE Option "xaa_no_color_exp"
LINE # Option "noaccel"
LINE # Option "Linear"
LINE # Option "med_dram"
LINE # Option "hw_cursor"
NAME PC9821Ra20/N
SEE NEC Trident
NAME PC9821RaII23/N,W
SEE NEC Trident
NAME PC9821Ra266/N,W
SEE NEC Trident
NAME PC9821Rs20/B20
SEE NEC Trident
NAME PC9821RsII26/B40
SEE NEC Trident
NAME PC9821V13/M7
SEE NEC Trident
NAME PC9821V16/M7
SEE NEC Trident
NAME PC9821V20/M7
SEE NEC Trident
NAME PC9821Xa7/C,K
SEE NEC Trident
NAME PC9821Xa9/C,K
SEE NEC Trident
NAME PC9821Xa10/C,K
SEE NEC Trident
NAME PC9821Xa12/C,K
SEE NEC Trident
NAME PC9821Xa13/C,K,W
SEE NEC Trident
NAME PC9821Xa16/R,W
SEE NEC Trident
NAME PC9821Xa20/W
SEE NEC Trident
NAME PC9821Xc13/M,S
SEE NEC Trident
NAME PC9821Xv13/R
SEE NEC Trident
NAME GA-DRV/98
CHIPSET TGUI9680
SERVER TGUI
LINE Option "noaccel"
LINE # Option "med_dram"
LINE # Option "hw_cursor"
# MGA
NAME MGA Millennium
CHIPSET MGA2064W
SERVER MGA
NAME PC9821Xt13
SEE MGA Millennium
NAME PC9821Xt16
SEE MGA Millennium
NAME PC9821Xv13/W
SEE MGA Millennium
NAME PC9821Xv20/W
SEE MGA Millennium
NAME PC9821St15
SEE MGA Millennium
NAME PC9821St20
SEE MGA Millennium
NAME PC9821RvII26/N20
SEE MGA Millennium
NAME NEC FC-WAB-X2
SEE MGA Millennium
NAME MGA Mystique
CHIPSET MGA1064SG
SERVER MGA
NAME PC9821V166/S
LINE VideoRam 2048
SEE MGA Mystique
NAME PC9821V200/S
LINE VideoRam 2048
SEE MGA Mystique
NAME PC9821V200/M
LINE VideoRam 4096
SEE MGA Mystique
NAME PC9821V233/M7
LINE VideoRam 2048
SEE MGA Mystique
NAME PC9821V233/M7V
LINE VideoRam 4096
SEE MGA Mystique
# SVGA
NAME NEC Cirrus 755x
CHIPSET CL-GD7555
LINE Chipset "clgd7555"
LINE # VideoRam 2048
LINE # Option "no_bitblt"
LINE # Option "fast_dram"
LINE Option "linear"
LINE Option "noaccel"
SERVER SVGA
NAME PC9821Nr12
SEE NEC Cirrus 755x
NAME PC9821Nr13
SEE NEC Cirrus 755x
NAME PC9821La13
SEE NEC Cirrus 755x
NAME PC9821Ls12
SEE NEC Cirrus 755x
NAME PC9821Ls13
SEE NEC Cirrus 755x
NAME PC9821Ls150
SEE NEC Cirrus 755x
# NECS3
NAME NEC WAB-A/B
CHIPSET S3 928
SERVER NECS3
LINE Chipset "s3_generic"
LINE Dacspeed 110
LINE Ramdac "sc15025"
LINE Option "dac_8_bit"
LINE # Option "necwab"
LINE # Option "nomemaccess"
LINE Clocks 25.0 28.0 40.0 0.0 50.0 77.0 36.0 45.0
LINE Clocks 130.0 120.0 80.0 31.0 110.0 65.0 75.0 94.0
NAME NEC FC-WAB-A/B
CHIPSET S3 928
SERVER NECS3
LINE Chipset "s3_generic"
LINE Dacspeed 110
LINE Ramdac "bt485"
LINE Option "necwab"
LINE Option "nomemaccess"
LINE Option "noinit"
LINE Option "nolinear"
LINE Clocks 25.0 28.0 40.0 0.0 50.0 77.0 36.0 45.0
LINE Clocks 130.0 120.0 80.0 31.0 110.0 65.0 75.0 94.0
NAME PC9821Af/U9W E09?
SEE NEC WAB-A/B
NAME PC9821An/U8W
SEE NEC WAB-A/B
NAME PC9821Ap2/U8W/C9W
SEE NEC WAB-A/B
NAME PC9821As2/U7W/U8W
SEE NEC WAB-A/B
NAME NEC 864
CHIPSET S3 864
SERVER NECS3
LINE Chipset "s3_generic"
LINE Option "necwab"
LINE Ramdac "s3_sdac"
LINE ClockChip "s3_sdac"
NAME PC9821Ap3
SEE NEC 864
NAME PC9821As3
SEE NEC 864
NAME PC9821Xp
SEE NEC 864
NAME PC9821Xs
SEE NEC 864
# PWSKB
NAME PowerWindow 928/801
CHIPSET S3 928
SERVER PWSKB
LINE Chipset "s3_generic"
LINE # Chipset "mmio_928"
LINE Ramdac "sc15025"
LINE Dacspeed 110
LINE Option "dac_8_bit"
LINE # Option "epsonmemwin"
LINE # Option "nomemaccess"
LINE ClockChip "icd2061a"
NAME PowerWindow 928II
CHIPSET S3 928
SERVER PWSKB
LINE Chipset "s3_generic"
LINE # Chipset "mmio_928"
LINE Ramdac "att20c505"
LINE # Ramdac "bt485"
LINE Dacspeed 110
LINE Option "dac_8_bit"
LINE # Option "pw_mux"
LINE Option "bt485_curs"
LINE # Option "epsonmemwin"
LINE # Option "nomemaccess"
LINE ClockChip "icd2061a"
NAME PowerWindow 805i
CHIPSET S3 805
SERVER PWSKB
LINE Chipset "s3_generic"
LINE Ramdac "s3gendac"
LINE Dacspeed 110
LINE Option "dac_8_bit"
LINE # Option "pw805i"
LINE # Option "epsonmemwin"
LINE # Option "nomemaccess"
LINE ClockChip "s3_sdac"
NAME PowerWindow 928G
CHIPSET S3 928
SERVER PWSKB
LINE Chipset "s3_generic"
LINE # Chipset "mmio_928"
LINE Ramdac "sc15025"
LINE Dacspeed 110
LINE Option "dac_8_bit"
LINE # Option "nomemaccess"
LINE # Option "nolinear"
LINE ClockChip "icd2061a"
NAME PCSKB/PCSKB2
CHIPSET S3 911/924
SERVER PWSKB
LINE Chipset "s3_generic"
LINE Ramdac "sc15025"
LINE Dacspeed 110
LINE Option "dac_8_bit"
LINE # Option "nomemaccess"
LINE Option "pcskb"
LINE Clocks 25.0 28.0 40.0 0.0 50.0 77.0 36.0 45.0
LINE Clocks 130.0 120.0 80.0 31.0 110.0 65.0 75.0 94.0
NAME PCSKB3/PCSKB4/PCPKB4
CHIPSET S3 928
SERVER PWSKB
LINE Chipset "s3_generic"
LINE Ramdac "sc15025"
LINE # Ramdac "att20c498"
LINE Dacspeed 110
LINE Option "dac_8_bit"
LINE Option "nomemaccess"
LINE Option "pcskb4"
LINE Clocks 25.0 28.0 40.0 0.0 50.0 77.0 36.0 45.0
LINE Clocks 130.0 120.0 80.0 31.0 110.0 65.0 75.0 94.0
# PWLB
NAME PowerWindow 928GLB
CHIPSET S3 928
SERVER PWLB
LINE Chipset "s3_generic"
LINE # Chipset "mmio_928"
LINE Ramdac "sc15025"
LINE Dacspeed 110
LINE Option "dac_8_bit"
LINE # Option "pw_localbus"
LINE # Option "nomemaccess"
LINE # Option "nolinear"
LINE ClockChip "icd2061a"
NAME PowerWindow 928IILB
CHIPSET S3 928
SERVER PWLB
LINE Chipset "s3_generic"
LINE # Chipset "mmio_928"
LINE Ramdac "att20c505"
LINE # Ramdac "bt485"
LINE Dacspeed 110
LINE Option "dac_8_bit"
LINE Option "bt485_curs"
LINE Option "pw_localbus"
LINE # Option "pw_mux"
LINE # Option "nomemaccess"
LINE # Option "nolinear"
LINE ClockChip "icd2061a"
NAME PowerWindow 964LB
CHIPSET S3 964
SERVER PWLB
LINE Chipset "s3_generic"
LINE Option "pw_localbus"
LINE Option "number_nine"
LINE Ramdac "ti3025"
LINE ClockChip "ti3025"
LINE VideoRam 4096
# GA968
NAME GA-968V4/PCI
CHIPSET S3 968
SERVER GA968
LINE Chipset "s3_generic"
LINE # Chipset "mmio_928"
LINE VideoRam 4096

View file

@ -1,70 +0,0 @@
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, provided that the above
# copyright notice(s) and this permission notice appear in all copies of
# the Software and that both the above copyright notice(s) and this
# permission notice appear in supporting documentation.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Except as contained in this notice, the name of a copyright holder
# shall not be used in advertising or otherwise to promote the sale, use
# or other dealings in this Software without prior written authorization
# of the copyright holder.
#
bin_PROGRAMS = xorgconfig
X11dir = $(libdir)/X11
dist_X11_DATA = Cards
xorgconfig_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ \
-DCARD_DATABASE_FILE='"$(X11dir)/Cards"' \
-DPROJECTROOT='"$(PROJECTROOT)"' \
-DFILEMANSUFFIX='"$(FILE_MAN_SUFFIX)"' \
-DXVERSIONSTRING='"$(PACKAGE_STRING)"'
xorgconfig_LDADD = @XORGCONFIG_DEP_LIBS@
xorgconfig_SOURCES = \
cards.c \
cards.h \
xorgconfig.c
# Man page
include $(top_srcdir)/cpprules.in
appmandir = $(APP_MAN_DIR)
appman_PRE = xorgconfig.man
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
EXTRAMANDEFS = \
-D__XCONFIGFILE__=$(__XCONFIGFILE__) \
-D__XSERVERNAME__=$(XSERVERNAME)
BUILT_SOURCES = $(appman_PRE)
CLEANFILES = $(appman_PRE) $(appman_DATA)
SUFFIXES += .$(APP_MAN_SUFFIX) .man
.man.$(APP_MAN_SUFFIX):
-rm -f $@
$(LN_S) $< $@
EXTRA_DIST = \
Cards98 \
xorgconfig.man.pre

View file

@ -1,278 +0,0 @@
/*
* Functions to manipulate card database.
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "cards.h"
/* Some vars to make path names in texts more flexible. */
#ifndef PROJECTROOT
# define PROJECTROOT "/usr"
#endif
#define TREEROOT PROJECTROOT
#define TREEROOTLX TREEROOT "/lib/X11"
#define TREEROOTCFG TREEROOT "/etc/X11"
#ifdef XDOCDIR
# define TREEROOTDOC XDOCDIR
#else
# define TREEROOTDOC TREEROOTLX "/doc"
#endif
/*
* Database format:
*
* NAME <name of card>
* CHIPSET <chipset description>
* SERVER <server name>
* DRIVER <driver name>
*
* Optional keywords:
* RAMDAC <ramdac identifier>
* CLOCKCHIP <clockchip identifier>
* DACSPEED <dacspeed>
* NOCLOCKPROBE
* UNSUPPORTED
*
* SEE <name of card> refers to another card definition; parameters that
* are already defined are not overridden.
*
* <server name> is one of Mono, VGA16, SVGA, S3, Mach32, Mach8, 8514,
* P9000, AGX, W32.
*
* A useful additional keywords may be CLOCKS.
*/
/* Database vars. */
int lastcard;
Card card[MAX_CARDS];
static int
getnextline(FILE *f, char *l)
{
if (fgets(l, 128, f) == NULL)
return -1;
return 0;
}
static void
appendstring(char **destp, char *src)
{
char *newstr;
newstr = malloc(strlen(*destp) + strlen(src) + 1);
strcpy(newstr, *destp);
strcat(newstr, src);
if (strlen(*destp) > 0)
free(*destp);
*destp = newstr;
}
int
lookupcard(char *name) {
int i;
for (i = 0; i <= lastcard; i++)
if (strcmp(name, card[i].name) == 0)
return i;
return -1;
}
static char *s3_comment =
"# Use Option \"nolinear\" if the server doesn't start up correctly\n"
"# (this avoids the linear framebuffer probe). If that fails try\n"
"# option \"nomemaccess\".\n"
"#\n"
"# Refer to " TREEROOTDOC "/README.S3, and the XF86_S3 man page.\n";
static char *cirrus_comment =
"# Use Option \"no_bitblt\" if you have graphics problems. If that fails\n"
"# try Option \"noaccel\".\n"
"# Refer to " TREEROOTDOC "/README.cirrus.\n"
"# To allow linear addressing, uncomment the Option line and the\n"
"# address that the card maps the framebuffer to.\n";
int parse_database() {
FILE *f;
char buf[128];
int i, lineno;
char filename[128];
strcpy(filename, CARD_DATABASE_FILE);
f = fopen(filename, "r");
if (f == NULL)
return -1;
lastcard = -1;
lineno = 0;
for (;;) {
if (getnextline(f, buf))
break;
lineno++;
if (buf[0] == '#')
/* Comment. */
continue;
if (strncmp(buf, "END", 3) == 0)
/* End of database. */
break;
if (strncmp(buf, "LINE", 4) == 0 && lastcard>=0) {
/* Line of Device comment. */
/* Append to existing lines. */
appendstring(&card[lastcard].lines, buf + 5);
continue;
}
/*
* The following keywords require the trailing newline
* to be deleted.
*/
i = strlen(buf);
buf[--i] = '\0';
/* remove trailing spaces or tabs */
for(--i; i>=0 && (buf[i] == ' ' || buf[i] == '\011'); i--) ;
if (i>=0)
buf[i+1] = '\0';
else
continue; /* skip empty lines */
if (strncmp(buf, "NAME", 4) == 0) {
/* New entry. */
lastcard++;
card[lastcard].name = malloc(strlen(buf + 5) + 1);
strcpy(card[lastcard].name, buf + 5);
card[lastcard].chipset = NULL;
card[lastcard].server = NULL;
card[lastcard].driver = NULL;
card[lastcard].ramdac = NULL;
card[lastcard].clockchip = NULL;
card[lastcard].dacspeed = NULL;
card[lastcard].flags = 0;
card[lastcard].lines = "";
continue;
}
if (lastcard < 0) /* no NAME line found yet */
continue;
if (strncmp(buf, "SEE", 3) == 0) {
/* Reference to another entry. */
int i;
i = lookupcard(buf + 4);
if (i == -1) {
printf("Error in database, invalid reference: %s.\n",
buf + 4);
free(card[lastcard].name);
lastcard--;
continue;
}
if (card[lastcard].chipset == NULL)
card[lastcard].chipset = card[i].chipset;
if (card[lastcard].server == NULL)
card[lastcard].server = card[i].server;
if (card[lastcard].driver == NULL)
card[lastcard].driver = card[i].driver;
if (card[lastcard].ramdac == NULL)
card[lastcard].ramdac = card[i].ramdac;
if (card[lastcard].clockchip == NULL)
card[lastcard].clockchip = card[i].clockchip;
if (card[lastcard].dacspeed == NULL)
card[lastcard].dacspeed = card[i].dacspeed;
card[lastcard].flags |= card[i].flags;
appendstring(&card[lastcard].lines, card[i].lines);
continue;
}
if (strncmp(buf, "CHIPSET", 7) == 0) {
/* Chipset description. */
card[lastcard].chipset = malloc(strlen(buf + 8) + 1);
strcpy(card[lastcard].chipset, buf + 8);
continue;
}
if (strncmp(buf, "SERVER", 6) == 0) {
/* Server identifier. */
card[lastcard].server = malloc(strlen(buf + 7) + 1);
strcpy(card[lastcard].server, buf + 7);
continue;
}
if (strncmp(buf, "DRIVER", 6) == 0) {
/* Driver identifier. */
card[lastcard].driver = malloc(strlen(buf + 7) + 1);
strcpy(card[lastcard].driver, buf + 7);
continue;
}
if (strncmp(buf, "RAMDAC", 6) == 0) {
/* Ramdac indentifier. */
card[lastcard].ramdac = malloc(strlen(buf + 7) + 1);
strcpy(card[lastcard].ramdac, buf + 7);
continue;
}
if (strncmp(buf, "CLOCKCHIP", 9) == 0) {
/* Clockchip indentifier. */
card[lastcard].clockchip = malloc(strlen(buf + 10) + 1);
strcpy(card[lastcard].clockchip, buf + 10);
card[lastcard].flags |= NOCLOCKPROBE;
continue;
}
if (strncmp(buf, "DACSPEED", 8) == 0) {
/* Clockchip indentifier. */
card[lastcard].dacspeed = malloc(strlen(buf + 9) + 1);
strcpy(card[lastcard].dacspeed, buf + 9);
continue;
}
if (strncmp(buf, "NOCLOCKPROBE", 12) == 0) {
card[lastcard].flags |= NOCLOCKPROBE;
continue;
}
if (strncmp(buf, "UNSUPPORTED", 12) == 0) {
card[lastcard].flags |= UNSUPPORTED;
continue;
}
/* test for missing required fields */
if (card[lastcard].driver == NULL) {
fprintf(stderr, "Warning DRIVER specification missing "
"in Card database entry %s (line %d).\n",
card[lastcard].name, lineno);
keypress();
card[lastcard].driver = "unknown";
}
if (card[lastcard].chipset == NULL) {
fprintf(stderr, "Warning CHIPSET specification missing "
"in Card database entry %s (line %d).\n",
card[lastcard].name, lineno);
keypress();
card[lastcard].chipset = "unknown";
}
}
fclose(f);
/*
* Add general comments.
*/
for (i = 0; i <= lastcard; i++) {
if (card[i].server && strcmp(card[i].server, "S3") == 0)
appendstring(&card[i].lines, s3_comment);
if (card[i].chipset &&
strncmp(card[i].chipset, "CL-GD", 5) == 0)
appendstring(&card[i].lines, cirrus_comment);
}
sort_database();
return 0;
}
static int
compare_card(const void *e1, const void *e2)
{
return strcmp(((Card *)e1)->name, ((Card *)e2)->name);
}
void
sort_database() {
/* Each element is a bunch of words, but nothing too bad. */
qsort(card, lastcard + 1, sizeof(Card), compare_card);
}

View file

@ -1,30 +0,0 @@
#ifndef CARD_DATABASE_FILE
#define CARD_DATABASE_FILE "Cards"
#endif
#define MAX_CARDS 1000
typedef struct {
char *name; /* Name of the card. */
char *chipset; /* Chipset (decriptive). */
char *server; /* Server identifier. */
char *driver; /* Driver identifier. */
char *ramdac; /* Ramdac identifier. */
char *clockchip; /* Clockchip identifier. */
char *dacspeed; /* DAC speed rating. */
int flags;
char *lines; /* Additional Device section lines. */
} Card;
/* Flags: */
#define NOCLOCKPROBE 0x1 /* Never probe clocks of the card. */
#define UNSUPPORTED 0x2 /* Card is not supported (only VGA). */
extern int lastcard;
extern Card card[MAX_CARDS];
extern int lookupcard ( char *name );
extern int parse_database ( void );
extern void sort_database ( void );
extern void keypress ( void );

File diff suppressed because it is too large Load diff

View file

@ -1,22 +0,0 @@
.\" $XdotOrg: $
.\" $XFree86: xc/programs/Xserver/hw/xfree86/xf86config/xorgconfig.man,v 1.5 2001/11/01 23:35:34 dawes Exp $
.TH xorgconfig 1 __vendorversion__
.SH NAME
xorgconfig \- generate an __XCONFIGFILE__ file
.SH SYNOPSIS
.B xorgconfig
.SH DESCRIPTION
\fIxorgconfig\fP is an interactive program for generating an __XCONFIGFILE__ file
for use with __XSERVERNAME__ X servers.
.PP
Note that the default name used by \fIxorgconfig\fP for the __XCONFIGFILE__ file
is system-dependent. For instance, on OS/2, XConfig is used.
.SH FILES
.TP
.I __projectroot__/lib/X11/Cards
Video cards database
.SH "SEE ALSO"
__XSERVERNAME__(1), __XCONFIGFILE__(__filemansuffix__), xorgcfg(1), reconfig(1)
.SH AUTHOR
Harm Hanemaayer.
.\" $TOG: xf86conf.man /main/9 1997/07/19 10:53:08 kaleb $

View file

@ -40,6 +40,12 @@
#include "x86emu/x86emui.h"
#undef bswap_32
#define bswap_32(x) (((x & 0xff000000) >> 24) | \
((x & 0x00ff0000) >> 8) | \
((x & 0x0000ff00) << 8) | \
((x & 0x000000ff) << 24))
/*----------------------------- Implementation ----------------------------*/
/****************************************************************************
@ -2571,6 +2577,47 @@ static void x86emuOp2_movsx_word_R_RM(u8 X86EMU_UNUSED(op2))
END_OF_INSTR();
}
/* Handles opcodes 0xc8-0xcf */
static void x86emuOp2_bswap(u8 X86EMU_UNUSED(op2))
{
START_OF_INSTR();
DECODE_PRINTF("BSWAP\n");
TRACE_AND_STEP();
switch (op2) {
case 0xc8:
M.x86.R_EAX = bswap_32(M.x86.R_EAX);
break;
case 0xc9:
M.x86.R_ECX = bswap_32(M.x86.R_ECX);
break;
case 0xca:
M.x86.R_EDX = bswap_32(M.x86.R_EDX);
break;
case 0xcb:
M.x86.R_EBX = bswap_32(M.x86.R_EBX);
break;
case 0xcc:
M.x86.R_ESP = bswap_32(M.x86.R_ESP);
break;
case 0xcd:
M.x86.R_EBP = bswap_32(M.x86.R_EBP);
break;
case 0xce:
M.x86.R_ESI = bswap_32(M.x86.R_ESI);
break;
case 0xcf:
M.x86.R_EDI = bswap_32(M.x86.R_EDI);
break;
default:
/* can't happen */
break;
}
DECODE_CLEAR_SEGOVR();
END_OF_INSTR();
}
/***************************************************************************
* Double byte operation code table:
**************************************************************************/
@ -2788,14 +2835,14 @@ void (*x86emu_optab2[256])(u8) =
/* 0xc5 */ x86emuOp2_illegal_op,
/* 0xc6 */ x86emuOp2_illegal_op,
/* 0xc7 */ x86emuOp2_illegal_op,
/* 0xc8 */ x86emuOp2_illegal_op, /* TODO: bswap */
/* 0xc9 */ x86emuOp2_illegal_op, /* TODO: bswap */
/* 0xca */ x86emuOp2_illegal_op, /* TODO: bswap */
/* 0xcb */ x86emuOp2_illegal_op, /* TODO: bswap */
/* 0xcc */ x86emuOp2_illegal_op, /* TODO: bswap */
/* 0xcd */ x86emuOp2_illegal_op, /* TODO: bswap */
/* 0xce */ x86emuOp2_illegal_op, /* TODO: bswap */
/* 0xcf */ x86emuOp2_illegal_op, /* TODO: bswap */
/* 0xc8 */ x86emuOp2_bswap,
/* 0xc9 */ x86emuOp2_bswap,
/* 0xca */ x86emuOp2_bswap,
/* 0xcb */ x86emuOp2_bswap,
/* 0xcc */ x86emuOp2_bswap,
/* 0xcd */ x86emuOp2_bswap,
/* 0xce */ x86emuOp2_bswap,
/* 0xcf */ x86emuOp2_bswap,
/* 0xd0 */ x86emuOp2_illegal_op,
/* 0xd1 */ x86emuOp2_illegal_op,

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__) || defined(__x86_64__)
# if defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__amd64__)
# 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__) || defined(__x86_64__))
#if !defined(__GNUC__) || !(defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__amd64__))
#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(__x86_64__) || \
defined(__amd64__) || defined(amd64) || \
(defined(__sgi) && (_MIPS_SZLONG == 64))
#define NUM32 int
#else

View file

@ -9,7 +9,9 @@ MSB_3_FIXED = mf3-xaaBitmap.c mf3-xaaStipple.c
POLYSEG = s-xaaLine.c s-xaaDashLine.c
libxaa_la_LDFLAGS = -avoid-version
if COMPOSITE
libxaa_la_LIBADD = $(top_builddir)/miext/cw/libcw.la
endif
module_LTLIBRARIES = libxaa.la
libxaa_la_SOURCES = xaaInit.c xaaGC.c xaaInitAccel.c xaaFallback.c \

View file

@ -50,6 +50,7 @@ sdk_HEADERS = \
validate.h \
window.h \
windowstr.h \
xkbfile.h \
xkbsrv.h \
xkbstr.h \
xorg-server.h
@ -58,4 +59,4 @@ endif
AM_CFLAGS = $(DIX_CFLAGS)
EXTRA_DIST = $(sdk_HEADERS) do-not-use-config.h dix-config.h xorg-config.h \
xkb-config.h xkbfile.h
xkb-config.h

View file

@ -410,9 +410,6 @@
/* Support XTest extension */
#undef XTEST
/* Support XTrap extension */
#undef XTRAP
/* Support Xv extension */
#undef XV
@ -480,9 +477,6 @@
/* Use only built-in fonts */
#undef BUILTIN_FONTS
/* Avoid using font servers */
#undef NOFONTSERVERACCESS
/* Use an empty root cursor */
#undef NULL_ROOT_CURSOR

View file

@ -57,13 +57,16 @@ SOFTWARE.
#include "privates.h"
#define BitIsOn(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7)))
/* If byte[i] in src is non-zero, set bit i in dst, otherwise set bit to 0 */
#define SetBitIf(dst, src, i) \
(src[i]) ? (dst[i/8] |= (1 << (i % 8))) : (dst[i/8] &= ~(1 << (i % 8)));
#define SameClient(obj,client) \
(CLIENT_BITS((obj)->resource) == (client)->clientAsMask)
#define MAX_DEVICES 20
#define EMASKSIZE MAX_DEVICES
#define EMASKSIZE MAX_DEVICES + 1
extern DevPrivateKey CoreDevicePrivateKey;

View file

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

Some files were not shown because too many files have changed in this diff Show more