X.Org modules which could use some help to release

Thomas Klausner wiz at NetBSD.org
Fri Jul 19 21:26:06 UTC 2019


On Mon, Jul 15, 2019 at 02:31:13PM -0700, Alan Coopersmith wrote:
> On 7/15/19 4:02 AM, Thomas Klausner wrote:
> > As a datapoint:
> 
> Thanks for the info.
> 
> > Of these, the following have packages in pkgsrc:
> > 
> > libWindowsWM
> 
> This is supposed to only be useful on Cygwin, but a Cygwin package search
> says they don't ship it, and it hasn't had a release since 2009,  so I
> wonder if anyone uses it, or just keeps building it because no one ever
> said "stop".
> 
> > libXTrap
> 
> Similarly, this just seems like something build because they never knew
> what it was for - do they really have much software that adopted a
> proposed extension for X11R5, that's been deprecated since XTEST &
> RECORD came out in X11R6 in 1994?  (Oh, hey, time to change 15 -> 25 in
> https://gitlab.freedesktop.org/xorg/lib/libxtrap/blob/master/README.md )
> 
> > rstart
> 
> We dropped this with a note to use ssh X-forwarding instead.

Thanks. I removed these three and xtrap from pkgsrc.

> > and the following:
> > 
> > beforelight

No local changes.

> > xf86-video-ark

Adaptation to latest xorg-server.

> > xf86-video-newport

Bigger diff, see attachment.

> > xf86-video-tga

Adaptation to latest xorg-server.

> > xf86-video-tseng

Adaptation to latest xorg-server, and some small diffs.

> > xf86-video-xgi

Big diff, see attachment.

> > xf86dga

No local changes.

> > xfwp

No local changes.

> > xvidtune

No changes.

> > are included in NetBSD's xsrc, probably some with patches.
> > 
> > I can't tell if they are there for historic reasons or if anyone is
> > actually still using them.
> 
> Well, NetBSD still claims to support some of the ancient platforms for
> those drivers, so they might be:
> 
>  - xf86-video-tga - DEC Alpha graphics, for mid-90's systems such as:
>    https://en.wikipedia.org/wiki/DEC_Multia
> 
>  - xf86-video-newport - SGI MIPS workstation graphics:
>    https://en.wikipedia.org/wiki/SGI_Indy#Graphics
> 
> but those drivers don't seem to be getting all the API/ABI updates, and
> haven't had releases to make them compatible with any recent X server,
> so they'd have to be patching them to make them work.  Perhaps NetBSD
> folks who support those platforms should become their maintainers?

I usually can't even get NetBSD committers to send their diffs
upstream to you, so making them maintainer is even less likely to have
positive results.

I don't know what the best solution is.

Should we try getting the diffs merged? (See attachments, I can try to
group them in commits with messages if someone will apply them.)

Cheers,
 Thomas
-------------- next part --------------
mibstore.h and its miInitializeBackingStore() have been otherwise empty
since at least xorg-server 1.10.  remove all reference to them as the
header is gone in xorg-server 1.18.

Index: dist/src/ark_driver.c
===================================================================
RCS file: /cvsroot/xsrc/external/mit/xf86-video-ark/dist/src/ark_driver.c,v
retrieving revision 1.1.1.4
retrieving revision 1.2
diff -u -r1.1.1.4 -r1.2
--- dist/src/ark_driver.c	23 Jul 2015 01:15:49 -0000	1.1.1.4
+++ dist/src/ark_driver.c	16 Aug 2016 01:27:46 -0000	1.2
@@ -39,7 +39,6 @@
 #include "compiler.h"
 #include "mipointer.h"
 #include "micmap.h"
-#include "mibstore.h"
 #include "fb.h"
 #include "ark.h"
 
@@ -538,7 +537,6 @@
 
 	fbPictureInit (pScreen, 0, 0);
 
-	miInitializeBackingStore(pScreen);
 	xf86SetBackingStore(pScreen);
 
 	if (!pARK->NoAccel) {
-------------- next part --------------
Index: dist/src/newport.h
===================================================================
RCS file: /cvsroot/xsrc/external/mit/xf86-video-newport/dist/src/newport.h,v
retrieving revision 1.1.1.2
retrieving revision 1.4
diff -u -r1.1.1.2 -r1.4
--- dist/src/newport.h	23 Jul 2015 01:15:59 -0000	1.1.1.2
+++ dist/src/newport.h	23 Jul 2015 01:19:16 -0000	1.4
@@ -38,6 +38,7 @@
 /* register definitions of the Newport card */
 #include "newport_regs.h"
 
+#define NEWPORT_REGISTERS   0xf0000
 #define NEWPORT_BASE_ADDR0  0x1f0f0000
 #define NEWPORT_BASE_OFFSET 0x00400000
 #define NEWPORT_MAX_BOARDS 4
Index: dist/src/newport_cmap.c
===================================================================
RCS file: /cvsroot/xsrc/external/mit/xf86-video-newport/dist/src/newport_cmap.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- dist/src/newport_cmap.c	14 Feb 2009 03:04:46 -0000	1.1.1.1
+++ dist/src/newport_cmap.c	6 Oct 2009 20:28:14 -0000	1.2
@@ -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: dist/src/newport_driver.c
===================================================================
RCS file: /cvsroot/xsrc/external/mit/xf86-video-newport/dist/src/newport_driver.c,v
retrieving revision 1.1.1.2
retrieving revision 1.12
diff -u -r1.1.1.2 -r1.12
--- dist/src/newport_driver.c	23 Jul 2015 01:15:59 -0000	1.1.1.2
+++ dist/src/newport_driver.c	16 Aug 2016 01:27:47 -0000	1.12
@@ -33,13 +33,17 @@
 #include "config.h"
 #endif
 
+#if defined(__NetBSD__)
+#include <fcntl.h>
+#include <dev/wscons/wsconsio.h>
+#include <sys/ioctl.h>
+#endif
+
 /* function prototypes, common data structures & generic includes */
 #include "newport.h"
 
 /* Drivers using the mi SW cursor need: */
 #include "mipointer.h"
-/* Drivers using the mi implementation of backing store need: */
-#include "mibstore.h"
 /* Drivers using the mi colourmap code need: */
 #include "micmap.h"
 
@@ -55,6 +59,12 @@
 
 #include <string.h>
 #include <stdio.h>
+#include <unistd.h>
+
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) > 6
+#define xf86LoaderReqSymLists(...) do {} while (0)
+#define LoaderRefSymLists(...) do {} while (0)
+#endif
 
 #define NEWPORT_VERSION		4000
 #define NEWPORT_NAME		"NEWPORT"
@@ -195,7 +205,8 @@
 static void
 NewportIdentify(int flags)
 {
-	xf86PrintChipsets( NEWPORT_NAME, "driver for Newport Graphics Card", NewportChipsets);
+	xf86PrintChipsets( NEWPORT_NAME, "driver for Newport Graphics Card", 
+	    NewportChipsets);
 }
 
 static Bool
@@ -210,16 +221,31 @@
 #endif
 	unsigned probedIDs[NEWPORT_MAX_BOARDS];
 	memType base;
-
 	if ((numDevSections = xf86MatchDevice(NEWPORT_DRIVER_NAME, &devSections)) <= 0) 
                 return FALSE;
+
 	numUsed = NewportHWProbe(probedIDs);
 	if ( numUsed <= 0 ) 
 		return FALSE;
 
-	if(flags & PROBE_DETECT) 
+	if ( xf86DoConfigure && xf86DoConfigurePass1 ) {
+		GDevPtr pGDev;
+		for (i = 0; i < numUsed; i++) {
+			pGDev = xf86AddBusDeviceToConfigure(NEWPORT_DRIVER_NAME,
+				BUS_NONE, NULL, 0);
+			if (pGDev) {
+				/*
+				 * XF86Match???Instances() treat chipID and 
+				 * chipRev as overrides, so clobber them here.
+				 */
+				pGDev->chipID = pGDev->chipRev = -1;
+			}
+	    	}
+	}
+
+	if(flags & PROBE_DETECT) {
 		foundScreen = TRUE;
-	else {
+	} else {
 		for (i = 0; i < numDevSections; i++) {
 			dev = devSections[i];
 			busID =  xf86SetIntOption(dev->options, "BusID", 0);
@@ -372,9 +398,11 @@
 		pNewport->board_rev, pNewport->rex3_rev, 
 		pNewport->cmap_rev, pNewport->xmap9_rev);
 
-	if ( (xf86GetOptValInteger(pNewport->Options, OPTION_BITPLANES, &pNewport->bitplanes)))
+	if ( (xf86GetOptValInteger(pNewport->Options, OPTION_BITPLANES, 
+	    &pNewport->bitplanes)))
 	from = X_CONFIG;
-	xf86DrvMsg(pScrn->scrnIndex, from, "Newport has %d bitplanes\n", pNewport->bitplanes);
+	xf86DrvMsg(pScrn->scrnIndex, from, "Newport has %d bitplanes\n", 
+	    pNewport->bitplanes);
 
 	if ( pScrn->depth > pNewport->bitplanes ) {
 		xf86DrvMsg(pScrn->scrnIndex, X_ERROR, \
@@ -459,6 +487,12 @@
 		return FALSE;
 	}
 
+	/* Load XAA module */
+	if (!xf86LoadSubModule(pScrn, "xaa")) {
+		NewportFreeRec(pScrn);
+		return FALSE;
+	}
+	xf86LoaderReqSymLists(xaaSymbols, NULL);
 	return TRUE;
 }
 
@@ -537,7 +571,6 @@
 		xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 			   "RENDER extension initialisation failed.\n");
 
-	miInitializeBackingStore(pScreen);
 	xf86SetBackingStore(pScreen);
 
 	xf86SetBlackWhitePixels(pScreen);
@@ -617,7 +650,7 @@
 	if (serverGeneration == 1) {
 		xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);
 	}
-	
+	NewportModeInit(pScrn, pScrn->currentMode);
 	return TRUE;
 }
 
@@ -709,7 +742,8 @@
 
 	width = mode->HDisplay;
 	height = mode->VDisplay;
-	if (width != 1280 || height != 1024) {
+	if ((width > 1280) || (width < 1024) ||
+	    (height < 768) || (height > 1024)) {
 		xf86DrvMsg(pScrn->scrnIndex, X_ERROR, \
 		"Width = %d and height = %d is not supported by by this driver\n", width, height);
 		return FALSE;
@@ -735,17 +769,22 @@
 					NPORT_DMODE1_RWPCKD;
 	} else { /* 24bpp */
 		CARD32 mode = 0L;
+		LOCO col;
+		int i;
 
 		/* tell the xmap9s that we are using 24bpp */
 		NewportBfwait(pNewport->pNewportRegs);
-		pNewportRegs->set.dcbmode = (DCB_XMAP_ALL | W_DCB_XMAP9_PROTOCOL |
-				XM9_CRS_CONFIG | NPORT_DMODE_W1 );
-		pNewportRegs->set.dcbdata0.bytes.b3 &= ~(XM9_8_BITPLANES | XM9_PUPMODE);
+		pNewportRegs->set.dcbmode = (DCB_XMAP_ALL | 
+		    W_DCB_XMAP9_PROTOCOL | XM9_CRS_CONFIG | NPORT_DMODE_W1 );
+		pNewportRegs->set.dcbdata0.bytes.b3 &= 
+		    ~(XM9_8_BITPLANES | XM9_PUPMODE);
 		NewportBfwait(pNewport->pNewportRegs);
 		/* set up the mode register for 24bpp */
-		mode = XM9_MREG_PIX_SIZE_24BPP | XM9_MREG_PIX_MODE_RGB1
+		mode = XM9_MREG_PIX_SIZE_24BPP | XM9_MREG_PIX_MODE_RGB2
 				| XM9_MREG_GAMMA_BYPASS;
-		NewportXmap9SetModeRegister( pNewportRegs , 0, mode);
+		for (i = 0; i < 32; i++)
+			NewportXmap9SetModeRegister( pNewportRegs , i, mode);
+
 		/* select the set up mode register */
 		NewportBfwait(pNewport->pNewportRegs);
 		pNewportRegs->set.dcbmode = (DCB_XMAP_ALL | W_DCB_XMAP9_PROTOCOL |
@@ -759,16 +798,29 @@
 					NPORT_DMODE1_RGBMD | 
 					/* turn on 8888 = RGBA pixel packing */
 					NPORT_DMODE1_HD32 | NPORT_DMODE1_RWPCKD;
-		/* After setting up XMAP9 we have to reinitialize the CMAP for
-		 * whatever reason (the docs say nothing about it). RestorePalette()
-		 * is just a lazy way to do this */
-		NewportRestorePalette( pScrn );
+		/*
+		 * After setting up XMAP9 we have to reinitialize the CMAP for
+		 * whatever reason (the docs say nothing about it). 
+		 */
+
+
+		for (i = 0; i < 256; i++) {
+			col.red = col.green = col.blue = i;
+			NewportCmapSetRGB(NEWPORTREGSPTR(pScrn), i, col);
+		}
+		for (i = 0; i < 256; i++) {
+			col.red = col.green = col.blue = i;
+			NewportCmapSetRGB(NEWPORTREGSPTR(pScrn), i + 0x1f00,
+			    col);
+		}
+
 	}
 	/* blank the framebuffer */
 	NewportWait(pNewportRegs);
-	pNewportRegs->set.drawmode0 = (NPORT_DMODE0_DRAW | NPORT_DMODE0_DOSETUP |
-					NPORT_DMODE0_STOPX | NPORT_DMODE0_STOPY |
-					NPORT_DMODE0_BLOCK);
+	pNewportRegs->set.drawmode0 = (NPORT_DMODE0_DRAW |
+				       NPORT_DMODE0_DOSETUP |
+				       NPORT_DMODE0_STOPX | NPORT_DMODE0_STOPY |
+				       NPORT_DMODE0_BLOCK);
 	pNewportRegs->set.drawmode1 = pNewport->drawmode1 |
 					NPORT_DMODE1_FCLR |
 					NPORT_DMODE1_RGBMD;
@@ -812,10 +864,22 @@
 static unsigned
 NewportHWProbe(unsigned probedIDs[])
 {
-	FILE* cpuinfo;
-	char line[80];
 	unsigned hasNewport = 0;
 
+#if defined(__NetBSD__)
+	int fd, type, i;
+
+	probedIDs[0] = 0;
+
+	fd = open("/dev/ttyE0", O_RDONLY, 0);
+	i = ioctl(fd, WSDISPLAYIO_GTYPE, &type);
+	close(fd);
+
+	if ( (i == 0) && ( type == WSDISPLAY_TYPE_NEWPORT) )
+		hasNewport = 1;
+#else
+	FILE* cpuinfo;
+	char line[80];
 	if ((cpuinfo = fopen("/proc/cpuinfo", "r"))) {
 		while(fgets(line, 80, cpuinfo) != NULL) {
 			if(strstr(line, "SGI Indy") != NULL) {
@@ -831,6 +895,7 @@
 		}
 		fclose(cpuinfo);
 	}
+#endif
 	return hasNewport;
 }
 
@@ -866,12 +931,19 @@
 {
 	NewportPtr pNewport = NEWPORTPTR(pScrn);
 
+#if defined(__NetBSD__)
+	pNewport->pNewportRegs = xf86MapVidMem(pScrn->scrnIndex,
+			VIDMEM_MMIO, NEWPORT_REGISTERS, sizeof(NewportRegs));
+#else
 	pNewport->pNewportRegs = xf86MapVidMem(pScrn->scrnIndex, 
 			VIDMEM_MMIO,
-			NEWPORT_BASE_ADDR0 + pNewport->busID * NEWPORT_BASE_OFFSET,
-			 sizeof(NewportRegs));
-	if ( ! pNewport->pNewportRegs ) 
+			NEWPORT_BASE_ADDR0 + pNewport->busID * 
+			    NEWPORT_BASE_OFFSET, sizeof(NewportRegs));
+#endif
+	if ( ! pNewport->pNewportRegs ) {
+		xf86Msg(X_ERROR, "can't map registers\n");
 		return FALSE;
+	}
 	return TRUE;
 }
 
Index: dist/src/newport_regs.c
===================================================================
RCS file: /cvsroot/xsrc/external/mit/xf86-video-newport/dist/src/newport_regs.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- dist/src/newport_regs.c	14 Feb 2009 03:04:46 -0000	1.1.1.1
+++ dist/src/newport_regs.c	6 Oct 2009 20:28:14 -0000	1.2
@@ -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( (pNewportRegs->set.dcbdata0.bytes.b3) & 7 ) 
 			break;
 	}
Index: dist/src/newport_regs.h
===================================================================
RCS file: /cvsroot/xsrc/external/mit/xf86-video-newport/dist/src/newport_regs.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- dist/src/newport_regs.h	14 Feb 2009 03:04:46 -0000	1.1.1.1
+++ dist/src/newport_regs.h	6 Oct 2009 20:28:14 -0000	1.2
@@ -397,8 +397,8 @@
 #   define XM9_CRS_FIFO_AVAIL        (2 << DCB_CRS_SHIFT)
 #       define XM9_FIFO_0_AVAIL      0
 #       define XM9_FIFO_1_AVAIL      1
-#       define XM9_FIFO_2_AVAIL      3
-#       define XM9_FIFO_3_AVAIL      2
+#       define XM9_FIFO_2_AVAIL      2
+#       define XM9_FIFO_3_AVAIL      3
 #       define XM9_FIFO_FULL         XM9_FIFO_0_AVAIL
 #       define XM9_FIFO_EMPTY        XM9_FIFO_3_AVAIL
 #   define XM9_CRS_CURS_CMAP_MSB     (3 << DCB_CRS_SHIFT)
@@ -412,7 +412,7 @@
 		   (setup << DCB_CSSETUP_SHIFT)|    \
 		   (width << DCB_CSWIDTH_SHIFT))
 
-#define W_DCB_XMAP9_PROTOCOL       DCB_CYCLES (2, 1, 0)
+#define W_DCB_XMAP9_PROTOCOL       DCB_CYCLES (1, 2, 3)
 #define WSLOW_DCB_XMAP9_PROTOCOL   DCB_CYCLES (5, 5, 0)
 #define WAYSLOW_DCB_XMAP9_PROTOCOL DCB_CYCLES (12, 12, 0)
 #define R_DCB_XMAP9_PROTOCOL       DCB_CYCLES (2, 1, 3)
-------------- next part --------------
Index: dist/src/compat-api.h
===================================================================
RCS file: /cvsroot/xsrc/external/mit/xf86-video-tga/dist/src/compat-api.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- dist/src/compat-api.h	3 Jun 2013 09:59:08 -0000	1.1.1.1
+++ dist/src/compat-api.h	31 Dec 2018 22:17:21 -0000	1.2
@@ -78,11 +78,19 @@
 
 #define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
 
+#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0)
+#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout
+#define BLOCKHANDLER_ARGS arg, pTimeout
+
+#define WAKEUPHANDLER_ARGS_DECL ScreenPtr arg, int result
+#define WAKEUPHANDLER_ARGS arg, result
+#else
 #define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
 #define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
 
 #define WAKEUPHANDLER_ARGS_DECL ScreenPtr arg, unsigned long result, pointer read_mask
 #define WAKEUPHANDLER_ARGS arg, result, read_mask
+#endif
 
 #define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
 #define CLOSE_SCREEN_ARGS pScreen
Index: dist/src/tga_accel.c
===================================================================
RCS file: /cvsroot/xsrc/external/mit/xf86-video-tga/dist/src/tga_accel.c,v
retrieving revision 1.1.1.2
retrieving revision 1.4
diff -u -r1.1.1.2 -r1.4
--- dist/src/tga_accel.c	3 Jun 2013 09:59:08 -0000	1.1.1.2
+++ dist/src/tga_accel.c	20 Aug 2016 00:27:22 -0000	1.4
@@ -37,7 +37,6 @@
 #include "xf86cmap.h"
 #include "mipointer.h"
 
-#include "mibstore.h"
 #include "miline.h"
 
 #include "tga_regs.h"
Index: dist/src/tga_driver.c
===================================================================
RCS file: /cvsroot/xsrc/external/mit/xf86-video-tga/dist/src/tga_driver.c,v
retrieving revision 1.1.1.4
retrieving revision 1.4
diff -u -r1.1.1.4 -r1.4
--- dist/src/tga_driver.c	3 Jun 2013 09:59:08 -0000	1.1.1.4
+++ dist/src/tga_driver.c	20 Aug 2016 00:27:22 -0000	1.4
@@ -46,8 +46,6 @@
 
 /* software cursor */
 #include "mipointer.h"
-/* backing store */
-#include "mibstore.h"
 
 /*  #include "mibank.h" */
 /* colormap manipulation */
@@ -1451,7 +1449,6 @@
     
     fbPictureInit (pScreen, 0, 0);
     
-    miInitializeBackingStore(pScreen);
     xf86SetBackingStore(pScreen);
     xf86SetSilkenMouse(pScreen);
 
-------------- next part --------------
Index: dist/src/compat-api.h
===================================================================
RCS file: /cvsroot/xsrc/external/mit/xf86-video-tseng/dist/src/compat-api.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- dist/src/compat-api.h	3 Jun 2013 09:59:12 -0000	1.1.1.1
+++ dist/src/compat-api.h	31 Dec 2018 22:17:21 -0000	1.2
@@ -78,11 +78,19 @@
 
 #define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
 
+#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0)
+#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
+#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
+
+#define WAKEUPHANDLER_ARGS_DECL ScreenPtr arg, int result
+#define WAKEUPHANDLER_ARGS arg, result
+#else
 #define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
 #define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
 
 #define WAKEUPHANDLER_ARGS_DECL ScreenPtr arg, unsigned long result, pointer read_mask
 #define WAKEUPHANDLER_ARGS arg, result, read_mask
+#endif
 
 #define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
 #define CLOSE_SCREEN_ARGS pScreen
Index: dist/src/tseng_accel.c
===================================================================
RCS file: /cvsroot/xsrc/external/mit/xf86-video-tseng/dist/src/tseng_accel.c,v
retrieving revision 1.1.1.3
retrieving revision 1.2
diff -u -r1.1.1.3 -r1.2
--- dist/src/tseng_accel.c	3 Jun 2013 09:59:12 -0000	1.1.1.3
+++ dist/src/tseng_accel.c	3 Jun 2013 10:28:19 -0000	1.2
@@ -115,7 +115,7 @@
     }
 }
 
-static void 
+void 
 tseng_recover_timeout(TsengPtr pTseng)
 {
     if (pTseng->ChipType == ET4000) {
Index: dist/src/tseng_accel.h
===================================================================
RCS file: /cvsroot/xsrc/external/mit/xf86-video-tseng/dist/src/tseng_accel.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- dist/src/tseng_accel.h	2 Aug 2008 05:17:35 -0000	1.1.1.1
+++ dist/src/tseng_accel.h	3 Jun 2013 10:28:19 -0000	1.2
@@ -95,7 +95,7 @@
 #define MAX_WAIT_CNT 500000	       /* how long we wait before we time out */
 #undef WAIT_VERBOSE		       /* if defined: print out how long we waited */
 
-static void tseng_recover_timeout(TsengPtr pTseng);
+void tseng_recover_timeout(TsengPtr pTseng);
 
 static __inline__ void 
 tseng_wait(TsengPtr pTseng, int reg, char *name, unsigned char mask)
Index: dist/src/tseng_driver.c
===================================================================
RCS file: /cvsroot/xsrc/external/mit/xf86-video-tseng/dist/src/tseng_driver.c,v
retrieving revision 1.1.1.5
retrieving revision 1.3
diff -u -r1.1.1.5 -r1.3
--- dist/src/tseng_driver.c	3 Jun 2013 09:59:12 -0000	1.1.1.5
+++ dist/src/tseng_driver.c	31 Dec 2018 22:17:21 -0000	1.3
@@ -39,9 +39,6 @@
 /* All drivers initialising the SW cursor need this */
 #include "mipointer.h"
 
-/* All drivers implementing backing store need this */
-#include "mibstore.h"
-
 #include "fb.h"
 
 #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
@@ -1040,10 +1037,6 @@
     else
 	pTseng->Bytesperpixel = 1;  /* this is fake for < 8bpp, but simplifies other code */
 
-    /* hardware limits */
-    pScrn->maxHValue = Tseng_HMAX;
-    pScrn->maxVValue = Tseng_VMAX;
-
     /*
      * This must happen after pScrn->display has been set because
      * xf86SetWeight references it.
@@ -1136,8 +1129,8 @@
     /* Select valid modes from those available */
     i = xf86ValidateModes(pScrn, pScrn->monitor->Modes,
 	pScrn->display->modes, &pTseng->clockRange,
-	NULL, 32, pScrn->maxHValue, 8*pTseng->Bytesperpixel, /* H limits */
-	0, pScrn->maxVValue,	       /* V limits */
+	NULL, 32, /* XXXMRG pScrn->maxHValue*/ 2048, 8*pTseng->Bytesperpixel, /* H limits */
+	0, /* XXXMRG pScrn->maxVValue*/ 2048,	       /* V limits */
 	pScrn->display->virtualX,
 	pScrn->display->virtualY,
 	pTseng->FbMapSize,
@@ -1453,7 +1446,6 @@
 	}
     }
 
-    miInitializeBackingStore(pScreen);
     xf86SetSilkenMouse(pScreen);
     /* Initialise cursor functions */
     miDCInitialize(pScreen, xf86GetPointerScreenFuncs());


More information about the xorg-devel mailing list