CVS commit: [netbsd-5] xsrc/external/mit/xorg-server/dist

2014-12-22 Thread SAITOH Masanobu
Module Name:xsrc
Committed By:   msaitoh
Date:   Mon Dec 22 12:48:25 UTC 2014

Modified Files:
xsrc/external/mit/xorg-server/dist/exa [netbsd-5]: exa_render.c
xsrc/external/mit/xorg-server/dist/render [netbsd-5]: picture.h

Log Message:
Pullup additional patches requested by mrg in ticket #1935:

xsrc/external/mit/xorg-server/dist/exa/exa_render.c  1.2
xsrc/external/mit/xorg-server/dist/render/picture.h  1.2

fixes for CVE CVE-2013-6424:
If t->bottom is close to MIN_INT, removing top can wraparound, so do
the check properly.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xorg-server/dist/exa/exa_render.c
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xorg-server/dist/render/picture.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/exa/exa_render.c
diff -u xsrc/external/mit/xorg-server/dist/exa/exa_render.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/exa/exa_render.c:1.1.1.1.2.2
--- xsrc/external/mit/xorg-server/dist/exa/exa_render.c:1.1.1.1.2.1	Thu Sep 17 03:34:54 2009
+++ xsrc/external/mit/xorg-server/dist/exa/exa_render.c	Mon Dec 22 12:48:25 2014
@@ -1074,6 +1074,7 @@ exaTrapezoids (CARD8 op, PicturePtr pSrc
 
 	exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST);
 	for (; ntrap; ntrap--, traps++)
+  if (xTrapezoidValid(traps))
 	(*ps->RasterizeTrapezoid) (pPicture, traps,
    -bounds.x1, -bounds.y1);
 	exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST);

Index: xsrc/external/mit/xorg-server/dist/render/picture.h
diff -u xsrc/external/mit/xorg-server/dist/render/picture.h:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/render/picture.h:1.1.1.1.2.2
--- xsrc/external/mit/xorg-server/dist/render/picture.h:1.1.1.1.2.1	Thu Sep 17 03:35:47 2009
+++ xsrc/external/mit/xorg-server/dist/render/picture.h	Mon Dec 22 12:48:25 2014
@@ -201,7 +201,7 @@ typedef	pixman_fixed_t	xFixed;
 /* whether 't' is a well defined not obviously empty trapezoid */
 #define xTrapezoidValid(t)  ((t)->left.p1.y != (t)->left.p2.y && \
 			 (t)->right.p1.y != (t)->right.p2.y && \
-			 (int) ((t)->bottom - (t)->top) > 0)
+			 ((t)->bottom > (t)->top))
 
 /*
  * Standard NTSC luminance conversions:



CVS commit: [netbsd-5] xsrc/external/mit/xorg-server/dist

2014-12-10 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Wed Dec 10 22:58:41 UTC 2014

Modified Files:
xsrc/external/mit/xorg-server/dist/include [netbsd-5]: dix.h
xsrc/external/mit/xorg-server/dist/os [netbsd-5]: access.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1935):
external/mit/xorg-server/dist/include/dix.h: revision 1.3
external/mit/xorg-server/dist/os/access.c: revision 1.3 via patch
apply two more parts of CVE-2014-8092:
  Missing parens in REQUEST_FIXED_SIZE macro [CVE-2014-8092 pt. 5]
  dix: GetHosts bounds check using wrong pointer value [CVE-2014-8092 pt. 6]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \
xsrc/external/mit/xorg-server/dist/include/dix.h
cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \
xsrc/external/mit/xorg-server/dist/os/access.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/include/dix.h
diff -u xsrc/external/mit/xorg-server/dist/include/dix.h:1.1.1.1.2.2 xsrc/external/mit/xorg-server/dist/include/dix.h:1.1.1.1.2.3
--- xsrc/external/mit/xorg-server/dist/include/dix.h:1.1.1.1.2.2	Tue Dec  9 19:55:10 2014
+++ xsrc/external/mit/xorg-server/dist/include/dix.h	Wed Dec 10 22:58:41 2014
@@ -78,7 +78,7 @@ SOFTWARE.
 
 #define REQUEST_FIXED_SIZE(req, n)\
 if (((sizeof(req) >> 2) > client->req_len) || \
-((n >> 2) >= client->req_len) || \
+(((n) >> 2) >= client->req_len) || \
 uint64_t) sizeof(req) + (n) + 3) >> 2) != (uint64_t) client->req_len))  \
  return(BadLength)
 

Index: xsrc/external/mit/xorg-server/dist/os/access.c
diff -u xsrc/external/mit/xorg-server/dist/os/access.c:1.1.1.1.2.2 xsrc/external/mit/xorg-server/dist/os/access.c:1.1.1.1.2.3
--- xsrc/external/mit/xorg-server/dist/os/access.c:1.1.1.1.2.2	Tue Dec  9 19:55:10 2014
+++ xsrc/external/mit/xorg-server/dist/os/access.c	Wed Dec 10 22:58:41 2014
@@ -1474,7 +1474,7 @@ GetHosts (
 for (host = validhosts; host; host = host->next)
 	{
 	len = host->len;
-if ((ptr + sizeof(xHostEntry) + len) > ((unsigned char *)data + n))
+if ((ptr + sizeof(xHostEntry) + len) > ((unsigned char *) *data + n))
 break;
 	((xHostEntry *)ptr)->family = host->family;
 	((xHostEntry *)ptr)->length = len;



CVS commit: [netbsd-5] xsrc/external/mit/xorg-server/dist

2014-12-09 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Tue Dec  9 19:55:11 UTC 2014

Modified Files:
xsrc/external/mit/xorg-server/dist/Xext [netbsd-5]: xcmisc.c xvdisp.c
xsrc/external/mit/xorg-server/dist/Xi [netbsd-5]: chgdctl.c chgfctl.c
sendexev.c xiproperty.c
xsrc/external/mit/xorg-server/dist/dbe [netbsd-5]: dbe.c
xsrc/external/mit/xorg-server/dist/dix [netbsd-5]: dispatch.c
xsrc/external/mit/xorg-server/dist/glx [netbsd-5]: glxcmds.c
glxcmdsswap.c glxserver.h indirect_program.c indirect_reqsize.c
indirect_reqsize.h indirect_texture_compression.c indirect_util.c
rensize.c single2.c single2swap.c singlepix.c singlepixswap.c
swap_interval.c unpack.h
xsrc/external/mit/xorg-server/dist/hw/xfree86/dri2 [netbsd-5]:
dri2ext.c
xsrc/external/mit/xorg-server/dist/include [netbsd-5]: dix.h misc.h
xsrc/external/mit/xorg-server/dist/os [netbsd-5]: access.c rpcauth.c
xsrc/external/mit/xorg-server/dist/randr [netbsd-5]: rrsdispatch.c
xsrc/external/mit/xorg-server/dist/render [netbsd-5]: render.c
xsrc/external/mit/xorg-server/dist/xfixes [netbsd-5]: select.c

Log Message:
Apply patch (requested by mrg in ticket #1935):
apply fixes for X.Org Security Advisory:  Dec. 9, 2014
Protocol handling issues in X Window System servers

included are fixes for:

denial of service due to unchecked malloc in client authentication
   CVE-2014-8091
integer overflows calculating memory needs for requests
   CVE-2014-8092
   CVE-2014-8093
   CVE-2014-8094
out of bounds access due to not validating length or offset values in requests
   CVE-2014-8095
   CVE-2014-8096
   CVE-2014-8097
   CVE-2014-8098
   CVE-2014-8099
   CVE-2014-8100
   CVE-2014-8101
   CVE-2014-8102
   CVE-2014-8103


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xorg-server/dist/Xext/xcmisc.c \
xsrc/external/mit/xorg-server/dist/Xext/xvdisp.c
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xorg-server/dist/Xi/chgdctl.c \
xsrc/external/mit/xorg-server/dist/Xi/chgfctl.c \
xsrc/external/mit/xorg-server/dist/Xi/sendexev.c
cvs rdiff -u -r1.1.1.2.2.2 -r1.1.1.2.2.3 \
xsrc/external/mit/xorg-server/dist/Xi/xiproperty.c
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xorg-server/dist/dbe/dbe.c
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xorg-server/dist/dix/dispatch.c
cvs rdiff -u -r1.1.1.2.2.2 -r1.1.1.2.2.3 \
xsrc/external/mit/xorg-server/dist/glx/glxcmds.c
cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \
xsrc/external/mit/xorg-server/dist/glx/glxcmdsswap.c \
xsrc/external/mit/xorg-server/dist/glx/glxserver.h \
xsrc/external/mit/xorg-server/dist/glx/indirect_program.c \
xsrc/external/mit/xorg-server/dist/glx/indirect_reqsize.c \
xsrc/external/mit/xorg-server/dist/glx/indirect_reqsize.h \
xsrc/external/mit/xorg-server/dist/glx/indirect_texture_compression.c \
xsrc/external/mit/xorg-server/dist/glx/indirect_util.c \
xsrc/external/mit/xorg-server/dist/glx/rensize.c \
xsrc/external/mit/xorg-server/dist/glx/single2.c \
xsrc/external/mit/xorg-server/dist/glx/single2swap.c \
xsrc/external/mit/xorg-server/dist/glx/singlepix.c \
xsrc/external/mit/xorg-server/dist/glx/singlepixswap.c \
xsrc/external/mit/xorg-server/dist/glx/swap_interval.c \
xsrc/external/mit/xorg-server/dist/glx/unpack.h
cvs rdiff -u -r1.1.1.2.2.2 -r1.1.1.2.2.3 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/dri2/dri2ext.c
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xorg-server/dist/include/dix.h \
xsrc/external/mit/xorg-server/dist/include/misc.h
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xorg-server/dist/os/access.c \
xsrc/external/mit/xorg-server/dist/os/rpcauth.c
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xorg-server/dist/randr/rrsdispatch.c
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xorg-server/dist/render/render.c
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xorg-server/dist/xfixes/select.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/Xext/xcmisc.c
diff -u xsrc/external/mit/xorg-server/dist/Xext/xcmisc.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/Xext/xcmisc.c:1.1.1.1.2.2
--- xsrc/external/mit/xorg-server/dist/Xext/xcmisc.c:1.1.1.1.2.1	Thu Sep 17 03:34:49 2009
+++ xsrc/external/mit/xorg-server/dist/Xext/xcmisc.c	Tue Dec  9 19:55:10 2014
@@ -200,6 +200,7 @@ SProcXCMiscGetXIDList(client)
 {
 int n;
 REQUEST(xXCMiscGetXIDListReq);
+REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq);
 
 swaps(&stuff->length, n);
 swapl(&stuff->count, n);
Index: xsrc/external/mit/xorg-server/d

CVS commit: [netbsd-5] xsrc/external/mit/libX11/dist/src/xkb

2013-09-18 Thread Manuel Bouyer
Module Name:xsrc
Committed By:   bouyer
Date:   Wed Sep 18 19:44:57 UTC 2013

Modified Files:
xsrc/external/mit/libX11/dist/src/xkb [netbsd-5]: XKBGetMap.c
XKBNames.c

Log Message:
Apply patch, requested by riz in ticket #1877
xsrc/external/mit/libX11/dist/src/xkb/XKBNames.cpatch

The size of the arrays is max_key_code + 1. This makes these functions
consistent with the other checks added for CVE-2013-1997.
Check the XkbGetNames reply when names->keys was just allocated
Should fix PR lib/48170.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \
xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c \
xsrc/external/mit/libX11/dist/src/xkb/XKBNames.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c
diff -u xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c:1.1.1.1.2.2 xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c:1.1.1.1.2.3
--- xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c:1.1.1.1.2.2	Thu Jun  6 16:38:18 2013
+++ xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c	Wed Sep 18 19:44:57 2013
@@ -431,7 +431,7 @@ XkbServerMapPtr		srv;
 
 if ( rep->totalVModMapKeys>0 ) {
 	if (((int) rep->firstVModMapKey + rep->nVModMapKeys)
-	 > xkb->max_key_code)
+	 > xkb->max_key_code + 1)
 	return BadLength;
 	if (((xkb->server==NULL)||(xkb->server->vmodmap==NULL))&&
 	(XkbAllocServerMap(xkb,XkbVirtualModMapMask,0)!=Success)) {
Index: xsrc/external/mit/libX11/dist/src/xkb/XKBNames.c
diff -u xsrc/external/mit/libX11/dist/src/xkb/XKBNames.c:1.1.1.1.2.2 xsrc/external/mit/libX11/dist/src/xkb/XKBNames.c:1.1.1.1.2.3
--- xsrc/external/mit/libX11/dist/src/xkb/XKBNames.c:1.1.1.1.2.2	Thu Jun  6 16:38:18 2013
+++ xsrc/external/mit/libX11/dist/src/xkb/XKBNames.c	Wed Sep 18 19:44:57 2013
@@ -184,7 +184,7 @@ _XkbReadGetNamesReply(	Display *		dpy,
 	nKeys= xkb->max_key_code+1;
 	names->keys= _XkbTypedCalloc(nKeys,XkbKeyNameRec);
 	}
-	else if ( ((int)rep->firstKey + rep->nKeys) > xkb->max_key_code)
+	if ( ((int)rep->firstKey + rep->nKeys) > xkb->max_key_code + 1)
 	goto BAILOUT;
 	if (names->keys!=NULL) {
 	if (!_XkbCopyFromReadBuffer(&buf,



CVS commit: [netbsd-5] xsrc/external/mit/expat/dist

2012-11-26 Thread Jeff Rizzo
Module Name:xsrc
Committed By:   riz
Date:   Mon Nov 26 20:00:19 UTC 2012

Modified Files:
xsrc/external/mit/expat/dist/lib [netbsd-5]: expat.h xmlparse.c
xsrc/external/mit/expat/dist/xmlwf [netbsd-5]: readfilemap.c

Log Message:
xsrc/external/mit/expat/dist/lib/expat.hpatch
xsrc/external/mit/expat/dist/lib/xmlparse.c patch
xsrc/external/mit/expat/dist/xmlwf/readfilemap.cpatch

Address CVE-2012-1147, CVE-2012-1148 and CVE-2012-0876.
[spz, ticket #1821]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.2.1 xsrc/external/mit/expat/dist/lib/expat.h
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/expat/dist/lib/xmlparse.c
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.2.1 \
xsrc/external/mit/expat/dist/xmlwf/readfilemap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/expat/dist/lib/expat.h
diff -u xsrc/external/mit/expat/dist/lib/expat.h:1.1.1.1 xsrc/external/mit/expat/dist/lib/expat.h:1.1.1.1.2.1
--- xsrc/external/mit/expat/dist/lib/expat.h:1.1.1.1	Tue Jul 29 05:35:06 2008
+++ xsrc/external/mit/expat/dist/lib/expat.h	Mon Nov 26 20:00:18 2012
@@ -883,6 +883,15 @@ XMLPARSEAPI(int)
 XML_SetParamEntityParsing(XML_Parser parser,
   enum XML_ParamEntityParsing parsing);
 
+/* Sets the hash salt to use for internal hash calculations.
+   Helps in preventing DoS attacks based on predicting hash
+   function behavior. This must be called before parsing is started.
+   Returns 1 if successful, 0 when called after parsing has started.
+*/
+XMLPARSEAPI(int)
+XML_SetHashSalt(XML_Parser parser,
+unsigned long hash_salt);
+
 /* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then
XML_GetErrorCode returns information about the error.
 */

Index: xsrc/external/mit/expat/dist/lib/xmlparse.c
diff -u xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1.2.1 xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1.2.2
--- xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1.2.1	Wed Jan 27 20:43:00 2010
+++ xsrc/external/mit/expat/dist/lib/xmlparse.c	Mon Nov 26 20:00:19 2012
@@ -5,6 +5,8 @@
 #include 
 #include  /* memset(), memcpy() */
 #include 
+#include  /* UINT_MAX */
+#include/* time() */
 
 #define XML_BUILDING_EXPAT 1
 
@@ -391,12 +393,13 @@ static void dtdReset(DTD *p, const XML_M
 static void
 dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms);
 static int
-dtdCopy(DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms);
+dtdCopy(XML_Parser oldParser,
+DTD *newDtd, const DTD *oldDtd, const XML_Memory_Handling_Suite *ms);
 static int
-copyEntityTable(HASH_TABLE *, STRING_POOL *, const HASH_TABLE *);
-
+copyEntityTable(XML_Parser oldParser,
+HASH_TABLE *, STRING_POOL *, const HASH_TABLE *);
 static NAMED *
-lookup(HASH_TABLE *table, KEY name, size_t createSize);
+lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize);
 static void FASTCALL
 hashTableInit(HASH_TABLE *, const XML_Memory_Handling_Suite *ms);
 static void FASTCALL hashTableClear(HASH_TABLE *);
@@ -429,11 +432,15 @@ static ELEMENT_TYPE *
 getElementType(XML_Parser parser, const ENCODING *enc,
const char *ptr, const char *end);
 
+static unsigned long generate_hash_secret_salt(void);
+static XML_Bool startParsing(XML_Parser parser);
+
 static XML_Parser
 parserCreate(const XML_Char *encodingName,
  const XML_Memory_Handling_Suite *memsuite,
  const XML_Char *nameSep,
  DTD *dtd);
+
 static void
 parserInit(XML_Parser parser, const XML_Char *encodingName);
 
@@ -546,6 +553,7 @@ struct XML_ParserStruct {
   XML_Bool m_useForeignDTD;
   enum XML_ParamEntityParsing m_paramEntityParsing;
 #endif
+  unsigned long m_hash_secret_salt;
 };
 
 #define MALLOC(s) (parser->m_mem.malloc_fcn((s)))
@@ -653,6 +661,7 @@ struct XML_ParserStruct {
 #define useForeignDTD (parser->m_useForeignDTD)
 #define paramEntityParsing (parser->m_paramEntityParsing)
 #endif /* XML_DTD */
+#define hash_secret_salt (parser->m_hash_secret_salt)
 
 XML_Parser XMLCALL
 XML_ParserCreate(const XML_Char *encodingName)
@@ -677,22 +686,35 @@ static const XML_Char implicitContext[] 
   ASCII_s, ASCII_p, ASCII_a, ASCII_c, ASCII_e, '\0'
 };
 
+static unsigned long
+generate_hash_secret_salt(void)
+{
+  unsigned int seed = time(NULL) % UINT_MAX;
+  srand(seed);
+  return rand();
+}
+
+static XML_Bool  /* only valid for root parser */
+startParsing(XML_Parser parser)
+{
+/* hash functions must be initialized before setContext() is called */
+if (hash_secret_salt == 0)
+  hash_secret_salt = generate_hash_secret_salt();
+if (ns) {
+  /* implicit context only set for root parser, since child
+ parsers (i.e. external entity par

CVS commit: [netbsd-5] xsrc/external/mit/xrdb/dist

2011-04-07 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Thu Apr  7 16:30:26 UTC 2011

Removed Files:
xsrc/external/mit/xrdb/dist [netbsd-5]: NEWS xrdb.man

Log Message:
Remove these two files.  Missed in ticket 1594.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/xrdb/dist/NEWS
cvs rdiff -u -r1.1.1.1.2.1 -r0 xsrc/external/mit/xrdb/dist/xrdb.man

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-5] xsrc/external/mit/xrdb/dist/man

2011-04-06 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Thu Apr  7 06:44:14 UTC 2011

Added Files:
xsrc/external/mit/xrdb/dist/man [netbsd-5]: Makefile.am Makefile.in
xrdb.man

Log Message:
Apply patch (requested by mrg in ticket #1594):
Fix CVE-2011-0465


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.1.1.2.2 xsrc/external/mit/xrdb/dist/man/Makefile.am \
xsrc/external/mit/xrdb/dist/man/Makefile.in \
xsrc/external/mit/xrdb/dist/man/xrdb.man

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: xsrc/external/mit/xrdb/dist/man/Makefile.am
diff -u /dev/null xsrc/external/mit/xrdb/dist/man/Makefile.am:1.1.1.1.2.2
--- /dev/null	Thu Apr  7 06:44:14 2011
+++ xsrc/external/mit/xrdb/dist/man/Makefile.am	Thu Apr  7 06:44:14 2011
@@ -0,0 +1,12 @@
+
+appmandir = $(APP_MAN_DIR)
+appman_PRE = xrdb.man
+appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX))
+
+EXTRA_DIST = $(appman_PRE)
+CLEANFILES = $(appman_DATA)
+SUFFIXES = .$(APP_MAN_SUFFIX) .man
+
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
+.man.$(APP_MAN_SUFFIX):
+	$(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
Index: xsrc/external/mit/xrdb/dist/man/Makefile.in
diff -u /dev/null xsrc/external/mit/xrdb/dist/man/Makefile.in:1.1.1.1.2.2
--- /dev/null	Thu Apr  7 06:44:14 2011
+++ xsrc/external/mit/xrdb/dist/man/Makefile.in	Thu Apr  7 06:44:14 2011
@@ -0,0 +1,415 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = man
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN   " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+*) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+if (++n[$$2] == $(am__install_max)) \
+  { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(appmandir)"
+DATA = $(appman_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ADMIN_MAN_DIR = @ADMIN_MAN_DIR@
+ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APP_MAN_DIR = @APP_MAN_DIR@
+APP_MAN_SUFFIX = @APP_MAN_SUFFIX@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHANGELOG_CMD = @CHANGELOG_CMD@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPP_PATH = @CPP_PATH@
+CWARNFLAGS = @CWARNFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR

CVS commit: [netbsd-5] xsrc/external/mit/libpciaccess/dist/src

2011-03-07 Thread Jeff Rizzo
Module Name:xsrc
Committed By:   riz
Date:   Mon Mar  7 18:45:47 UTC 2011

Modified Files:
xsrc/external/mit/libpciaccess/dist/src [netbsd-5]: netbsd_pci.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #1557):
xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c: revision 1.8
external/mit/xorg/lib/libpciaccess/Makefile: revision 1.5
external/mit/xorg/lib/libpciaccess/Makefile: revision 1.6
Fix compilation with HAVE_MTRR
HAVE_MMTR -> HAVE_MTRR
only define HAVE_MTRR on x86


To generate a diff of this commit:
cvs rdiff -u -r1.4.2.3 -r1.4.2.4 \
xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c
diff -u xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.4.2.3 xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.4.2.4
--- xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.4.2.3	Sat Jan  9 01:59:59 2010
+++ xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c	Mon Mar  7 18:45:46 2011
@@ -135,7 +135,7 @@
 
 	if (map->flags & PCI_DEV_MAP_FLAG_WRITABLE)
 		prot |= PROT_WRITE;
-	map->memory = mmap(NULL, map->size, prot, MAP_SHARED,
+	map->memory = mmap(NULL, (size_t)map->size, prot, MAP_SHARED,
 	buses[dev->domain].fd, (off_t)map->base);
 	if (map->memory == MAP_FAILED)
 		return errno;
@@ -146,17 +146,19 @@
 	/* No need to set an MTRR if it's the default mode. */
 	if ((map->flags & PCI_DEV_MAP_FLAG_CACHABLE) ||
 	(map->flags & PCI_DEV_MAP_FLAG_WRITE_COMBINE)) {
-		m.base = base;
+		m.base = map->base;
 		m.flags = MTRR_VALID | MTRR_PRIVATE;
-		m.len = size;
+		m.len = map->size;
 		m.owner = getpid();
-		if (map->flags & PCI_DEV_MAP_FLAG_CACHEABLE)
+		if (map->flags & PCI_DEV_MAP_FLAG_CACHABLE)
 			m.type = MTRR_TYPE_WB;
 		if (map->flags & PCI_DEV_MAP_FLAG_WRITE_COMBINE)
 			m.type = MTRR_TYPE_WC;
 
-		if ((netbsd_set_mtrr(&m, &n)) == -1)
-			ret = errno;
+		if ((netbsd_set_mtrr(&m, &n)) == -1) {
+			fprintf(stderr, "mtrr set failed: %s\n",
+			strerror(errno));
+		}
 	}
 #endif
 
@@ -177,7 +179,7 @@
 	(map->flags & PCI_DEV_MAP_FLAG_WRITE_COMBINE)) {
 		m.base = map->base;
 		m.flags = 0;
-		m.len = size;
+		m.len = map->size;
 		m.type = MTRR_TYPE_UC;
 		(void)netbsd_set_mtrr(&m, &n);
 	}



CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-ati/dist

2011-02-14 Thread Manuel Bouyer
Module Name:xsrc
Committed By:   bouyer
Date:   Mon Feb 14 19:26:18 UTC 2011

Modified Files:
xsrc/external/mit/xf86-video-ati/dist [netbsd-5]: compile

Log Message:
Fix fallout from ticket #1524 (patch applied twice to new files),
pointed out by veego@


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \
xsrc/external/mit/xf86-video-ati/dist/compile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-ati/dist/compile
diff -u xsrc/external/mit/xf86-video-ati/dist/compile:1.1.1.1.2.2 xsrc/external/mit/xf86-video-ati/dist/compile:1.1.1.1.2.3
--- xsrc/external/mit/xf86-video-ati/dist/compile:1.1.1.1.2.2	Sun Jan 16 14:35:52 2011
+++ xsrc/external/mit/xf86-video-ati/dist/compile	Mon Feb 14 19:26:18 2011
@@ -141,146 +141,3 @@
 # time-stamp-time-zone: "UTC"
 # time-stamp-end: "; # UTC"
 # End:
-#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
-
-scriptversion=2009-10-06.20; # UTC
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
-# Foundation, Inc.
-# Written by Tom Tromey .
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see .
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to  or send patches to
-# .
-
-case $1 in
-  '')
- echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
- exit 1;
- ;;
-  -h | --h*)
-cat <<\EOF
-Usage: compile [--help] [--version] PROGRAM [ARGS]
-
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
-arguments, and rename the output as expected.
-
-If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
-
-Report bugs to .
-EOF
-exit $?
-;;
-  -v | --v*)
-echo "compile $scriptversion"
-exit $?
-;;
-esac
-
-ofile=
-cfile=
-eat=
-
-for arg
-do
-  if test -n "$eat"; then
-eat=
-  else
-case $1 in
-  -o)
-	# configure might choose to run compile as `compile cc -o foo foo.c'.
-	# So we strip `-o arg' only if arg is an object.
-	eat=1
-	case $2 in
-	  *.o | *.obj)
-	ofile=$2
-	;;
-	  *)
-	set x "$@" -o "$2"
-	shift
-	;;
-	esac
-	;;
-  *.c)
-	cfile=$1
-	set x "$@" "$1"
-	shift
-	;;
-  *)
-	set x "$@" "$1"
-	shift
-	;;
-esac
-  fi
-  shift
-done
-
-if test -z "$ofile" || test -z "$cfile"; then
-  # If no `-o' option was seen then we might have been invoked from a
-  # pattern rule where we don't need one.  That is ok -- this is a
-  # normal compilation that the losing compiler can handle.  If no
-  # `.c' file was seen then we are probably linking.  That is also
-  # ok.
-  exec "$@"
-fi
-
-# Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
-
-# Create the lock directory.
-# Note: use `[/\\:.-]' here to ensure that we don't use the same name
-# that we are using for the .o file.  Also, base the name on the expected
-# object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
-while true; do
-  if mkdir "$lockdir" >/dev/null 2>&1; then
-break
-  fi
-  sleep 1
-done
-# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir '$lockdir'; exit 1" 1 2 15
-
-# Run the compile.
-"$@"
-ret=$?
-
-if test -f "$cofile"; then
-  test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
-elif test -f "${cofile}bj"; then
-  test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
-fi
-
-rmdir "$lockdir"
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:



CVS commit: [netbsd-5] xsrc/external/mit/xorg-server/dist/render

2010-04-04 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Sun Apr  4 23:02:07 UTC 2010

Modified Files:
xsrc/external/mit/xorg-server/dist/render [netbsd-5]: glyph.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1361):
external/mit/xorg-server/dist/render/glyph.c: revision 1.2
import fdo git change 185185eeb44a277c324be0f58a4b4a469b56b69b, which
i've seen twice in the last two days:
Fix crash when all glyphs of a given depth are freed, but not all glyphsets
This is how the crash can be triggered with only two clients on the system:
Client A: (already running)
Client B: Connect
Client B: CreateGlyphSet(depthN)
Client A: Disconnect
Server: free globalGlyphs(depthN)
Client B: AddGlyphs(depthN)
Server: SEGV
This crash was introduced with the FindGlyphsByHash function
in 516b96387b0e57b524a37a96da22dbeeeb041712. Before that revision,
ResizeGlyphSet was always called before FindGlyphRef, which would
re-create globalGlyphs(depthN) if necessary.
X.Org Bug 20718 
XXX: needs netbsd-5 pullup.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xorg-server/dist/render/glyph.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/render/glyph.c
diff -u xsrc/external/mit/xorg-server/dist/render/glyph.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/render/glyph.c:1.1.1.1.2.2
--- xsrc/external/mit/xorg-server/dist/render/glyph.c:1.1.1.1.2.1	Thu Sep 17 03:35:47 2009
+++ xsrc/external/mit/xorg-server/dist/render/glyph.c	Sun Apr  4 23:02:07 2010
@@ -235,6 +235,9 @@
 GlyphRefPtr gr;
 CARD32 signature = *(CARD32 *) sha1;
 
+if (!globalGlyphs[format].hashSet)
+return NULL;
+
 gr = FindGlyphRef (&globalGlyphs[format],
 		   signature, TRUE, sha1);
 



CVS commit: [netbsd-5] xsrc/external/mit/MesaLib/dist/src/mesa/glapi

2010-01-30 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Sat Jan 30 19:09:15 UTC 2010

Modified Files:
xsrc/external/mit/MesaLib/dist/src/mesa/glapi [netbsd-5]: glapi.c
glapi_getproc.c glthread.c

Log Message:
Pull up following revision(s) (requested by rafal in ticket #1270):
external/mit/MesaLib/dist/src/mesa/glapi/glapi.c: revision 1.2
external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c: revision 1.2
external/mit/MesaLib/dist/src/mesa/glapi/glthread.c: revision 1.2
Decorate some GL APIs with PUBLIC so they're available to link against;
otherwise e.g. the swrast DRI module can't find _glapi_check_multithread.
>From http://people.freedesktop.org/~krh/glapi.patch with some tweaks.
ok phone@


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c \
xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c
cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \
xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c
diff -u xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c:1.1.1.1.2.1 xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c:1.1.1.1.2.2
--- xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c:1.1.1.1.2.1	Thu Sep 17 03:32:30 2009
+++ xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi.c	Sat Jan 30 19:09:15 2010
@@ -221,7 +221,7 @@
  * We should call this periodically from a function such as glXMakeCurrent
  * in order to test if multiple threads are being used.
  */
-void
+PUBLIC void
 _glapi_check_multithread(void)
 {
 #if defined(THREADS) && !defined(GLX_USE_TLS)
Index: xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c
diff -u xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c:1.1.1.1.2.1 xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c:1.1.1.1.2.2
--- xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c:1.1.1.1.2.1	Thu Sep 17 03:32:30 2009
+++ xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glthread.c	Sat Jan 30 19:09:15 2010
@@ -36,7 +36,7 @@
 #include 
 #include 
 #include "glthread.h"
-
+#include "main/glheader.h"
 
 /*
  * This file should still compile even when THREADS is not defined.
@@ -71,7 +71,7 @@
  */
 #ifdef PTHREADS
 
-unsigned long
+PUBLIC unsigned long
 _glthread_GetID(void)
 {
return (unsigned long) pthread_self();
@@ -125,7 +125,7 @@
 #define USE_LOCK_FOR_KEY	/* undef this to try a version without
    lock for the global key... */
 
-unsigned long
+PUBLIC unsigned long
 _glthread_GetID(void)
 {
abort();   /* XXX not implemented yet */
@@ -203,7 +203,7 @@
DWORD dwErr=GetLastError();
 }
 
-unsigned long
+PUBLIC unsigned long
 _glthread_GetID(void)
 {
return GetCurrentThreadId();
@@ -304,7 +304,7 @@
  */
 #ifdef BEOS_THREADS
 
-unsigned long
+PUBLIC unsigned long
 _glthread_GetID(void)
 {
return (unsigned long) find_thread(NULL);
@@ -346,7 +346,7 @@
  * no-op functions
  */
 
-unsigned long
+PUBLIC unsigned long
 _glthread_GetID(void)
 {
return 0;

Index: xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c
diff -u xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c:1.1.1.1.2.2 xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c:1.1.1.1.2.3
--- xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c:1.1.1.1.2.2	Thu Sep 17 03:32:30 2009
+++ xsrc/external/mit/MesaLib/dist/src/mesa/glapi/glapi_getproc.c	Sat Jan 30 19:09:15 2010
@@ -563,7 +563,7 @@
  * in the name of static functions, try generating a new API entrypoint on
  * the fly with assembly language.
  */
-_glapi_proc
+PUBLIC _glapi_proc
 _glapi_get_proc_address(const char *funcName)
 {
struct _glapi_function * entry;



CVS commit: [netbsd-5] xsrc/external/mit/expat/dist/lib

2010-01-27 Thread Manuel Bouyer
Module Name:xsrc
Committed By:   bouyer
Date:   Wed Jan 27 20:43:00 UTC 2010

Modified Files:
xsrc/external/mit/expat/dist/lib [netbsd-5]: xmlparse.c

Log Message:
Pull up following revision(s) (requested by tron in ticket #1283):
xsrc/external/mit/expat/dist/lib/xmlparse.c: revision 1.2
Add patch from upstream CVS to fix CVE-2009-3560 (possible DOS due to
crash on bad input).


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.2.1 \
xsrc/external/mit/expat/dist/lib/xmlparse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/expat/dist/lib/xmlparse.c
diff -u xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1 xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1.2.1
--- xsrc/external/mit/expat/dist/lib/xmlparse.c:1.1.1.1	Tue Jul 29 05:35:07 2008
+++ xsrc/external/mit/expat/dist/lib/xmlparse.c	Wed Jan 27 20:43:00 2010
@@ -3703,6 +3703,9 @@
 return XML_ERROR_UNCLOSED_TOKEN;
   case XML_TOK_PARTIAL_CHAR:
 return XML_ERROR_PARTIAL_CHAR;
+  case -XML_TOK_PROLOG_S:
+	tok = -tok;
+	break;
   case XML_TOK_NONE:
 #ifdef XML_DTD
 /* for internal PE NOT referenced between declarations */



CVS commit: [netbsd-5] xsrc/external/mit

2010-01-10 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Mon Jan 11 00:42:35 UTC 2010

Modified Files:
xsrc/external/mit/libFS/include [netbsd-5]: config.h
xsrc/external/mit/pixman/include [netbsd-5]: config.h
xsrc/external/mit/xf86-video-siliconmotion/include [netbsd-5]: config.h
xsrc/external/mit/xmag/include [netbsd-5]: config.h
xsrc/external/mit/xwininfo/include [netbsd-5]: config.h

Log Message:
Apply patch (requested by veego in ticket #1234):
Regenerate a few config.h files.  Should have been done with the big X.Org
update.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 xsrc/external/mit/libFS/include/config.h
cvs rdiff -u -r1.2.2.2 -r1.2.2.3 xsrc/external/mit/pixman/include/config.h
cvs rdiff -u -r1.3.2.2 -r1.3.2.3 \
xsrc/external/mit/xf86-video-siliconmotion/include/config.h
cvs rdiff -u -r1.1 -r1.1.2.1 xsrc/external/mit/xmag/include/config.h
cvs rdiff -u -r1.1 -r1.1.2.1 xsrc/external/mit/xwininfo/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/libFS/include/config.h
diff -u xsrc/external/mit/libFS/include/config.h:1.1.2.1 xsrc/external/mit/libFS/include/config.h:1.1.2.2
--- xsrc/external/mit/libFS/include/config.h:1.1.2.1	Thu Sep 17 03:32:53 2009
+++ xsrc/external/mit/libFS/include/config.h	Mon Jan 11 00:42:34 2010
@@ -10,6 +10,9 @@
 /* Define to 1 if you have the  header file. */
 #define HAVE_INTTYPES_H 1
 
+/* Define to 1 if you have the `ws2_32' library (-lws2_32). */
+/* #undef HAVE_LIBWS2_32 */
+
 /* Define to 1 if you have the  header file. */
 #define HAVE_MEMORY_H 1
 
@@ -83,4 +86,4 @@
 #define UNIXCONN 1
 
 /* Version number of package */
-#define VERSION "1.0.1"
+#define VERSION "1.0.2"

Index: xsrc/external/mit/pixman/include/config.h
diff -u xsrc/external/mit/pixman/include/config.h:1.2.2.2 xsrc/external/mit/pixman/include/config.h:1.2.2.3
--- xsrc/external/mit/pixman/include/config.h:1.2.2.2	Tue Dec  1 23:16:33 2009
+++ xsrc/external/mit/pixman/include/config.h	Mon Jan 11 00:42:34 2010
@@ -16,6 +16,9 @@
 /* Define to 1 if you have the  header file. */
 #define HAVE_MEMORY_H 1
 
+/* Whether we have posix_memalign() */
+#define HAVE_POSIX_MEMALIGN 1
+
 /* Define to 1 if you have the  header file. */
 #define HAVE_STDINT_H 1
 

Index: xsrc/external/mit/xf86-video-siliconmotion/include/config.h
diff -u xsrc/external/mit/xf86-video-siliconmotion/include/config.h:1.3.2.2 xsrc/external/mit/xf86-video-siliconmotion/include/config.h:1.3.2.3
--- xsrc/external/mit/xf86-video-siliconmotion/include/config.h:1.3.2.2	Thu Sep 17 03:34:21 2009
+++ xsrc/external/mit/xf86-video-siliconmotion/include/config.h	Mon Jan 11 00:42:35 2010
@@ -33,12 +33,11 @@
 /* Define to 1 if you have the  header file. */
 #define HAVE_UNISTD_H 1
 
-/* X server has new mode code */
-/* #undef HAVE_XMODES */
+/* xextproto 7.1 available */
+/* #undef HAVE_XEXTPROTO_71 */
 
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#define LT_OBJDIR ".libs/"
+/* X server has new mode code */
+#define HAVE_XMODES 1
 
 /* Name of package */
 #define PACKAGE "xf86-video-siliconmotion"

Index: xsrc/external/mit/xmag/include/config.h
diff -u xsrc/external/mit/xmag/include/config.h:1.1 xsrc/external/mit/xmag/include/config.h:1.1.2.1
--- xsrc/external/mit/xmag/include/config.h:1.1	Wed Jul 30 05:42:21 2008
+++ xsrc/external/mit/xmag/include/config.h	Mon Jan 11 00:42:35 2010
@@ -1,6 +1,12 @@
 /* config.h.  Generated from config.h.in by configure.  */
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
+/* Define to 1 if you have the  header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_MEMORY_H 1
+
 /* Define to 1 if you have the `nanosleep' function. */
 #define HAVE_NANOSLEEP 1
 
@@ -10,6 +16,27 @@
 /* Define to 1 if you have the `select' function. */
 #define HAVE_SELECT 1
 
+/* Define to 1 if you have the  header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_UNISTD_H 1
+
 /* Name of package */
 #define PACKAGE "xmag"
 
@@ -20,13 +47,13 @@
 #define PACKAGE_NAME "xmag"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "xmag 1.0.2"
+#define PACKAGE_STRING "xmag 1.0.3"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "xmag"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "1.0.2"
+#define PACKAGE_VERSION "1.0.3"
 
 /* Major 

CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-radeonhd/dist

2010-01-10 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Mon Jan 11 00:20:32 UTC 2010

Added Files:
xsrc/external/mit/xf86-video-radeonhd/dist [netbsd-5]: acinclude.m4
shave-libtool.in shave.in
xsrc/external/mit/xf86-video-radeonhd/dist/src [netbsd-5]:
atombios_rev.h rhd_acpi.c rhd_acpi.h rhd_pm.c rhd_pm.h

Log Message:
Apply patch (requested by veego in ticket #1233):
Update xf86-video-radeonhd to 1.3.0.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.1.1.2.2 \
xsrc/external/mit/xf86-video-radeonhd/dist/acinclude.m4 \
xsrc/external/mit/xf86-video-radeonhd/dist/shave-libtool.in \
xsrc/external/mit/xf86-video-radeonhd/dist/shave.in
cvs rdiff -u -r0 -r1.1.1.1.2.2 \
xsrc/external/mit/xf86-video-radeonhd/dist/src/atombios_rev.h \
xsrc/external/mit/xf86-video-radeonhd/dist/src/rhd_acpi.c \
xsrc/external/mit/xf86-video-radeonhd/dist/src/rhd_acpi.h \
xsrc/external/mit/xf86-video-radeonhd/dist/src/rhd_pm.c \
xsrc/external/mit/xf86-video-radeonhd/dist/src/rhd_pm.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: xsrc/external/mit/xf86-video-radeonhd/dist/acinclude.m4
diff -u /dev/null xsrc/external/mit/xf86-video-radeonhd/dist/acinclude.m4:1.1.1.1.2.2
--- /dev/null	Mon Jan 11 00:20:32 2010
+++ xsrc/external/mit/xf86-video-radeonhd/dist/acinclude.m4	Mon Jan 11 00:20:32 2010
@@ -0,0 +1,77 @@
+dnl Make automake/libtool output more friendly to humans
+dnl  Damien Lespiau 
+dnl
+dnl SHAVE_INIT([shavedir],[default_mode])
+dnl
+dnl shavedir: the directory where the shave scripts are, it defaults to
+dnl   $(top_builddir)
+dnl default_mode: (enable|disable) default shave mode.  This parameter
+dnl   controls shave's behaviour when no option has been
+dnl   given to configure.  It defaults to disable.
+dnl
+dnl * SHAVE_INIT should be called late in your configure.(ac|in) file (just
+dnl   before AC_CONFIG_FILE/AC_OUTPUT is perfect.  This macro rewrites CC and
+dnl   LIBTOOL, you don't want the configure tests to have these variables
+dnl   re-defined.
+dnl * This macro requires GNU make's -s option.
+
+AC_DEFUN([_SHAVE_ARG_ENABLE],
+[
+  AC_ARG_ENABLE([shave],
+AS_HELP_STRING(
+  [--enable-shave],
+  [use shave to make the build pretty [[default=$1]]]),,
+  [enable_shave=$1]
+)
+])
+
+AC_DEFUN([SHAVE_INIT],
+[
+  dnl you can tweak the default value of enable_shave
+  m4_if([$2], [enable], [_SHAVE_ARG_ENABLE(yes)], [_SHAVE_ARG_ENABLE(no)])
+
+  if test x"$enable_shave" = xyes; then
+dnl where can we find the shave scripts?
+m4_if([$1],,
+  [shavedir="$ac_pwd"],
+  [shavedir="$ac_pwd/$1"])
+AC_SUBST(shavedir)
+
+dnl make is now quiet
+AC_SUBST([MAKEFLAGS], [-s])
+AC_SUBST([AM_MAKEFLAGS], ['`test -z $V && echo -s`'])
+
+dnl we need sed
+AC_CHECK_PROG(SED,sed,sed,false)
+
+dnl substitute libtool
+SHAVE_SAVED_LIBTOOL=$LIBTOOL
+LIBTOOL="${SHELL} ${shavedir}/shave-libtool '${SHAVE_SAVED_LIBTOOL}'"
+AC_SUBST(LIBTOOL)
+
+dnl substitute cc/cxx
+SHAVE_SAVED_CC=$CC
+SHAVE_SAVED_CXX=$CXX
+SHAVE_SAVED_FC=$FC
+SHAVE_SAVED_F77=$F77
+SHAVE_SAVED_OBJC=$OBJC
+CC="${SHELL} ${shavedir}/shave cc ${SHAVE_SAVED_CC}"
+CXX="${SHELL} ${shavedir}/shave cxx ${SHAVE_SAVED_CXX}"
+FC="${SHELL} ${shavedir}/shave fc ${SHAVE_SAVED_FC}"
+F77="${SHELL} ${shavedir}/shave f77 ${SHAVE_SAVED_F77}"
+OBJC="${SHELL} ${shavedir}/shave objc ${SHAVE_SAVED_OBJC}"
+AC_SUBST(CC)
+AC_SUBST(CXX)
+AC_SUBST(FC)
+AC_SUBST(F77)
+AC_SUBST(OBJC)
+
+V=@
+  else
+V=1
+  fi
+  Q='$(V:1=)'
+  AC_SUBST(V)
+  AC_SUBST(Q)
+])
+
Index: xsrc/external/mit/xf86-video-radeonhd/dist/shave-libtool.in
diff -u /dev/null xsrc/external/mit/xf86-video-radeonhd/dist/shave-libtool.in:1.1.1.1.2.2
--- /dev/null	Mon Jan 11 00:20:32 2010
+++ xsrc/external/mit/xf86-video-radeonhd/dist/shave-libtool.in	Mon Jan 11 00:20:32 2010
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+# we need sed
+s...@sed@
+if test -z "$SED" ; then
+SED=sed
+fi
+
+lt_unmangle ()
+{
+   last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
+}
+
+# the real libtool to use
+LIBTOOL="$1"
+shift
+
+# if 1, don't print anything, the underlaying wrapper will do it
+pass_though=0
+
+# scan the arguments, keep the right ones for libtool, and discover the mode
+preserved_args=
+while test "$#" -gt 0; do
+opt="$1"
+shift
+
+case $opt in
+--mode=*)
+mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
+preserved_args="$preserved_args $opt"
+;;
+-o)
+lt_output="$1"
+preserved_args="$preserved_args $opt"
+	;;
+*)
+preserved_args="$preserved_args $opt"
+;;
+  esac
+done
+
+case "$mode" in
+compile)
+# shave will be called and print the actual CC/CXX/LINK line
+preserved_args="$preserved_args --shave-mode=$mode"
+

CVS commit: [netbsd-5] xsrc/external/mit/libpciaccess/dist/src

2010-01-08 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Sat Jan  9 02:00:00 UTC 2010

Modified Files:
xsrc/external/mit/libpciaccess/dist/src [netbsd-5]: netbsd_pci.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1228):
external/mit/libpciaccess/dist/src/netbsd_pci.c: revision 1.5
if a VGA device isn't enabled for io/mem/bus-master, do so here.
xorg-server 1.4.x and earlier would do this for us.
partly fixes dual-head support for various systems.
idea from mhitch.


To generate a diff of this commit:
cvs rdiff -u -r1.4.2.2 -r1.4.2.3 \
xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c
diff -u xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.4.2.2 xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.4.2.3
--- xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.4.2.2	Thu Sep 17 03:33:29 2009
+++ xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c	Sat Jan  9 01:59:59 2010
@@ -272,6 +272,21 @@
 	dev = device->dev;
 	func = device->func;
 
+	/* Enable the device if necessary */
+	err = pci_read(domain, bus, dev, func, PCI_COMMAND_STATUS_REG, ®);
+	if (err)
+		return err;
+	if ((reg & (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_MASTER_ENABLE)) !=
+	(PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_MASTER_ENABLE)) {
+		reg |= PCI_COMMAND_IO_ENABLE |
+		   PCI_COMMAND_MEM_ENABLE |
+		   PCI_COMMAND_MASTER_ENABLE;
+		err = pci_write(domain, bus, dev, func, PCI_COMMAND_STATUS_REG,
+reg);
+		if (err)
+			return err;
+	}
+
 	err = pci_read(domain, bus, dev, func, PCI_BHLC_REG, ®);
 	if (err)
 		return err;
@@ -454,7 +469,7 @@
 	struct pci_device_private *device;
 	int bus, dev, func, ndevs, nfuncs, domain, pcifd;
 	uint32_t reg;
-	char devname[32];
+	char netbsd_devname[32];
 	struct pciio_businfo businfo;
 
 	pci_sys = calloc(1, sizeof(struct pci_system));
@@ -463,8 +478,8 @@
 
 	ndevs = 0;
 	nbuses = 0;
-	snprintf(devname, 32, "/dev/pci%d", nbuses);
-	pcifd = open(devname, O_RDWR);
+	snprintf(netbsd_devname, 32, "/dev/pci%d", nbuses);
+	pcifd = open(netbsd_devname, O_RDWR);
 	while (pcifd > 0) {
 		ioctl(pcifd, PCI_IOC_BUSINFO, &businfo);
 		buses[nbuses].fd = pcifd;
@@ -485,8 +500,8 @@
 ndevs++;
 			}
 		}
-		snprintf(devname, 32, "/dev/pci%d", nbuses);
-		pcifd = open(devname, O_RDWR);
+		snprintf(netbsd_devname, 32, "/dev/pci%d", nbuses);
+		pcifd = open(netbsd_devname, O_RDWR);
 	}
 
 	pci_sys->num_devices = ndevs;



CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-radeonhd/dist/src

2010-01-08 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Sat Jan  9 01:27:39 UTC 2010

Modified Files:
xsrc/external/mit/xf86-video-radeonhd/dist/src [netbsd-5]: rhd_id.c

Log Message:
Pull up following revision(s) (requested by jakllsch in ticket #1214):
external/mit/xf86-video-radeonhd/dist/src/rhd_id.c: revision 1.2
Fix incorrect LIST_END macro.
>From xf86-video-radeonhd commit cc1bb50bb44354be7793e4fc45c625746571ec96.
Fixes PR/41950.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2.2.1 -r1.1.1.2.2.2 \
xsrc/external/mit/xf86-video-radeonhd/dist/src/rhd_id.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-radeonhd/dist/src/rhd_id.c
diff -u xsrc/external/mit/xf86-video-radeonhd/dist/src/rhd_id.c:1.1.1.2.2.1 xsrc/external/mit/xf86-video-radeonhd/dist/src/rhd_id.c:1.1.1.2.2.2
--- xsrc/external/mit/xf86-video-radeonhd/dist/src/rhd_id.c:1.1.1.2.2.1	Thu Sep 17 03:34:13 2009
+++ xsrc/external/mit/xf86-video-radeonhd/dist/src/rhd_id.c	Sat Jan  9 01:27:39 2010
@@ -99,7 +99,7 @@
 # define RHD_DEVICE_MATCH(d, i) \
 { 0x1002, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (i) }
 # define PCI_ID_LIST struct pci_id_match RHDDeviceMatch[]
-# define LIST_END { 0, 0, (~0), (~0), 0, 0, 0 }
+# define LIST_END { 0, 0, 0, 0, 0, 0, 0 }
 #else
 # define RHD_DEVICE_ENTRY(d, i, r) \
 { (i), (d), r }



CVS commit: [netbsd-5] xsrc/external/mit/pixman/dist

2009-12-01 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Tue Dec  1 23:18:41 UTC 2009

Added Files:
xsrc/external/mit/pixman/dist/pixman [netbsd-5]:
pixman-x64-mmx-emulation.h
xsrc/external/mit/pixman/dist/test [netbsd-5]: blitters-test.c
window-test.c

Log Message:
Apply patch (requested by mrg in ticket 1177):
Update pixman to 0.16.2.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.1.1.2.2 \
xsrc/external/mit/pixman/dist/pixman/pixman-x64-mmx-emulation.h
cvs rdiff -u -r0 -r1.1.1.1.2.2 \
xsrc/external/mit/pixman/dist/test/blitters-test.c \
xsrc/external/mit/pixman/dist/test/window-test.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: xsrc/external/mit/pixman/dist/pixman/pixman-x64-mmx-emulation.h
diff -u /dev/null xsrc/external/mit/pixman/dist/pixman/pixman-x64-mmx-emulation.h:1.1.1.1.2.2
--- /dev/null	Tue Dec  1 23:18:41 2009
+++ xsrc/external/mit/pixman/dist/pixman/pixman-x64-mmx-emulation.h	Tue Dec  1 23:18:40 2009
@@ -0,0 +1,263 @@
+#ifndef MMX_X64_H_INCLUDED
+#define MMX_X64_H_INCLUDED
+
+/* Implementation of x64 MMX substitition functions, before
+ * pixman is reimplemented not to use __m64 type on Visual C++
+ *
+ * Copyright (C)2009 by George Yohng
+ * Released in public domain.
+ */
+
+#include 
+
+#define M64C(a) (*(const __m64 *)(&a))
+#define M64U(a) (*(const unsigned long long *)(&a))
+
+__inline __m64
+_m_from_int (int a)
+{
+long long i64 = a;
+
+return M64C (i64);
+}
+
+__inline __m64
+_mm_setzero_si64 ()
+{
+long long i64 = 0;
+
+return M64C (i64);
+}
+
+__inline __m64
+_mm_set_pi32 (int i1,   int i0)
+{
+unsigned long long i64 = ((unsigned)i0) + (((unsigned long long)(unsigned)i1) << 32);
+
+return M64C (i64);
+}
+
+__inline void
+_m_empty ()
+{
+}
+
+__inline __m64
+_mm_set1_pi16 (short w)
+{
+unsigned long long i64 = ((unsigned long long)(unsigned short)(w)) * 0x0001000100010001ULL;
+
+return M64C (i64);
+}
+
+__inline int
+_m_to_int (__m64 m)
+{
+return m.m64_i32[0];
+}
+
+__inline __m64
+_mm_movepi64_pi64 (__m128i a)
+{
+return M64C (a.m128i_i64[0]);
+}
+
+__inline __m64
+_m_pand (__m64 a, __m64 b)
+{
+unsigned long long i64 = M64U (a) & M64U (b);
+
+return M64C (i64);
+}
+
+__inline __m64
+_m_por (__m64 a, __m64 b)
+{
+unsigned long long i64 = M64U (a) | M64U (b);
+
+return M64C (i64);
+}
+
+__inline __m64
+_m_pxor (__m64 a, __m64 b)
+{
+unsigned long long i64 = M64U (a) ^ M64U (b);
+
+return M64C (i64);
+}
+
+__inline __m64
+_m_pmulhuw (__m64 a, __m64 b)/* unoptimized */
+{
+unsigned short d[4] =
+{
+	(unsigned short)unsigned)a.m64_u16[0]) * b.m64_u16[0]) >> 16),
+	(unsigned short)unsigned)a.m64_u16[1]) * b.m64_u16[1]) >> 16),
+	(unsigned short)unsigned)a.m64_u16[2]) * b.m64_u16[2]) >> 16),
+	(unsigned short)unsigned)a.m64_u16[3]) * b.m64_u16[3]) >> 16)
+};
+
+return M64C (d[0]);
+}
+
+__inline __m64
+_m_pmullw2 (__m64 a, __m64 b)/* unoptimized */
+{
+unsigned short d[4] =
+{
+	(unsigned short)unsigned)a.m64_u16[0]) * b.m64_u16[0])),
+	(unsigned short)unsigned)a.m64_u16[1]) * b.m64_u16[1])),
+	(unsigned short)unsigned)a.m64_u16[2]) * b.m64_u16[2])),
+	(unsigned short)unsigned)a.m64_u16[3]) * b.m64_u16[3]))
+};
+
+return M64C (d[0]);
+}
+
+__inline __m64
+_m_pmullw (__m64 a, __m64 b)/* unoptimized */
+{
+unsigned long long x =
+	((unsigned long long)(unsigned short)unsigned)a.m64_u16[0]) * b.m64_u16[0])))  +
+	(((unsigned long long)(unsigned short)unsigned)a.m64_u16[1]) * b.m64_u16[1]))) << 16)  +
+	(((unsigned long long)(unsigned short)unsigned)a.m64_u16[2]) * b.m64_u16[2]))) << 32)  +
+	(((unsigned long long)(unsigned short)unsigned)a.m64_u16[3]) * b.m64_u16[3]))) << 48);
+
+return M64C (x);
+}
+
+__inline __m64
+_m_paddusb (__m64 a, __m64 b)/* unoptimized */
+{
+unsigned long long x = (M64U (a) & 0x00FF00FF00FF00FFULL) +
+   (M64U (b) & 0x00FF00FF00FF00FFULL);
+
+unsigned long long y = ((M64U (a) >> 8) & 0x00FF00FF00FF00FFULL) +
+   ((M64U (b) >> 8) & 0x00FF00FF00FF00FFULL);
+
+x |= ((x & 0xFF00FF00FF00FF00ULL) >> 8) * 0xFF;
+y |= ((y & 0xFF00FF00FF00FF00ULL) >> 8) * 0xFF;
+
+x = (x & 0x00FF00FF00FF00FFULL) | ((y & 0x00FF00FF00FF00FFULL) << 8);
+
+return M64C (x);
+}
+
+__inline __m64
+_m_paddusw (__m64 a, __m64 b)/* unoptimized */
+{
+unsigned long long x = (M64U (a) & 0xULL) +
+   (M64U (b) & 0xULL);
+
+unsigned long long y = ((M64U (a) >> 16) & 0xULL) +
+   ((M64U (b) >> 16) & 0xULL);
+
+x |= ((x & 0x) >> 16) * 0x;
+y |= ((y & 0x) >> 16) * 0x;
+
+x = (x & 0xULL) | ((y & 0xF

CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-ati/include

2009-12-01 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Tue Dec  1 19:44:53 UTC 2009

Modified Files:
xsrc/external/mit/xf86-video-ati/include [netbsd-5]: config.h

Log Message:
Apply patch (requested by rafal in ticket 1176):
Regenerate xf86-video-ati's config.h.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 \
xsrc/external/mit/xf86-video-ati/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-ati/include/config.h
diff -u xsrc/external/mit/xf86-video-ati/include/config.h:1.1.2.1 xsrc/external/mit/xf86-video-ati/include/config.h:1.1.2.2
--- xsrc/external/mit/xf86-video-ati/include/config.h:1.1.2.1	Thu Sep 17 03:33:47 2009
+++ xsrc/external/mit/xf86-video-ati/include/config.h	Tue Dec  1 19:44:53 2009
@@ -16,7 +16,7 @@
 #define HAVE_DLFCN_H 1
 
 /* have new FreeShadow API */
-/* #undef HAVE_FREE_SHADOW */
+#define HAVE_FREE_SHADOW 1
 
 /* Define to 1 if you have the  header file. */
 #define HAVE_INTTYPES_H 1
@@ -25,7 +25,7 @@
 #define HAVE_MEMORY_H 1
 
 /* Have pci_device_enable prototype */
-/* #undef HAVE_PCI_DEVICE_ENABLE */
+#define HAVE_PCI_DEVICE_ENABLE 1
 
 /* Define to 1 if you have the  header file. */
 #define HAVE_STDINT_H 1
@@ -49,10 +49,10 @@
 #define HAVE_UNISTD_H 1
 
 /* Have xf86_crtc_clip_video_helper prototype */
-/* #undef HAVE_XF86CRTCCLIPVIDEOHELPER */
+#define HAVE_XF86CRTCCLIPVIDEOHELPER 1
 
 /* Have xf86ModeBandwidth prototype */
-/* #undef HAVE_XF86MODEBANDWIDTH */
+#define HAVE_XF86MODEBANDWIDTH 1
 
 /* Have xf86XVFillKeyHelperDrawable prototype */
 #define HAVE_XV_DRAWABLE_HELPER 1



CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-radeonhd/include

2009-12-01 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Tue Dec  1 19:34:32 UTC 2009

Modified Files:
xsrc/external/mit/xf86-video-radeonhd/include [netbsd-5]: config.h

Log Message:
Apply patch (requested by rafal in ticket 1160):
Regenerate xf86-video-radeonhd's config.h.


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.1 -r1.2.2.2 \
xsrc/external/mit/xf86-video-radeonhd/include/config.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-radeonhd/include/config.h
diff -u xsrc/external/mit/xf86-video-radeonhd/include/config.h:1.2.2.1 xsrc/external/mit/xf86-video-radeonhd/include/config.h:1.2.2.2
--- xsrc/external/mit/xf86-video-radeonhd/include/config.h:1.2.2.1	Thu Sep 17 03:34:13 2009
+++ xsrc/external/mit/xf86-video-radeonhd/include/config.h	Tue Dec  1 19:34:32 2009
@@ -20,7 +20,7 @@
 #define HAVE_DLFCN_H 1
 
 /* have RotateFreeShadow API */
-/* #undef HAVE_FREE_SHADOW */
+#define HAVE_FREE_SHADOW 1
 
 /* Define to 1 if you have the  header file. */
 #define HAVE_INTTYPES_H 1
@@ -99,7 +99,7 @@
 #define STDC_HEADERS 1
 
 /* Build support for DRI */
-/* #undef USE_DRI */
+#define USE_DRI 1
 
 /* Build support for Exa */
 #define USE_EXA 1
@@ -108,6 +108,6 @@
 #define VERSION "1.2.5"
 
 /* xf86CrtcFuncsRec has member set_mode_major */
-/* #undef XF86CRTCFUNCS_HAS_SETMODEMAJOR */
+#define XF86CRTCFUNCS_HAS_SETMODEMAJOR 1
 
 #endif



CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-newport/dist/src

2009-10-15 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Fri Oct 16 06:58:54 UTC 2009

Modified Files:
xsrc/external/mit/xf86-video-newport/dist/src [netbsd-5]:
newport_cmap.c newport_driver.c newport_regs.c newport_regs.h

Log Message:
Pull up following revision(s) (requested by macallan in ticket #1092):
external/mit/xf86-video-newport/dist/src/newport_cmap.c: revision 1.2
external/mit/xf86-video-newport/dist/src/newport_driver.c: revision 1.5
external/mit/xf86-video-newport/dist/src/newport_regs.c: revision 1.2
external/mit/xf86-video-newport/dist/src/newport_regs.h: revision 1.2
make this work in the New Order Of Things(tm):
- make Xorg -configure work again
- fix the DCB timing when talking to XMAP9 to the values used by the kernel,
now colours look right on my Indy and all the randomness when starting
X is gone


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \
xsrc/external/mit/xf86-video-newport/dist/src/newport_cmap.c \
xsrc/external/mit/xf86-video-newport/dist/src/newport_regs.c \
xsrc/external/mit/xf86-video-newport/dist/src/newport_regs.h
cvs rdiff -u -r1.3.2.3 -r1.3.2.4 \
xsrc/external/mit/xf86-video-newport/dist/src/newport_driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-newport/dist/src/newport_cmap.c
diff -u xsrc/external/mit/xf86-video-newport/dist/src/newport_cmap.c:1.1.1.1.2.2 xsrc/external/mit/xf86-video-newport/dist/src/newport_cmap.c:1.1.1.1.2.3
--- xsrc/external/mit/xf86-video-newport/dist/src/newport_cmap.c:1.1.1.1.2.2	Wed Feb 25 21:31:00 2009
+++ xsrc/external/mit/xf86-video-newport/dist/src/newport_cmap.c	Fri Oct 16 06:58:54 2009
@@ -71,7 +71,8 @@
 	}
 #endif
 	for(i = 0; i < 256; i++) {
-		NewportCmapSetRGB(pNewport->pNewportRegs, i, pNewport->txt_colormap[i]);
+		NewportCmapSetRGB(pNewport->pNewportRegs, i, 
+		pNewport->txt_colormap[i]);
 	}
 }
 
@@ -80,8 +81,8 @@
 static void NewportCmapFifoWait(NewportRegsPtr pNewportRegs)
 {
 while(1) {
-		pNewportRegs->set.dcbmode = (NPORT_DMODE_ACM0 |  NCMAP_PROTOCOL |
-		NCMAP_REGADDR_SREG | NPORT_DMODE_W1);
+		pNewportRegs->set.dcbmode = (NPORT_DMODE_ACM0 | NCMAP_PROTOCOL |
+		NCMAP_REGADDR_SREG | NPORT_DMODE_W1);
 		if(!(pNewportRegs->set.dcbdata0.bytes.b3 & 4))
 			break;
 }
@@ -91,6 +92,7 @@
 /* set the colormap entry at addr to color */
 void NewportCmapSetRGB( NewportRegsPtr pNewportRegs, unsigned short addr, LOCO color)
 {
+	uint32_t colour;
 	NewportWait(pNewportRegs);	/* this one should not be necessary */
 	NewportBfwait(pNewportRegs);
 	pNewportRegs->set.dcbmode = (NPORT_DMODE_ACMALL | NCMAP_PROTOCOL |
@@ -99,9 +101,9 @@
 	pNewportRegs->set.dcbdata0.hwords.s1 = addr;
 	pNewportRegs->set.dcbmode = (NPORT_DMODE_ACMALL | NCMAP_PROTOCOL |
  NCMAP_REGADDR_PBUF | NPORT_DMODE_W3);
-	pNewportRegs->set.dcbdata0.all = (color.red << 24) |
-		(color.green << 16) |
+	colour = (color.red << 24) | (color.green << 16) |
 		(color.blue << 8);
+	pNewportRegs->set.dcbdata0.all = colour;
 }
 
 /* get the colormap entry at addr */
Index: xsrc/external/mit/xf86-video-newport/dist/src/newport_regs.c
diff -u xsrc/external/mit/xf86-video-newport/dist/src/newport_regs.c:1.1.1.1.2.2 xsrc/external/mit/xf86-video-newport/dist/src/newport_regs.c:1.1.1.1.2.3
--- xsrc/external/mit/xf86-video-newport/dist/src/newport_regs.c:1.1.1.1.2.2	Wed Feb 25 21:31:00 2009
+++ xsrc/external/mit/xf86-video-newport/dist/src/newport_regs.c	Fri Oct 16 06:58:54 2009
@@ -14,19 +14,19 @@
 void 
 NewportVc2Set(NewportRegsPtr pNewportRegs, unsigned char vc2Ireg, unsigned short val)
 {
-	pNewportRegs->set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_INDEX | NPORT_DMODE_W3 |
-	NPORT_DMODE_ECINC | VC2_PROTOCOL);
+	pNewportRegs->set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_INDEX | 
+	NPORT_DMODE_W3 | NPORT_DMODE_ECINC | VC2_PROTOCOL);
 	pNewportRegs->set.dcbdata0.all = (vc2Ireg << 24) | (val << 8);
 }
 
 unsigned short 
 NewportVc2Get(NewportRegsPtr pNewportRegs, unsigned char vc2Ireg)
 {
-	pNewportRegs->set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_INDEX | NPORT_DMODE_W1 |
-	NPORT_DMODE_ECINC | VC2_PROTOCOL);
+	pNewportRegs->set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_INDEX | 
+	NPORT_DMODE_W1 | NPORT_DMODE_ECINC | VC2_PROTOCOL);
 	pNewportRegs->set.dcbdata0.bytes.b3 = vc2Ireg;
-	pNewportRegs->set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_IREG | NPORT_DMODE_W2 |
-	NPORT_DMODE_ECINC | VC2_PROTOCOL);
+	pNewportRegs->set.dcbmode = (NPORT_DMODE_AVC2 | VC2_REGADDR_IREG | 
+	NPORT_DMODE_W2 | NPORT_DMODE_ECINC | VC2_PROTOCOL);
 	return pNewportRegs->set.dcbdata0.hwords.s1;
 }
 
@@ -106,7 +106,7 @@
 	while(1) {
 		NewportBfwait( pNewportRegs);
 		pNewportRegs->set.dcbmode = (xmapChip | R_DCB_XMAP9_PROTOCOL |
-		XM9_CRS_FIFO_AVAIL | NPORT_DMODE_W1);
+		XM9_CRS_FIFO_AVAIL | NPORT_DMODE_W1);
 		if( (pNewp

CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-crime/dist/src

2009-10-15 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Fri Oct 16 06:56:02 UTC 2009

Modified Files:
xsrc/external/mit/xf86-video-crime/dist/src [netbsd-5]: crime_driver.c

Log Message:
Pull up following revision(s) (requested by macallan in ticket #1092):
external/mit/xf86-video-crime/dist/src/crime_driver.c: revision 1.6
remove debug spam


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.6 -r1.2.2.7 \
xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c
diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c:1.2.2.6 xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c:1.2.2.7
--- xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c:1.2.2.6	Fri Oct 16 06:54:59 2009
+++ xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c	Fri Oct 16 06:56:02 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: crime_driver.c,v 1.2.2.6 2009/10/16 06:54:59 snj Exp $ */
+/* $NetBSD: crime_driver.c,v 1.2.2.7 2009/10/16 06:56:02 snj Exp $ */
 /*
  * Copyright (c) 2008 Michael Lorenz
  * All rights reserved.
@@ -311,11 +311,9 @@
 
 	if ((fd = crime_open(CRIME_DEFAULT_DEV)) == 0)
 		return FALSE;
-	xf86Msg(X_DEBUG, "%s: fd found\n", __func__);
 
 	if (ioctl(fd, WSDISPLAYIO_GTYPE, &wstype) == -1)
 		return FALSE;
-	xf86Msg(X_DEBUG, "%s: type: %d\n", __func__, wstype);
 	if (wstype != WSDISPLAY_TYPE_CRIME)
 		return FALSE;
 
@@ -324,7 +322,6 @@
 	if ( xf86DoConfigure && xf86DoConfigurePass1 ) {
 		GDevPtr pGDev;
 
-		xf86Msg(X_DEBUG, "writing device section\n");
 		pGDev = xf86AddBusDeviceToConfigure(CRIME_DRIVER_NAME, BUS_NONE,
 			NULL, 0);
 		if (pGDev) {
@@ -332,7 +329,6 @@
 			 * XF86Match???Instances() treat chipID and chipRev as
 			 * overrides, so clobber them here.
 			 */
-			xf86Msg(X_DEBUG, "clobbering chipID etc. \n");
 			pGDev->chipID = pGDev->chipRev = -1;
 		}
 	}



CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-crime/dist/src

2009-10-15 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Fri Oct 16 06:54:59 UTC 2009

Modified Files:
xsrc/external/mit/xf86-video-crime/dist/src [netbsd-5]: crime_driver.c

Log Message:
Pull up following revision(s) (requested by macallan in ticket #1092):
external/mit/xf86-video-crime/dist/src/crime_driver.c: revision 1.5
make X -configure work with the crime driver


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.5 -r1.2.2.6 \
xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c
diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c:1.2.2.5 xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c:1.2.2.6
--- xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c:1.2.2.5	Fri Oct 16 06:20:23 2009
+++ xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c	Fri Oct 16 06:54:59 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: crime_driver.c,v 1.2.2.5 2009/10/16 06:20:23 snj Exp $ */
+/* $NetBSD: crime_driver.c,v 1.2.2.6 2009/10/16 06:54:59 snj Exp $ */
 /*
  * Copyright (c) 2008 Michael Lorenz
  * All rights reserved.
@@ -304,8 +304,6 @@
 	char *dev;
 	Bool foundScreen = FALSE;
 
-	xf86Msg(X_ERROR, "%s\n", __func__);
-
 	if ((numDevSections = xf86MatchDevice(CRIME_DRIVER_NAME,
 	  &devSections)) <= 0)
 		return FALSE;
@@ -313,45 +311,60 @@
 
 	if ((fd = crime_open(CRIME_DEFAULT_DEV)) == 0)
 		return FALSE;
-	xf86Msg(X_ERROR, "%s: fd found\n", __func__);
+	xf86Msg(X_DEBUG, "%s: fd found\n", __func__);
 
 	if (ioctl(fd, WSDISPLAYIO_GTYPE, &wstype) == -1)
 		return FALSE;
-	xf86Msg(X_ERROR, "%s: type: %d\n", __func__, wstype);
+	xf86Msg(X_DEBUG, "%s: type: %d\n", __func__, wstype);
 	if (wstype != WSDISPLAY_TYPE_CRIME)
 		return FALSE;
 
-	xf86Msg(X_ERROR, "%s: CRIME found\n", __func__);
+	xf86Msg(X_INFO, "%s: CRIME found\n", __func__);
+
+	if ( xf86DoConfigure && xf86DoConfigurePass1 ) {
+		GDevPtr pGDev;
+
+		xf86Msg(X_DEBUG, "writing device section\n");
+		pGDev = xf86AddBusDeviceToConfigure(CRIME_DRIVER_NAME, BUS_NONE,
+			NULL, 0);
+		if (pGDev) {
+			/*
+			 * XF86Match???Instances() treat chipID and chipRev as
+			 * overrides, so clobber them here.
+			 */
+			xf86Msg(X_DEBUG, "clobbering chipID etc. \n");
+			pGDev->chipID = pGDev->chipRev = -1;
+		}
+	}
 
-	if (flags & PROBE_DETECT)
+	if (flags & PROBE_DETECT) {
 		return TRUE;
+	}
 
+	if (numDevSections > 1) {
+		xf86Msg(X_ERROR, "Ignoring additional device sections\n");
+		numDevSections = 1;
+	}
 	/* ok, at this point we know we've got a CRIME */
 	for (i = 0; i < numDevSections; i++) {
 	
-		dev = xf86FindOptionValue(devSections[i]->options, "device");
-		if ((fd = crime_open(dev)) >= 0) {
-			entity = xf86ClaimFbSlot(drv, 0, devSections[i], TRUE);
-			pScrn = xf86ConfigFbEntity(NULL,0,entity,
-		   NULL,NULL,NULL,NULL);
-			if (pScrn != NULL) {
-foundScreen = TRUE;
-pScrn->driverVersion = VERSION;
-pScrn->driverName = CRIME_DRIVER_NAME;
-pScrn->name = CRIME_NAME;
-pScrn->Probe = CrimeProbe;
-pScrn->PreInit = CrimePreInit;
-pScrn->ScreenInit = CrimeScreenInit;
-pScrn->SwitchMode = CrimeSwitchMode;
-pScrn->AdjustFrame = NULL;
-pScrn->EnterVT = CrimeEnterVT;
-pScrn->LeaveVT = CrimeLeaveVT;
-pScrn->ValidMode = CrimeValidMode;
-
-xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-"using %s\n", dev != NULL ? dev :
-"default device");
-			}
+		entity = xf86ClaimFbSlot(drv, 0, devSections[i], TRUE);
+		pScrn = xf86ConfigFbEntity(NULL, 0, entity,
+		NULL, NULL, NULL, NULL);
+		if (pScrn != NULL) {
+			foundScreen = TRUE;
+			pScrn->driverVersion = VERSION;
+			pScrn->driverName = CRIME_DRIVER_NAME;
+			pScrn->name = CRIME_NAME;
+			pScrn->Probe = CrimeProbe;
+			pScrn->PreInit = CrimePreInit;
+			pScrn->ScreenInit = CrimeScreenInit;
+			pScrn->SwitchMode = CrimeSwitchMode;
+			pScrn->AdjustFrame = NULL;
+			pScrn->EnterVT = CrimeEnterVT;
+			pScrn->LeaveVT = CrimeLeaveVT;
+			pScrn->ValidMode = CrimeValidMode;
+
 		}
 	}
 	xfree(devSections);



CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-crime/dist/src

2009-10-15 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Fri Oct 16 06:53:28 UTC 2009

Modified Files:
xsrc/external/mit/xf86-video-crime/dist/src [netbsd-5]: crime_accel.c

Log Message:
Pull up following revision(s) (requested by macallan in ticket #1092):
external/mit/xf86-video-crime/dist/src/crime_accel.c: revision 1.12
use PIXMAP_IS_SCREEN()


To generate a diff of this commit:
cvs rdiff -u -r1.3.2.10 -r1.3.2.11 \
xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c
diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.10 xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.11
--- xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.10	Fri Oct 16 06:20:23 2009
+++ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c	Fri Oct 16 06:53:28 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: crime_accel.c,v 1.3.2.10 2009/10/16 06:20:23 snj Exp $ */
+/* $NetBSD: crime_accel.c,v 1.3.2.11 2009/10/16 06:53:28 snj Exp $ */
 /*
  * Copyright (c) 2008 Michael Lorenz
  * All rights reserved.
@@ -1704,9 +1704,11 @@
 		return FALSE;
 
 	if((pDst->pDrawable->type == DRAWABLE_WINDOW) ||
-	IS_OFFSCREEN_PIXMAP(pDst->pDrawable)) {
+	IS_OFFSCREEN_PIXMAP(pDst->pDrawable) ||
+	PIXMAP_IS_SCREEN(pDst->pDrawable)) {
 		if ((pSrc->pDrawable->type == DRAWABLE_WINDOW) ||
-		IS_OFFSCREEN_PIXMAP(pSrc->pDrawable)) {
+		IS_OFFSCREEN_PIXMAP(pSrc->pDrawable) ||
+		PIXMAP_IS_SCREEN(pSrc->pDrawable)) {
 			/* screen-to-screen */
 			CrimeDoScreenToScreenComposite(op, pSrc, pMask, pDst,
 			xSrc, ySrc, xMask, yMask,



CVS commit: [netbsd-5] xsrc/external/mit/xorg-server/dist/hw/xfree86/common

2009-10-15 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Fri Oct 16 06:52:05 UTC 2009

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/xfree86/common [netbsd-5]:
xf86Configure.c

Log Message:
Pull up following revision(s) (requested by macallan in ticket #1092):
external/mit/xorg-server/dist/hw/xfree86/common/xf86Configure.c: 
revision 1.3
let xf86AddBusDeviceToConfigure() accept BUS_ISA and BUS_NONE


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Configure.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Configure.c
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Configure.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Configure.c:1.1.1.1.2.2
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Configure.c:1.1.1.1.2.1	Thu Sep 17 03:35:09 2009
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Configure.c	Fri Oct 16 06:52:05 2009
@@ -123,6 +123,9 @@
 		return NULL;
 	break;
 #endif
+case BUS_NONE:
+case BUS_ISA:
+	break;
 default:
 	return NULL;
 }
@@ -215,6 +218,11 @@
 	}
 	break;
 #endif
+case BUS_ISA: {
+NewDevice.GDev.busID = xnfalloc(6);
+strcpy(NewDevice.GDev.busID, "ISA");
+}
+break;
 default:
 	break;
 }



CVS commit: [netbsd-5] xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa

2009-10-15 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Fri Oct 16 06:50:20 UTC 2009

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa [netbsd-5]: xaaGC.c
xaalocal.h

Log Message:
Pull up following revision(s) (requested by macallan in ticket #1092):
external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c: revision 1.3
external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h: revision 1.5
simplify PIXMAP_IS_SCREEN()


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c
cvs rdiff -u -r1.1.1.1.2.3 -r1.1.1.1.2.4 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c:1.1.1.1.2.2 xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c:1.1.1.1.2.3
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c:1.1.1.1.2.2	Fri Oct 16 06:23:35 2009
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c	Fri Oct 16 06:50:20 2009
@@ -89,7 +89,8 @@
 }
 
 if((pDraw->type == DRAWABLE_PIXMAP) && 
-   !IS_OFFSCREEN_PIXMAP(pDraw) && !PIXMAP_IS_SCREEN((PixmapPtr)pDraw, pGC)) {
+   !IS_OFFSCREEN_PIXMAP(pDraw) && 
+   !PIXMAP_IS_SCREEN(pDraw)) {
 	pGCPriv->flags = OPS_ARE_PIXMAP;
 pGCPriv->changes |= changes;
 

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.1.1.1.2.3 xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.1.1.1.2.4
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.1.1.1.2.3	Fri Oct 16 06:23:35 2009
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h	Fri Oct 16 06:50:20 2009
@@ -1710,8 +1710,8 @@
 #define IS_OFFSCREEN_PIXMAP(pPix)\
 ((XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pPix)))->offscreenArea)	
 
-#define PIXMAP_IS_SCREEN(pPix, pGC)\
-(pPix == pGC->pScreen->GetScreenPixmap(pGC->pScreen))
+#define PIXMAP_IS_SCREEN(pDraw)\
+(pDraw == (void *)pDraw->pScreen->GetScreenPixmap(pDraw->pScreen))
  
 #define PIXMAP_IS_SHARED(pPix)\
 ((XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pPix)))->flags & SHARED_PIXMAP)



CVS commit: [netbsd-5] xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa

2009-10-15 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Fri Oct 16 06:23:35 UTC 2009

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa [netbsd-5]: xaaGC.c
xaalocal.h

Log Message:
Pull up following revision(s) (requested by macallan in ticket #1052):
external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c: revision 1.2
external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h: revision 1.4
don't fall back to software rendering when drawing into the screen pixmap
this takes care of visible artifacts with non-mappable framebuffers like
newport and crime


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c
cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c:1.1.1.1.2.2
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c:1.1.1.1.2.1	Thu Sep 17 03:35:21 2009
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaaGC.c	Fri Oct 16 06:23:35 2009
@@ -88,7 +88,8 @@
 	pGC->fgPixel = 0x7fff;
 }
 
-if((pDraw->type == DRAWABLE_PIXMAP) && !IS_OFFSCREEN_PIXMAP(pDraw)){
+if((pDraw->type == DRAWABLE_PIXMAP) && 
+   !IS_OFFSCREEN_PIXMAP(pDraw) && !PIXMAP_IS_SCREEN((PixmapPtr)pDraw, pGC)) {
 	pGCPriv->flags = OPS_ARE_PIXMAP;
 pGCPriv->changes |= changes;
 

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.1.1.1.2.2 xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.1.1.1.2.3
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h:1.1.1.1.2.2	Thu Sep 17 03:35:21 2009
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/xaa/xaalocal.h	Fri Oct 16 06:23:35 2009
@@ -1710,6 +1710,9 @@
 #define IS_OFFSCREEN_PIXMAP(pPix)\
 ((XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pPix)))->offscreenArea)	
 
+#define PIXMAP_IS_SCREEN(pPix, pGC)\
+(pPix == pGC->pScreen->GetScreenPixmap(pGC->pScreen))
+ 
 #define PIXMAP_IS_SHARED(pPix)\
 ((XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pPix)))->flags & SHARED_PIXMAP)
 



CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-crime/dist/src

2009-10-15 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Fri Oct 16 06:20:23 UTC 2009

Modified Files:
xsrc/external/mit/xf86-video-crime/dist/src [netbsd-5]: crime.h
crime_accel.c crime_driver.c

Log Message:
Pull up following revision(s) (requested by macallan in ticket #1052):
external/mit/xf86-video-crime/dist/src/crime.h: revision 1.7
external/mit/xf86-video-crime/dist/src/crime_accel.c: revision 1.11
external/mit/xf86-video-crime/dist/src/crime_driver.c: revision 1.4
clean up debugging code, while there:
- use a fake framebuffer like newport does to hide software rendering
artifacts
- only map the framebuffer when debugging, and actually unmap it too


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.6 -r1.2.2.7 \
xsrc/external/mit/xf86-video-crime/dist/src/crime.h
cvs rdiff -u -r1.3.2.9 -r1.3.2.10 \
xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c
cvs rdiff -u -r1.2.2.4 -r1.2.2.5 \
xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-crime/dist/src/crime.h
diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime.h:1.2.2.6 xsrc/external/mit/xf86-video-crime/dist/src/crime.h:1.2.2.7
--- xsrc/external/mit/xf86-video-crime/dist/src/crime.h:1.2.2.6	Thu Sep 17 03:33:50 2009
+++ xsrc/external/mit/xf86-video-crime/dist/src/crime.h	Fri Oct 16 06:20:23 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: crime.h,v 1.2.2.6 2009/09/17 03:33:50 snj Exp $ */
+/* $NetBSD: crime.h,v 1.2.2.7 2009/10/16 06:20:23 snj Exp $ */
 /*
  * Copyright (c) 2008 Michael Lorenz
  * All rights reserved.
@@ -44,7 +44,7 @@
 #ifndef CRIME_H
 #define CRIME_H
 
-#define CRIME_DEBUG
+/*#define CRIME_DEBUG*/
 
 #define CRIME_DEBUG_LINES		0x0001
 #define CRIME_DEBUG_BITBLT		0x0002
@@ -56,7 +56,7 @@
 #define CRIME_DEBUG_XRENDER		0x0080
 #define CRIME_DEBUG_IMAGEREAD		0x0100
 #define CRIME_DEBUG_ALL			0x
-#define CRIME_DEBUG_MASK (/*CRIME_DEBUG_IMAGEWRITE*/0)
+#define CRIME_DEBUG_MASK 0
 
 #ifdef CRIME_DEBUG
 #define LOG(x) if (x & CRIME_DEBUG_MASK) xf86Msg(X_ERROR, "%s\n", __func__)

Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c
diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.9 xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.10
--- xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.9	Thu Sep 17 03:33:50 2009
+++ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c	Fri Oct 16 06:20:23 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: crime_accel.c,v 1.3.2.9 2009/09/17 03:33:50 snj Exp $ */
+/* $NetBSD: crime_accel.c,v 1.3.2.10 2009/10/16 06:20:23 snj Exp $ */
 /*
  * Copyright (c) 2008 Michael Lorenz
  * All rights reserved.
@@ -34,6 +34,7 @@
 #include "crime.h"
 #include "picturestr.h"
 #include "xaalocal.h"
+#include "xaa.h"
 
 uint32_t regcache[0x1000];
 
@@ -48,7 +49,7 @@
 #define WRITE4(r, v) { *CRIMEREG(r) = v; }
 #endif
 #define WRITE4ST(r, v) {WBFLUSH; *CRIMEREG(r + CRIME_DE_START) = v; WBFLUSH;}
-#ifdef DEBUG
+#ifdef CRIME_DEBUG
 #define SYNC { int bail = 0; do {bail++; } \
   while(((*CRIMEREG(0x4000) & CRIME_DE_IDLE) == 0) && (bail < 1000)); \
   if (bail == 1000) { \
@@ -176,7 +177,6 @@
 		WRITE4(CRIME_MTE_SRC1, (rxe << 16) | rye);
 		WRITE4(CRIME_MTE_DST0, (rxd << 16) | ryd);
 		WRITE4ST(CRIME_MTE_DST1, (rxde << 16) | ryde);
-		//xf86Msg(X_ERROR, "MTE");
 
 #ifdef CRIME_DEBUG_LOUD
 		xf86Msg(X_ERROR, "reg: %08x %08x\n", oreg, reg);
@@ -227,6 +227,7 @@
 	int i;
 
 	LOG(CRIME_DEBUG_RECTFILL);
+#ifdef MTE_DRAW_RECT
 	if (rop == GXcopy) {
 		fPtr->use_mte = 1;
 		MAKE_ROOM(3);
@@ -237,7 +238,9 @@
 		WRITE4(CRIME_MTE_DST_Y_STEP, 1);
 		WRITE4(CRIME_MTE_BG, colour << 8);
 		SYNCMTE;
-	} else {
+	} else
+#endif
+	{
 		fPtr->use_mte = 0;
 		MAKE_ROOM(7);
 		WRITE4(CRIME_DE_PLANEMASK, planemask);
@@ -270,6 +273,7 @@
 	int xa, xe, ya, ye;
 
 	LOG(CRIME_DEBUG_RECTFILL);
+#ifdef MTE_DRAW_RECT
 	if (fPtr->use_mte) {
 		
 		/*
@@ -286,7 +290,9 @@
 			WRITE4ST(CRIME_MTE_DST1,
 		 	   (((xe << 2) - 1 ) << 16) | ((ye - 1) & 0x));
 		}
-	} else {
+	} else 
+#endif
+	{
 		MAKE_ROOM(2);
 		WRITE4(CRIME_DE_X_VERTEX_0, (x << 16) | (y & 0x));
 		WRITE4ST(CRIME_DE_X_VERTEX_1,
@@ -582,7 +588,7 @@
 	WRITE4(CRIME_DE_X_VERTEX_0, (x1 << 16) | y1);
 	WRITE4ST(CRIME_DE_X_VERTEX_1, (x2 << 16) | y2);
 	DONE(CRIME_DEBUG_LINES);
-}  
+}
 
 void
 CrimeSetupForDashedLine(ScrnInfoPtr pScrn,

Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c
diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c:1.2.2.4 xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c:1.2.2.5
--- xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c:1.2.2.4	Thu Sep 17 03:33:50 2009
+++ xsrc/external/mit/xf86-video-crime/dist/src/crime_driver.c	Fri Oct 16 06:20:23 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: crime_driver.c,v 1.

CVS commit: [netbsd-5] xsrc/external/mit/xorg-server/dist/hw/xfree86/modes

2009-09-27 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Mon Sep 28 01:51:15 UTC 2009

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/xfree86/modes [netbsd-5]:
xf86Cursors.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1031):
external/mit/xorg-server/dist/hw/xfree86/modes/xf86Cursors.c: revision 
1.2
check that dixLookupPrivate() returned non-NULL before dereferencing
it.  fixes a SEGV when starting ioquake3 on an X server started with
the "-dpi 100 -depth 16" flags, as reported by w...@.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Cursors.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Cursors.c
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Cursors.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Cursors.c:1.1.1.1.2.2
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Cursors.c:1.1.1.1.2.1	Thu Sep 17 03:35:12 2009
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/modes/xf86Cursors.c	Mon Sep 28 01:51:15 2009
@@ -612,7 +612,7 @@
 cursor_screen_priv = dixLookupPrivate(&screen->devPrivates,
 	  xf86CursorScreenKey);
 /* return if HW cursor is inactive, to avoid displaying two cursors */
-if (!cursor_screen_priv->isUp)
+if (!cursor_screen_priv || !cursor_screen_priv->isUp)
 	return;
 
 scrn = xf86Screens[screen->myNum];



CVS commit: [netbsd-5] xsrc/external/mit/xorg-server/dist

2009-09-25 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Sat Sep 26 05:22:07 UTC 2009

Modified Files:
xsrc/external/mit/xorg-server/dist/dix [netbsd-5]: globals.c
xsrc/external/mit/xorg-server/dist/os [netbsd-5]: utils.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1018):
external/mit/xorg-server/dist/dix/globals.c: revision 1.2
external/mit/xorg-server/dist/os/utils.c: revision 1.2
By default, use the old X server background and cursor mode (option
"-retro").  Add a "-noretro" option to get the new (black background
and no cursor) behavior.

Addresses part of PR xsrc/41870


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xorg-server/dist/dix/globals.c
cvs rdiff -u -r1.1.1.1.2.1 -r1.1.1.1.2.2 \
xsrc/external/mit/xorg-server/dist/os/utils.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/dix/globals.c
diff -u xsrc/external/mit/xorg-server/dist/dix/globals.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/dix/globals.c:1.1.1.1.2.2
--- xsrc/external/mit/xorg-server/dist/dix/globals.c:1.1.1.1.2.1	Thu Sep 17 03:34:54 2009
+++ xsrc/external/mit/xorg-server/dist/dix/globals.c	Sat Sep 26 05:22:07 2009
@@ -139,7 +139,7 @@
 FontPtr defaultFont;   /* not declared in dix.h to avoid including font.h in
 			every compilation of dix code */
 CursorPtr rootCursor;
-Bool party_like_its_1989 = FALSE;
+Bool party_like_its_1989 = TRUE;
 Bool whiteRoot = FALSE;
 
 int cursorScreenDevPriv[MAXSCREENS];

Index: xsrc/external/mit/xorg-server/dist/os/utils.c
diff -u xsrc/external/mit/xorg-server/dist/os/utils.c:1.1.1.1.2.1 xsrc/external/mit/xorg-server/dist/os/utils.c:1.1.1.1.2.2
--- xsrc/external/mit/xorg-server/dist/os/utils.c:1.1.1.1.2.1	Thu Sep 17 03:35:47 2009
+++ xsrc/external/mit/xorg-server/dist/os/utils.c	Sat Sep 26 05:22:07 2009
@@ -525,6 +525,7 @@
 ErrorF("-render [default|mono|gray|color] set render color alloc policy\n");
 #endif
 ErrorF("-retro start with classic stipple and cursor\n");
+ErrorF("-noretro   start with black background and no cursor\n");
 ErrorF("-s #   screen-saver timeout (minutes)\n");
 ErrorF("-t #   mouse threshold (pixels)\n");
 ErrorF("-terminate terminate at server reset\n");
@@ -821,6 +822,8 @@
 	defaultKeyboardControl.autoRepeat = FALSE;
 	else if ( strcmp( argv[i], "-retro") == 0)
 	party_like_its_1989 = TRUE;
+	else if ( strcmp( argv[i], "-noretro") == 0)
+	party_like_its_1989 = FALSE;
 	else if ( strcmp( argv[i], "-s") == 0)
 	{
 	if(++i < argc)



CVS commit: [netbsd-5] xsrc/external/mit/freetype/dist/src

2009-07-01 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Thu Jul  2 05:08:10 UTC 2009

Modified Files:
xsrc/external/mit/freetype/dist/src/cff [netbsd-5]: cffload.c
xsrc/external/mit/freetype/dist/src/lzw [netbsd-5]: ftzopen.c
xsrc/external/mit/freetype/dist/src/sfnt [netbsd-5]: ttcmap.c
xsrc/external/mit/freetype/dist/src/smooth [netbsd-5]: ftsmooth.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #848):
external/mit/freetype/dist/src/cff/cffload.c: revision 1.2
external/mit/freetype/dist/src/lzw/ftzopen.c: revision 1.2
external/mit/freetype/dist/src/sfnt/ttcmap.c: revision 1.2
external/mit/freetype/dist/src/smooth/ftsmooth.c: revision 1.2
apply fixes from CVE-2009-0946


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.2.1 \
xsrc/external/mit/freetype/dist/src/cff/cffload.c
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.2.1 \
xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.2.1 \
xsrc/external/mit/freetype/dist/src/sfnt/ttcmap.c
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.2.1 \
xsrc/external/mit/freetype/dist/src/smooth/ftsmooth.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/freetype/dist/src/cff/cffload.c
diff -u xsrc/external/mit/freetype/dist/src/cff/cffload.c:1.1.1.1 xsrc/external/mit/freetype/dist/src/cff/cffload.c:1.1.1.1.2.1
--- xsrc/external/mit/freetype/dist/src/cff/cffload.c:1.1.1.1	Wed Jul 30 02:36:07 2008
+++ xsrc/external/mit/freetype/dist/src/cff/cffload.c	Thu Jul  2 05:08:09 2009
@@ -841,7 +841,20 @@
 goto Exit;
 
   for ( j = 1; j < num_glyphs; j++ )
-charset->sids[j] = FT_GET_USHORT();
+  {
+FT_UShort sid = FT_GET_USHORT();
+
+
+/* this constant is given in the CFF specification */
+if ( sid < 65000 )
+  charset->sids[j] = sid;
+else
+{
+  FT_ERROR(( "cff_charset_load:"
+ " invalid SID value %d set to zero\n", sid ));
+  charset->sids[j] = 0;
+}
+  }
 
   FT_FRAME_EXIT();
 }
@@ -874,6 +887,20 @@
 goto Exit;
 }
 
+/* check whether the range contains at least one valid glyph; */
+/* the constant is given in the CFF specification */
+if ( glyph_sid >= 65000 ) {
+  FT_ERROR(( "cff_charset_load: invalid SID range\n" ));
+  error = CFF_Err_Invalid_File_Format;
+  goto Exit;
+}
+
+/* try to rescue some of the SIDs if `nleft' is too large */
+if ( nleft > 65000 - 1 || glyph_sid >= 65000 - nleft ) {
+  FT_ERROR(( "cff_charset_load: invalid SID range trimmed\n" ));
+  nleft = 65000 - 1 - glyph_sid;
+}
+
 /* Fill in the range of sids -- `nleft + 1' glyphs. */
 for ( i = 0; j < num_glyphs && i <= nleft; i++, j++, glyph_sid++ )
   charset->sids[j] = glyph_sid;

Index: xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c
diff -u xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c:1.1.1.1 xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c:1.1.1.1.2.1
--- xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c:1.1.1.1	Wed Jul 30 02:36:13 2008
+++ xsrc/external/mit/freetype/dist/src/lzw/ftzopen.c	Thu Jul  2 05:08:09 2009
@@ -332,6 +332,9 @@
 
   while ( code >= 256U )
   {
+if ( !state->prefix )
+  goto Eof;
+
 FTLZW_STACK_PUSH( state->suffix[code - 256] );
 code = state->prefix[code - 256];
   }

Index: xsrc/external/mit/freetype/dist/src/sfnt/ttcmap.c
diff -u xsrc/external/mit/freetype/dist/src/sfnt/ttcmap.c:1.1.1.1 xsrc/external/mit/freetype/dist/src/sfnt/ttcmap.c:1.1.1.1.2.1
--- xsrc/external/mit/freetype/dist/src/sfnt/ttcmap.c:1.1.1.1	Wed Jul 30 02:36:16 2008
+++ xsrc/external/mit/freetype/dist/src/sfnt/ttcmap.c	Thu Jul  2 05:08:09 2009
@@ -1571,7 +1571,7 @@
   FT_INVALID_TOO_SHORT;
 
 length = TT_NEXT_ULONG( p );
-if ( table + length > valid->limit || length < 8208 )
+if ( length > (FT_UInt32)( valid->limit - table ) || length < 8192 + 16 )
   FT_INVALID_TOO_SHORT;
 
 is32   = table + 12;
@@ -1799,7 +1799,8 @@
 p  = table + 16;
 count  = TT_NEXT_ULONG( p );
 
-if ( table + length > valid->limit || length < 20 + count * 2 )
+if ( length > (FT_ULong)( valid->limit - table ) ||
+ length < 20 + count * 2 )
   FT_INVALID_TOO_SHORT;
 
 /* check glyph indices */
@@ -1984,7 +1985,8 @@
 p  = table + 12;
 num_groups = TT_NEXT_ULONG( p );
 
-if ( table + length > valid->limit || length < 16 + 12 * num_groups )
+if ( length > (FT_ULong)( valid->limit - table ) ||
+ length < 16 + 12 * num_gro

CVS commit: [netbsd-5] xsrc/external/mit/libdrm/dist/shared-core

2009-04-07 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Tue Apr  7 23:39:33 UTC 2009

Modified Files:
xsrc/external/mit/libdrm/dist/shared-core [netbsd-5]: drm.h

Log Message:
Pull up following revision(s) (requested by rafal in ticket #673):
external/mit/libdrm/dist/shared-core/drm.h: revision 1.3
Fix type of DRM_IOCTL_SG_ALLOC ioctl -- it should be input/output instead of
just input.  Noticed while debugging some scatter/gather fixes from FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.2.1 xsrc/external/mit/libdrm/dist/shared-core/drm.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/libdrm/dist/shared-core/drm.h
diff -u xsrc/external/mit/libdrm/dist/shared-core/drm.h:1.2 xsrc/external/mit/libdrm/dist/shared-core/drm.h:1.2.2.1
--- xsrc/external/mit/libdrm/dist/shared-core/drm.h:1.2	Thu Jul 31 01:30:22 2008
+++ xsrc/external/mit/libdrm/dist/shared-core/drm.h	Tue Apr  7 23:39:33 2009
@@ -909,7 +909,7 @@
 #define DRM_IOCTL_AGP_BIND		DRM_IOW( 0x36, drm_agp_binding_t)
 #define DRM_IOCTL_AGP_UNBIND		DRM_IOW( 0x37, drm_agp_binding_t)
 
-#define DRM_IOCTL_SG_ALLOC		DRM_IOW( 0x38, drm_scatter_gather_t)
+#define DRM_IOCTL_SG_ALLOC		DRM_IOWR(0x38, drm_scatter_gather_t)
 #define DRM_IOCTL_SG_FREE		DRM_IOW( 0x39, drm_scatter_gather_t)
 
 #define DRM_IOCTL_WAIT_VBLANK		DRM_IOWR(0x3a, drm_wait_vblank_t)



CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-crime/dist/src

2009-04-01 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Wed Apr  1 21:29:14 UTC 2009

Modified Files:
xsrc/external/mit/xf86-video-crime/dist/src [netbsd-5]: crime_accel.c

Log Message:
Pull up following revision(s) (requested by macallan in ticket #634):
external/mit/xf86-video-crime/dist/src/crime_accel.c: revision 1.7
oops, forgot to initialize the clipping register on init


To generate a diff of this commit:
cvs rdiff -u -r1.3.2.7 -r1.3.2.8 \
xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c
diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.7 xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.8
--- xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.7	Wed Apr  1 03:18:07 2009
+++ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c	Wed Apr  1 21:29:14 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: crime_accel.c,v 1.3.2.7 2009/04/01 03:18:07 snj Exp $ */
+/* $NetBSD: crime_accel.c,v 1.3.2.8 2009/04/01 21:29:14 snj Exp $ */
 /*
  * Copyright (c) 2008 Michael Lorenz
  * All rights reserved.
@@ -1934,6 +1934,8 @@
 	/* Sync */
 	pXAAInfo->Sync = CrimeSync;
 
+	CrimeDisableClipping(pScrn);
+
 	/* Screen-to-screen copy */
 	pXAAInfo->ScreenToScreenCopyFlags = NO_TRANSPARENCY;
 	pXAAInfo->SetupForScreenToScreenCopy = CrimeSetupForScreenToScreenCopy;



CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-crime/dist/src

2009-03-31 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Wed Apr  1 03:18:08 UTC 2009

Modified Files:
xsrc/external/mit/xf86-video-crime/dist/src [netbsd-5]: crime.h
crime_accel.c

Log Message:
Pull up following revision(s) (requested by macallan in ticket #626):
external/mit/xf86-video-crime/dist/src/crime.h: revision 1.4
external/mit/xf86-video-crime/dist/src/crime_accel.c: revision 1.6
implement pattern fills


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.4 -r1.2.2.5 \
xsrc/external/mit/xf86-video-crime/dist/src/crime.h
cvs rdiff -u -r1.3.2.6 -r1.3.2.7 \
xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-crime/dist/src/crime.h
diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime.h:1.2.2.4 xsrc/external/mit/xf86-video-crime/dist/src/crime.h:1.2.2.5
--- xsrc/external/mit/xf86-video-crime/dist/src/crime.h:1.2.2.4	Wed Apr  1 03:13:54 2009
+++ xsrc/external/mit/xf86-video-crime/dist/src/crime.h	Wed Apr  1 03:18:07 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: crime.h,v 1.2.2.4 2009/04/01 03:13:54 snj Exp $ */
+/* $NetBSD: crime.h,v 1.2.2.5 2009/04/01 03:18:07 snj Exp $ */
 /*
  * Copyright (c) 2008 Michael Lorenz
  * All rights reserved.
@@ -92,6 +92,7 @@
 	int			format;
 	int			use_mte;
 	uint32_t		expand[2048];
+	uint32_t		pattern[8];
 	uint32_t		alpha_color;
 	int			texture_depth;
 	unsigned char		*alpha_texture;

Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c
diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.6 xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.7
--- xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.6	Wed Apr  1 03:13:54 2009
+++ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c	Wed Apr  1 03:18:07 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: crime_accel.c,v 1.3.2.6 2009/04/01 03:13:54 snj Exp $ */
+/* $NetBSD: crime_accel.c,v 1.3.2.7 2009/04/01 03:18:07 snj Exp $ */
 /*
  * Copyright (c) 2008 Michael Lorenz
  * All rights reserved.
@@ -237,8 +237,6 @@
 	DE_DRAWMODE_SCISSOR_EN);
 	WRITE4(CRIME_DE_PRIMITIVE,
 		DE_PRIM_RECTANGLE | DE_PRIM_LR | DE_PRIM_TB);
-	WRITE4(CRIME_DE_MODE_SRC, DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 |
-			DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_32);
 	WRITE4(CRIME_DE_MODE_DST, DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 |
 			DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_32);
 	SYNC;
@@ -265,7 +263,95 @@
 	DONE(CRIME_DEBUG_RECTFILL);
 }
 
-void
+static void
+CrimeSetupForMono8x8PatternFill(ScrnInfoPtr pScrn, int patx, int paty,
+int fg, int bg, int rop, unsigned int planemask)
+{
+	CrimePtr fPtr = CRIMEPTR(pScrn);
+	uint32_t pat;
+
+	LOG(CRIME_DEBUG_RECTFILL);
+	MAKE_ROOM(7);
+	WRITE4(CRIME_DE_PLANEMASK, planemask);
+	WRITE4(CRIME_DE_ROP, rop);
+	WRITE4(CRIME_DE_FG, fg << 8);
+	if (bg == -1) {
+		WRITE4(CRIME_DE_DRAWMODE,
+		DE_DRAWMODE_PLANEMASK | DE_DRAWMODE_BYTEMASK |
+		DE_DRAWMODE_ROP | DE_DRAWMODE_POLY_STIP |
+		DE_DRAWMODE_SCISSOR_EN);
+	} else {
+		WRITE4(CRIME_DE_BG, bg << 8);
+		WRITE4(CRIME_DE_DRAWMODE,
+		DE_DRAWMODE_PLANEMASK | DE_DRAWMODE_BYTEMASK | 
+		DE_DRAWMODE_ROP | DE_DRAWMODE_POLY_STIP | 
+		DE_DRAWMODE_OPAQUE_STIP | DE_DRAWMODE_SCISSOR_EN);
+	}
+	WRITE4(CRIME_DE_PRIMITIVE,
+		DE_PRIM_RECTANGLE | DE_PRIM_LR | DE_PRIM_TB);
+	WRITE4(CRIME_DE_MODE_DST, DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 |
+			DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_32);
+
+	/*
+	 * we need to store the pattern so we can just hammer it into the
+	 * stipple register later on
+	 */
+	pat = patx & 0xff00;
+	pat |= pat >> 8;
+	fPtr->pattern[0] = pat | (pat >> 16);
+	pat = patx & 0x00ff;
+	pat |= pat << 8;
+	fPtr->pattern[1] = pat | (pat >> 16);
+	pat = patx & 0xff00;
+	pat |= pat >> 8;
+	fPtr->pattern[2] = pat | (pat << 16);
+	pat = patx & 0x00ff;
+	pat |= pat << 8;
+	fPtr->pattern[3] = pat | (pat << 16);
+
+	pat = paty & 0xff00;
+	pat |= pat >> 8;
+	fPtr->pattern[4] = pat | (pat >> 16);
+	pat = paty & 0x00ff;
+	pat |= pat << 8;
+	fPtr->pattern[5] = pat | (pat >> 16);
+	pat = paty & 0xff00;
+	pat |= pat >> 8;
+	fPtr->pattern[6] = pat | (pat << 16);
+	pat = paty & 0x00ff;
+	pat |= pat << 8;
+	fPtr->pattern[7] = pat | (pat << 16);
+	SYNC;
+	DONE(CRIME_DEBUG_RECTFILL);
+}
+
+static void
+CrimeSubsequentMono8x8PatternFillRect( ScrnInfoPtr pScrn,
+	int patx, int paty, int x, int y, int w, int h)
+{
+	CrimePtr fPtr = CRIMEPTR(pScrn);
+	int i, pat;
+
+	LOG(CRIME_DEBUG_RECTFILL);
+
+	/* first setup the stipple stuff */
+	
+	MAKE_ROOM(1);
+	WRITE4(CRIME_DE_STIPPLE_MODE, 0x001f | (patx << 24));
+	pat = paty;
+	
+	for (i = 0; i < h; i++) {
+		MAKE_ROOM(3);
+		WRITE4(CRIME_DE_STIPPLE_PAT, fPtr->pattern[pat]);
+		WRITE4(CRIME_DE_X_VERTEX_0, (x << 16) | ((y + i) & 0x));
+		WRITE4ST(CRIME_DE_X_VERTEX_1,
+		((x + w - 1) << 16) | ((y + i) & 0x))

CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-crime/dist/src

2009-03-31 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Wed Apr  1 03:13:54 UTC 2009

Modified Files:
xsrc/external/mit/xf86-video-crime/dist/src [netbsd-5]: crime.h
crime_accel.c

Log Message:
Pull up following revision(s) (requested by macallan in ticket #628):
external/mit/xf86-video-crime/dist/src/crime.h: revision 1.3
external/mit/xf86-video-crime/dist/src/crime_accel.c: revision 1.5
Implement image downloads, now KDE's window minimize animation doesn't
leave artifacts anymore. While there, allow commands to queue up where
appropriate, this gives a slight speedup in anti-aliased text rendering (about
10% on my 200MHz/1MB O2) and likely in other operations as well.


To generate a diff of this commit:
cvs rdiff -u -r1.2.2.3 -r1.2.2.4 \
xsrc/external/mit/xf86-video-crime/dist/src/crime.h
cvs rdiff -u -r1.3.2.5 -r1.3.2.6 \
xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-crime/dist/src/crime.h
diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime.h:1.2.2.3 xsrc/external/mit/xf86-video-crime/dist/src/crime.h:1.2.2.4
--- xsrc/external/mit/xf86-video-crime/dist/src/crime.h:1.2.2.3	Wed Feb 25 20:32:03 2009
+++ xsrc/external/mit/xf86-video-crime/dist/src/crime.h	Wed Apr  1 03:13:54 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: crime.h,v 1.2.2.3 2009/02/25 20:32:03 snj Exp $ */
+/* $NetBSD: crime.h,v 1.2.2.4 2009/04/01 03:13:54 snj Exp $ */
 /*
  * Copyright (c) 2008 Michael Lorenz
  * All rights reserved.
@@ -55,6 +55,7 @@
 #define CRIME_DEBUG_CLIPPING		0x0020
 #define CRIME_DEBUG_SYNC		0x0040
 #define CRIME_DEBUG_XRENDER		0x0080
+#define CRIME_DEBUG_IMAGEREAD		0x0100
 #define CRIME_DEBUG_ALL			0x
 #define CRIME_DEBUG_MASK (/*CRIME_DEBUG_IMAGEWRITE*/0)
 

Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c
diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.5 xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.6
--- xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.5	Wed Apr  1 03:01:12 2009
+++ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c	Wed Apr  1 03:13:54 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: crime_accel.c,v 1.3.2.5 2009/04/01 03:01:12 snj Exp $ */
+/* $NetBSD: crime_accel.c,v 1.3.2.6 2009/04/01 03:13:54 snj Exp $ */
 /*
  * Copyright (c) 2008 Michael Lorenz
  * All rights reserved.
@@ -59,8 +59,10 @@
 }
 #else
 #define SYNC do {} while ((*CRIMEREG(0x4000) & CRIME_DE_IDLE) == 0)
+#define SYNCMTE do {} while ((*CRIMEREG(0x4000) & CRIME_DE_MTE_IDLE) == 0)
 #endif
-#define READY do {} while ((*CRIMEREG(0x4000) & 0x0e00) != 0x0e00)
+#define MAKE_ROOM(x) do {} while ((16 - \
+   CRIME_PIPE_LEVEL(*CRIMEREG(0x4000))) < x);
 
 CARD32 CrimeAlphaTextureFormats[] = {PICT_a8, 0};
 CARD32 CrimeTextureFormats[] = {PICT_a8b8g8r8, PICT_a8r8g8b8, 0};
@@ -91,7 +93,7 @@
 	CrimePtr fPtr = CRIMEPTR(pScrn);
 
 	LOG(CRIME_DEBUG_BITBLT);
-	SYNC;
+	MAKE_ROOM(9);
 #if 0
 	if ((rop == GXcopy) && (planemask == 0x) && (xdir > 0)) {
 		/* use the MTE */
@@ -112,7 +114,6 @@
 #endif
 		fPtr->use_mte = 0;
 
-	SYNC;
 	WRITE4(CRIME_DE_XFER_STEP_X, 1);
 	WRITE4(CRIME_DE_PLANEMASK, planemask);
 	WRITE4(CRIME_DE_ROP, rop);
@@ -121,8 +122,11 @@
 	DE_DRAWMODE_ROP | DE_DRAWMODE_XFER_EN);
 	WRITE4(CRIME_DE_MODE_SRC, DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 |
 		DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_32);
+	WRITE4(CRIME_DE_MODE_DST, DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 |
+			DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_32);
 	fPtr->xdir = xdir;
 	fPtr->ydir = ydir;
+	SYNC;
 	DONE(CRIME_DEBUG_BITBLT);
 }
 
@@ -168,11 +172,10 @@
 		rxd = xDst << 2;
 		rxde = ((xDst + w) << 2) - 1;
 		oreg = *CRIMEREG(0x4000);
-		READY;
+		MAKE_ROOM(4);
 		WRITE4(CRIME_MTE_SRC0, (rxa << 16) | rya);
 		WRITE4(CRIME_MTE_SRC1, (rxe << 16) | rye);
 		WRITE4(CRIME_MTE_DST0, (rxd << 16) | ryd);
-		WBFLUSH;
 		WRITE4ST(CRIME_MTE_DST1, (rxde << 16) | ryde);
 		reg = *CRIMEREG(0x4000);
 
@@ -203,11 +206,10 @@
 			rys = ySrc;
 		}
 
-		READY;
+		MAKE_ROOM(4);
 		WRITE4(CRIME_DE_PRIMITIVE, prim);
 		WRITE4(CRIME_DE_XFER_ADDR_SRC,(rxs << 16) | (rys & 0x));
 		WRITE4(CRIME_DE_X_VERTEX_0, (rxa << 16) | (rya & 0x));
-		WBFLUSH;
 		WRITE4ST(CRIME_DE_X_VERTEX_1, (rxe << 16) | (rye & 0x));
 	}
 	DONE(CRIME_DEBUG_BITBLT);
@@ -225,8 +227,8 @@
 	CrimePtr fPtr = CRIMEPTR(pScrn);
 	int i;
 
-	SYNC;
 	LOG(CRIME_DEBUG_RECTFILL);
+	MAKE_ROOM(7);
 	WRITE4(CRIME_DE_PLANEMASK, planemask);
 	WRITE4(CRIME_DE_ROP, rop);
 	WRITE4(CRIME_DE_FG, colour << 8);
@@ -237,6 +239,9 @@
 		DE_PRIM_RECTANGLE | DE_PRIM_LR | DE_PRIM_TB);
 	WRITE4(CRIME_DE_MODE_SRC, DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 |
 			DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_32);
+	WRITE4(CRIME_DE_MODE_DST, DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 |
+			DE_MODE_TYPE_RGBA | DE_MODE_PIXDEPTH_32);
+	SYNC;
 	DONE

CVS commit: [netbsd-5] xsrc/external/mit/xf86-video-crime/dist/src

2009-03-31 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Wed Apr  1 03:01:12 UTC 2009

Modified Files:
xsrc/external/mit/xf86-video-crime/dist/src [netbsd-5]: crime_accel.c

Log Message:
Pull up following revision(s) (requested by macallan in ticket #629):
external/mit/xf86-video-crime/dist/src/crime_accel.c: revision 1.4
implement clipping, this takes care of line drawing artifacts in pwm


To generate a diff of this commit:
cvs rdiff -u -r1.3.2.4 -r1.3.2.5 \
xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c
diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.4 xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.5
--- xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.3.2.4	Thu Feb 26 07:28:24 2009
+++ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c	Wed Apr  1 03:01:12 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: crime_accel.c,v 1.3.2.4 2009/02/26 07:28:24 snj Exp $ */
+/* $NetBSD: crime_accel.c,v 1.3.2.5 2009/04/01 03:01:12 snj Exp $ */
 /*
  * Copyright (c) 2008 Michael Lorenz
  * All rights reserved.
@@ -231,7 +231,8 @@
 	WRITE4(CRIME_DE_ROP, rop);
 	WRITE4(CRIME_DE_FG, colour << 8);
 	WRITE4(CRIME_DE_DRAWMODE,
-	DE_DRAWMODE_PLANEMASK | DE_DRAWMODE_BYTEMASK | DE_DRAWMODE_ROP);
+	DE_DRAWMODE_PLANEMASK | DE_DRAWMODE_BYTEMASK | DE_DRAWMODE_ROP |
+	DE_DRAWMODE_SCISSOR_EN);
 	WRITE4(CRIME_DE_PRIMITIVE,
 		DE_PRIM_RECTANGLE | DE_PRIM_LR | DE_PRIM_TB);
 	WRITE4(CRIME_DE_MODE_SRC, DE_MODE_TLB_A | DE_MODE_BUFDEPTH_32 |
@@ -427,7 +428,7 @@
 	WRITE4(CRIME_DE_FG, color << 8);
 	WRITE4(CRIME_DE_DRAWMODE,
 		DE_DRAWMODE_PLANEMASK | DE_DRAWMODE_BYTEMASK |
-		DE_DRAWMODE_ROP);
+		DE_DRAWMODE_ROP | DE_DRAWMODE_SCISSOR_EN);
 	DONE(CRIME_DEBUG_LINES);
 }
 
@@ -471,12 +472,13 @@
 		/* transparent */
 		WRITE4(CRIME_DE_DRAWMODE,
 		DE_DRAWMODE_PLANEMASK | DE_DRAWMODE_BYTEMASK |
-		DE_DRAWMODE_ROP | DE_DRAWMODE_LINE_STIP);
+		DE_DRAWMODE_ROP | DE_DRAWMODE_LINE_STIP |
+		DE_DRAWMODE_SCISSOR_EN);
 	} else {
 		WRITE4(CRIME_DE_BG, bg << 8);
 		WRITE4(CRIME_DE_DRAWMODE,
 		DE_DRAWMODE_PLANEMASK | DE_DRAWMODE_BYTEMASK |
-		DE_DRAWMODE_ROP | 
+		DE_DRAWMODE_ROP | DE_DRAWMODE_SCISSOR_EN |
 		DE_DRAWMODE_OPAQUE_STIP | DE_DRAWMODE_LINE_STIP);
 	}
 	/*
@@ -521,7 +523,9 @@
 	CrimePtr fPtr = CRIMEPTR(pScrn);
 
 	LOG(CRIME_DEBUG_CLIPPING);
-	/* nothing so far */
+	WRITE4(CRIME_DE_SCISSOR, (left << 16) | top);
+	WRITE4(CRIME_DE_SCISSOR + 4, ((right + 1) << 16) | (bottom + 1));
+
 	DONE(CRIME_DEBUG_CLIPPING);
 }
 
@@ -533,7 +537,8 @@
 	LOG(CRIME_DEBUG_CLIPPING);
 	SYNC;
 
-	WRITE4(CRIME_DE_CLIPMODE, 0);
+	WRITE4(CRIME_DE_SCISSOR, 0);
+	WRITE4(CRIME_DE_SCISSOR + 4, 0x3fff3fff);
 	DONE(CRIME_DEBUG_CLIPPING);
 }