Module Name:    xsrc
Committed By:   jdc
Date:           Thu May 27 04:48:10 UTC 2021

Modified Files:
        xsrc/external/mit/xf86-video-pnozz/dist/src: pnozz.h pnozz_accel.c
            pnozz_cursor.c pnozz_driver.c
Added Files:
        xsrc/external/mit/xf86-video-pnozz/dist/src: compat-api.h pnozz_exa.c

Log Message:
Add support for EXA, so that the pnozz driver works again with Xorg.
Note, that only minimal acceleration is currently supported.

Thanks to macallan for the pointers to get this working.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
    xsrc/external/mit/xf86-video-pnozz/dist/src/compat-api.h \
    xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_exa.c
cvs rdiff -u -r1.1 -r1.2 xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz.h
cvs rdiff -u -r1.2 -r1.3 \
    xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_accel.c \
    xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_cursor.c
cvs rdiff -u -r1.6 -r1.7 \
    xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_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-pnozz/dist/src/pnozz.h
diff -u xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz.h:1.1 xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz.h:1.2
--- xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz.h:1.1	Wed Aug 26 22:28:26 2009
+++ xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz.h	Thu May 27 04:48:10 2021
@@ -20,7 +20,7 @@
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
-/* $NetBSD: pnozz.h,v 1.1 2009/08/26 22:28:26 macallan Exp $ */
+/* $NetBSD: pnozz.h,v 1.2 2021/05/27 04:48:10 jdc Exp $ */
 
 #ifndef PNOZZ_H
 #define PNOZZ_H
@@ -29,10 +29,14 @@
 #include "xf86_OSproc.h"
 #include "xf86RamDac.h"
 #include <X11/Xmd.h>
+#include <dev/sun/fbio.h>
 #include "gcstruct.h"
 #include "pnozz_regs.h"
 #include "xf86sbusBus.h"
+#ifdef HAVE_XAA_H
 #include "xaa.h"
+#endif
+#include "exa.h"
 
 typedef struct {
 	unsigned int fg, bg;			/* FG/BG colors for stipple */
@@ -53,19 +57,29 @@ typedef struct {
 	int		width;
 	int		height, scanlinesize, maxheight;
 	int		depthshift;
+	int		vidmem;
 
 	sbusDevicePtr	psdp;
+	struct fbcursor Cursor;
 	Bool		HWCursor;
 	Bool		NoAccel;
+	Bool		useXAA;
 	CloseScreenProcPtr CloseScreen;
 	
 	xf86CursorInfoPtr CursorInfoRec;
-	struct fbcursor Cursor;
+	unsigned int	CursorXY;
+	int		CursorBg, CursorFg;
+	Bool		CursorEnabled;
+	unsigned int	cursmask[32];	/* cursor mask bits */
+	unsigned int	cursbits[32];	/* what to show where mask enabled */
 	unsigned char pal[9];
 	
 	OptionInfoPtr	Options;
-	XAAInfoRecPtr	pXAA;
+	ExaDriverPtr	pExa;
+	int		srcoff;
+#ifdef HAVE_XAA_H
 	unsigned char	*buffers[2];
+#endif
 	/*
 	 * XXX this is enough for everything a SPARCbook could do on it's
 	 * internal display but not necessarily for an external one
@@ -114,7 +128,9 @@ unsigned char pnozz_read_dac_ctl_reg(Pno
 void pnozz_write_dac_cmap_reg(PnozzPtr, int, unsigned int);
 
 int PnozzAccelInit(ScrnInfoPtr);
+Bool PnozzDGAInit(ScreenPtr);
+int PnozzEXAInit(ScreenPtr);
 void PnozzHideCursor(ScrnInfoPtr);
 void PnozzShowCursor(ScrnInfoPtr);
 
-#endif /* CG6_H */
+#endif /* PNOZZ_H */

Index: xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_accel.c
diff -u xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_accel.c:1.2 xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_accel.c:1.3
--- xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_accel.c:1.2	Wed May 25 14:15:26 2011
+++ xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_accel.c	Thu May 27 04:48:10 2021
@@ -20,15 +20,15 @@
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
-/* $NetBSD: pnozz_accel.c,v 1.2 2011/05/25 14:15:26 christos Exp $ */
+/* $NetBSD: pnozz_accel.c,v 1.3 2021/05/27 04:48:10 jdc Exp $ */
 
-#include <fcntl.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <dev/sun/fbio.h>
-#include <dev/wscons/wsconsio.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include "pnozz.h"
+#include "pnozz_regs.h"
+#include "dgaproc.h"
 
 static CARD32 PnozzCopyROP[] = {
 	/*GXclear*/		0,
@@ -68,6 +68,31 @@ static CARD32 PnozzDrawROP[] = {
 	/*GXset*/		ROP_PAT
 };
 
+/* DGA stuff */
+
+static Bool Pnozz_OpenFramebuffer(ScrnInfoPtr pScrn, char **,
+    unsigned char **mem, int *, int *, int *);
+static Bool Pnozz_SetMode(ScrnInfoPtr, DGAModePtr);
+static void Pnozz_SetViewport(ScrnInfoPtr, int, int, int);
+static int Pnozz_GetViewport(ScrnInfoPtr);
+static void Pnozz_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long);
+static void Pnozz_BlitRect(ScrnInfoPtr, int, int, int, int, int, int);
+
+static void PnozzSync(ScrnInfoPtr);
+
+static DGAFunctionRec Pnozz_DGAFuncs = {
+        Pnozz_OpenFramebuffer,
+        NULL,
+        Pnozz_SetMode,
+        Pnozz_SetViewport,
+        Pnozz_GetViewport,
+        PnozzSync,
+        Pnozz_FillRect,
+        Pnozz_BlitRect,
+        NULL
+};
+
+
 CARD32 MaxClip, junk;
 
 void
@@ -84,7 +109,7 @@ PnozzSync(ScrnInfoPtr pScrn)
  * registers we need to juggle bytes ourselves.
  */
 
-static void
+void
 pnozz_write_colour(PnozzPtr pPnozz, int reg, CARD32 colour)
 {
     CARD32 c2;
@@ -117,7 +142,7 @@ static void unClip(PnozzPtr pPnozz)
     pnozz_write_4(pPnozz, BYTE_CLIP_MAX, MaxClip);
 }
 
-static void
+void
 PnozzInitEngine(PnozzPtr pPnozz)
 {
     unClip(pPnozz);
@@ -223,6 +248,8 @@ PnozzSubsequentSolidFillRect
     junk = pnozz_read_4(pPnozz, COMMAND_QUAD);
 }
 
+#ifdef HAVE_XAA_H
+
 static void 
 PnozzSetupForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
         		int fg, int bg,
@@ -441,7 +468,6 @@ PnozzImageWriteRect(ScrnInfoPtr pScrn, i
 /*
  * TODO:
  * - CPU to VRAM colour blits
- * - DGA support
  */
 
 int
@@ -535,3 +561,114 @@ PnozzAccelInit(ScrnInfoPtr pScrn)
     
     return 0;
 }
+
+#endif /* HAVE_XAA_H */
+
+Bool
+PnozzDGAInit(ScreenPtr pScreen)
+{
+    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+    PnozzPtr pPnozz = GET_PNOZZ_FROM_SCRN(pScrn);
+    DGAModePtr mode;
+    int result;
+    
+    mode = xnfcalloc(sizeof(DGAModeRec), 1);
+    if (mode == NULL) {
+        xf86Msg(X_WARNING, "%s: DGA setup failed, cannot allocate memory\n",
+            pPnozz->psdp->device);
+        return FALSE;
+    }
+    
+    mode->mode = pScrn->modes;
+    mode->flags = DGA_PIXMAP_AVAILABLE | DGA_CONCURRENT_ACCESS;
+    if(!pPnozz->NoAccel) {
+        mode->flags |= DGA_FILL_RECT | DGA_BLIT_RECT;
+    }
+    
+    mode->imageWidth = mode->pixmapWidth = mode->viewportWidth =
+	pScrn->virtualX;
+    mode->imageHeight = mode->pixmapHeight = mode->viewportHeight =
+	pScrn->virtualY;
+
+    mode->bytesPerScanline = mode->imageWidth;
+
+    mode->byteOrder = pScrn->imageByteOrder;
+    mode->depth = 8;
+    mode->bitsPerPixel = 8;
+    mode->red_mask = pScrn->mask.red;
+    mode->green_mask = pScrn->mask.green;
+    mode->blue_mask = pScrn->mask.blue;
+    
+    mode->visualClass = PseudoColor;
+    mode->address = pPnozz->fb;
+
+    result = DGAInit(pScreen, &Pnozz_DGAFuncs, mode, 1);
+
+    if (result) {
+	xf86Msg(X_INFO, "%s: DGA initialized\n",
+            pPnozz->psdp->device);
+	return TRUE;
+    } else {
+	xf86Msg(X_WARNING, "%s: DGA setup failed\n",
+            pPnozz->psdp->device);
+	return FALSE;
+    }
+}
+
+static Bool 
+Pnozz_OpenFramebuffer(ScrnInfoPtr pScrn, char **name,
+				unsigned char **mem,
+				int *size, int *offset,
+				int *extra)
+{
+    PnozzPtr pPnozz = GET_PNOZZ_FROM_SCRN(pScrn);
+
+    *name = pPnozz->psdp->device;
+
+    *mem = (unsigned char*)0;
+    *size = pPnozz->vidmem;
+    *offset = 0;
+    *extra = 0;
+
+    return TRUE;
+}
+
+static Bool
+Pnozz_SetMode(ScrnInfoPtr pScrn, DGAModePtr pMode)
+{
+    /*
+     * Nothing to do, we currently only support one mode
+     * and we are always in it.
+     */
+    return TRUE;
+}
+
+static void
+Pnozz_SetViewport(ScrnInfoPtr pScrn, int x, int y, int flags)
+{
+     /* We don't support viewports, so... */
+}
+
+static int
+Pnozz_GetViewport(ScrnInfoPtr pScrn)
+{
+    /* No viewports, none pending... */
+    return 0;
+}
+
+static void
+Pnozz_FillRect(ScrnInfoPtr pScrn, int x, int y, int w, int h, unsigned long color)
+{
+
+    PnozzSetupForSolidFill(pScrn, color, GXset, 8);
+    PnozzSubsequentSolidFillRect(pScrn, x, y, w, h);
+}
+
+static void
+Pnozz_BlitRect(ScrnInfoPtr pScrn, int srcx, int srcy,
+			 int w, int h, int dstx, int dsty)
+{
+
+    PnozzSetupForScreenToScreenCopy(pScrn, 0, 0, GXcopy, 8, 0);
+    PnozzSubsequentScreenToScreenCopy(pScrn, srcx, srcy, dstx, dsty, w, h);
+}
Index: xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_cursor.c
diff -u xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_cursor.c:1.2 xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_cursor.c:1.3
--- xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_cursor.c:1.2	Wed May 25 23:36:39 2011
+++ xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_cursor.c	Thu May 27 04:48:10 2021
@@ -20,13 +20,16 @@
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
-/* $NetBSD: pnozz_cursor.c,v 1.2 2011/05/25 23:36:39 macallan Exp $ */
+/* $NetBSD: pnozz_cursor.c,v 1.3 2021/05/27 04:48:10 jdc Exp $ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <fcntl.h>
 #include <sys/time.h>
 #include <sys/types.h>
 #include <sys/ioctl.h>
-#include <dev/sun/fbio.h>
 #include <dev/wscons/wsconsio.h>
 
 #include "pnozz.h"

Index: xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_driver.c
diff -u xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_driver.c:1.6 xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_driver.c:1.7
--- xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_driver.c:1.6	Tue Aug 16 01:27:47 2016
+++ xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_driver.c	Thu May 27 04:48:10 2021
@@ -20,61 +20,50 @@
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
-/* $NetBSD: pnozz_driver.c,v 1.6 2016/08/16 01:27:47 mrg Exp $ */
+/* $NetBSD: pnozz_driver.c,v 1.7 2021/05/27 04:48:10 jdc Exp $ */
 
 /*
  * this driver has been tested on SPARCbook 3GX and 3TX, it supports full 
  * acceleration in 8, 16 and 24 bit colour
  */
 
-#include <fcntl.h>
-#include <sys/time.h>
-#include <sys/types.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <sys/ioctl.h>
-#include <dev/sun/fbio.h>
-#include <dev/wscons/wsconsio.h>
 
+#include "pnozz.h"
 #include "xf86.h"
 #include "xf86_OSproc.h"
-
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
-#include "xf86Resources.h"
-#endif
-#include "xf86sbusBus.h"
-
 #include "mipointer.h"
 #include "micmap.h"
 
-#define DEBUG 0
+#define DEBUG 1
 
 #include "fb.h"
 #include "xf86cmap.h"
-#include "pnozz.h"
 
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) > 6
-#define xf86LoaderReqSymLists(...) do {} while (0)
-#define LoaderRefSymLists(...) do {} while (0)
-#endif
+#include "compat-api.h"
 
 static const OptionInfoRec * PnozzAvailableOptions(int chipid, int busid);
 static void	PnozzIdentify(int flags);
 static Bool	PnozzProbe(DriverPtr drv, int flags);
 static Bool	PnozzPreInit(ScrnInfoPtr pScrn, int flags);
-static Bool	PnozzScreenInit(int Index, ScreenPtr pScreen, int argc,
-			      char **argv);
-static Bool	PnozzEnterVT(int scrnIndex, int flags);
-static void	PnozzLeaveVT(int scrnIndex, int flags);
-static Bool	PnozzCloseScreen(int scrnIndex, ScreenPtr pScreen);
+static Bool	PnozzScreenInit(SCREEN_INIT_ARGS_DECL);
+static Bool	PnozzEnterVT(VT_FUNC_ARGS_DECL);
+static void	PnozzLeaveVT(VT_FUNC_ARGS_DECL);
+static Bool	PnozzCloseScreen(CLOSE_SCREEN_ARGS_DECL);
 static Bool	PnozzSaveScreen(ScreenPtr pScreen, int mode);
 
 /* Required if the driver supports mode switching */
-static Bool	PnozzSwitchMode(int scrnIndex, DisplayModePtr mode, int flags);
+static Bool	PnozzSwitchMode(SWITCH_MODE_ARGS_DECL);
 /* Required if the driver supports moving the viewport */
-static void	PnozzAdjustFrame(int scrnIndex, int x, int y, int flags);
+static void	PnozzAdjustFrame(ADJUST_FRAME_ARGS_DECL);
 
 /* Optional functions */
-static void	PnozzFreeScreen(int scrnIndex, int flags);
-static ModeStatus PnozzValidMode(int scrnIndex, DisplayModePtr mode,
+static void	PnozzFreeScreen(FREE_SCREEN_ARGS_DECL);
+static ModeStatus PnozzValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode,
 			       Bool verbose, int flags);
 
 void PnozzSync(ScrnInfoPtr);
@@ -88,7 +77,7 @@ static void PnozzLoadPalette(ScrnInfoPtr
 #define VERSION 4000
 #define PNOZZ_NAME "p9100"
 #define PNOZZ_DRIVER_NAME "pnozz"
-#define PNOZZ_MAJOR_VERSION 1
+#define PNOZZ_MAJOR_VERSION 2
 #define PNOZZ_MINOR_VERSION 0
 #define PNOZZ_PATCHLEVEL 0
 
@@ -113,13 +102,15 @@ DriverRec PNOZZ = {
 typedef enum {
     OPTION_SW_CURSOR,
     OPTION_HW_CURSOR,
-    OPTION_NOACCEL
+    OPTION_NOACCEL,
+    OPTION_ACCELMETHOD
 } PnozzOpts;
 
 static const OptionInfoRec PnozzOptions[] = {
     { OPTION_SW_CURSOR,		"SWcursor",	OPTV_BOOLEAN,	{0}, FALSE },
     { OPTION_HW_CURSOR,		"HWcursor",	OPTV_BOOLEAN,	{0}, FALSE },
     { OPTION_NOACCEL,		"NoAccel",	OPTV_BOOLEAN,	{0}, FALSE },
+    { OPTION_ACCELMETHOD,	"AccelMethod",	OPTV_STRING,	{0}, FALSE },
     { -1,			NULL,		OPTV_NONE,	{0}, FALSE }
 };
 
@@ -136,15 +127,6 @@ static const char *fbSymbols[] = {
     NULL
 };
 
-static const char *xaaSymbols[] =
-{
-    "XAACreateInfoRec",
-    "XAADestroyInfoRec",
-    "XAAInit",
-    NULL
-};
-#ifdef XFree86LOADER
-
 static MODULESETUPPROTO(PnozzSetup);
 
 static XF86ModuleVersionInfo PnozzVersRec =
@@ -172,7 +154,6 @@ PnozzSetup(pointer module, pointer opts,
 	setupDone = TRUE;
 	xf86AddDriver(&PNOZZ, module, 0);
 	
-	LoaderRefSymLists(xaaSymbols, ramdacSymbols, fbSymbols, NULL);
 	/*
 	 * Modules that this driver always requires can be loaded here
 	 * by calling LoadSubModule().
@@ -189,8 +170,6 @@ PnozzSetup(pointer module, pointer opts,
     }
 }
 
-#endif /* XFree86LOADER */
-
 static volatile unsigned int scratch32;
 
 void pnozz_write_4(PnozzPtr p, int offset, unsigned int value)
@@ -312,7 +291,7 @@ PnozzFreeRec(ScrnInfoPtr pScrn)
 
     pPnozz = GET_PNOZZ_FROM_SCRN(pScrn);
 
-    xfree(pScrn->driverPrivate);
+    free(pScrn->driverPrivate);
     pScrn->driverPrivate = NULL;
 
     return;
@@ -382,7 +361,7 @@ PnozzProbe(DriverPtr drv, int flags)
 		   devSections, numDevSections,
 		   drv, &usedChips);
 				 	
-    xfree(devSections);
+    free(devSections);
     if (numUsed <= 0)
 	return FALSE;
 
@@ -417,9 +396,9 @@ PnozzProbe(DriverPtr drv, int flags)
 		xf86AddEntityToScreen(pScrn, pEnt->index);
 		foundScreen = TRUE;
 	    }
-	    xfree(pEnt);
+	    free(pEnt);
     	}
-    xfree(usedChips);
+    free(usedChips);
     return foundScreen;
 }
 
@@ -529,7 +508,7 @@ PnozzPreInit(ScrnInfoPtr pScrn, int flag
     xf86CollectOptions(pScrn, NULL);
 
     /* Process the options */
-    if (!(pPnozz->Options = xalloc(sizeof(PnozzOptions))))
+    if (!(pPnozz->Options = malloc(sizeof(PnozzOptions))))
 	return FALSE;
 
     memcpy(pPnozz->Options, PnozzOptions, sizeof(PnozzOptions));
@@ -566,6 +545,14 @@ PnozzPreInit(ScrnInfoPtr pScrn, int flag
 	pPnozz->NoAccel = TRUE;
 	xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Acceleration disabled\n");
     }
+
+    pPnozz->useXAA = FALSE;
+
+    char *optstr;
+    optstr = (char *)xf86GetOptValString(pPnozz->Options, OPTION_ACCELMETHOD);
+    if (optstr == NULL) optstr = "exa";
+    if (xf86NameCmp(optstr, "xaa") == 0)
+	pPnozz->useXAA = TRUE;
         
     if (xf86LoadSubModule(pScrn, "fb") == NULL) {
 	PnozzFreeRec(pScrn);
@@ -576,13 +563,6 @@ PnozzPreInit(ScrnInfoPtr pScrn, int flag
 	PnozzFreeRec(pScrn);
 	return FALSE;
     }
-    xf86LoaderReqSymLists(ramdacSymbols, NULL);
-
-    if (xf86LoadSubModule(pScrn, "xaa") == NULL) {
-	PnozzFreeRec(pScrn);
-	return FALSE;
-    }
-    xf86LoaderReqSymLists(xaaSymbols, NULL);
 
     /*********************
     set up clock and mode stuff
@@ -612,9 +592,9 @@ PnozzPreInit(ScrnInfoPtr pScrn, int flag
 /* This gets called at the start of each server generation */
 
 static Bool
-PnozzScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+PnozzScreenInit(SCREEN_INIT_ARGS_DECL)
 {
-    ScrnInfoPtr pScrn;
+    ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
     PnozzPtr pPnozz;
     VisualPtr visual;
     int ret,len=0,i;
@@ -632,15 +612,26 @@ PnozzScreenInit(int scrnIndex, ScreenPtr
      * figure out how much video RAM we really have - 2MB is just by far the 
      * most common size
      */
+    pPnozz->vidmem = 0x200000;	/* map 2MB */
     pPnozz->fb =
-	xf86MapSbusMem (pPnozz->psdp, 0, 0x200000);	/* map 2MB */
+	xf86MapSbusMem (pPnozz->psdp, 0, pPnozz->vidmem);
     fb=(unsigned int *)pPnozz->fb;
     
     pPnozz->fbc =
-	xf86MapSbusMem (pPnozz->psdp, 0x200000,0x8000);	/* map registers */
+	xf86MapSbusMem (pPnozz->psdp, pPnozz->vidmem,0x8000);	/* map registers */
+
+    if (! pPnozz->fbc) {
+	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		"xf86MapSbusMem failed fbc:%p fb:%p\n",
+		pPnozz->fbc, pPnozz->fb);
+
+	if (pPnozz->fb) {
+            xf86UnmapSbusMem(pPnozz->psdp, pPnozz->fb, pPnozz->vidmem);
+            pPnozz->fb = NULL;
+	}
 
-    if (! pPnozz->fbc)
 	return FALSE;
+    }
 
     /*
      * The next step is to setup the screen's visuals, and initialise the
@@ -705,7 +696,7 @@ PnozzScreenInit(int scrnIndex, ScreenPtr
 		       pScrn->displayWidth, pScrn->bitsPerPixel);
 
     /* should be set by PnozzSetDepth() */
-    pPnozz->maxheight = (0x200000 / pPnozz->scanlinesize) & 0xffff;
+    pPnozz->maxheight = (pPnozz->vidmem / pPnozz->scanlinesize) & 0xffff;
 #if DEBUG
     xf86Msg(X_ERROR, "max scanlines: %d\n", pPnozz->maxheight);
 #endif
@@ -733,16 +724,38 @@ PnozzScreenInit(int scrnIndex, ScreenPtr
     xf86SetBlackWhitePixels(pScreen);
 
     if (!pPnozz->NoAccel) {
-    	BoxRec bx;
-	pPnozz->pXAA = XAACreateInfoRec();
-	PnozzAccelInit(pScrn);
-	bx.x1 = bx.y1 = 0;
-	bx.x2 = pPnozz->width;
-	bx.y2 = pPnozz->maxheight;
-	xf86InitFBManager(pScreen, &bx);
-	if(!XAAInit(pScreen, pPnozz->pXAA))
-	    return FALSE;
-	xf86Msg(X_INFO, "%s: Using acceleration\n", pPnozz->psdp->device);
+#ifdef HAVE_XAA_H
+	if (pPnozz->useXAA) {
+            BoxRec bx;
+            pPnozz->pXAA = XAACreateInfoRec();
+            PnozzAccelInit(pScrn);
+            bx.x1 = bx.y1 = 0;
+            bx.x2 = pPnozz->width;
+            bx.y2 = pPnozz->maxheight;
+            xf86InitFBManager(pScreen, &bx);
+            if(!XAAInit(pScreen, pPnozz->pXAA))
+                return FALSE;
+            xf86Msg(X_INFO, "%s: Using XAA acceleration\n", pPnozz->psdp->device);
+	} else
+#endif /* HAVE_XAA_H */
+	{
+            /* EXA */
+            XF86ModReqInfo req;
+            int errmaj, errmin;
+
+            memset(&req, 0, sizeof(XF86ModReqInfo));
+            req.majorversion = EXA_VERSION_MAJOR;
+            req.minorversion = EXA_VERSION_MINOR;
+            if (!LoadSubModule(pScrn->module, "exa", NULL, NULL, NULL, &req,
+		&errmaj, &errmin)) {
+		LoaderErrorMsg(NULL, "exa", errmaj, errmin);
+		return FALSE;
+            }
+            if (!PnozzEXAInit(pScreen))
+		return FALSE;
+
+            xf86Msg(X_INFO, "%s: Using EXA acceleration\n", pPnozz->psdp->device);
+	}
     }
 
     /* Initialise cursor functions */
@@ -792,7 +805,7 @@ PnozzScreenInit(int scrnIndex, ScreenPtr
 
 /* Usually mandatory */
 static Bool
-PnozzSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
+PnozzSwitchMode(SWITCH_MODE_ARGS_DECL)
 {
     xf86Msg(X_ERROR, "SwitchMode: %d %d %d %d\n", mode->CrtcHTotal, 
         mode->CrtcHSyncStart, mode->CrtcHSyncEnd, mode->CrtcHDisplay);
@@ -806,7 +819,7 @@ PnozzSwitchMode(int scrnIndex, DisplayMo
  */
 /* Usually mandatory */
 static void 
-PnozzAdjustFrame(int scrnIndex, int x, int y, int flags)
+PnozzAdjustFrame(ADJUST_FRAME_ARGS_DECL)
 {
     /* we don't support virtual desktops for now */
     return;
@@ -819,9 +832,9 @@ PnozzAdjustFrame(int scrnIndex, int x, i
 
 /* Mandatory */
 static Bool
-PnozzEnterVT(int scrnIndex, int flags)
+PnozzEnterVT(VT_FUNC_ARGS_DECL)
 {
-    ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+    SCRN_INFO_PTR(arg);
     PnozzPtr pPnozz = GET_PNOZZ_FROM_SCRN(pScrn);
 
     xf86SbusHideOsHwCursor (pPnozz->psdp);
@@ -835,7 +848,7 @@ PnozzEnterVT(int scrnIndex, int flags)
 
 /* Mandatory */
 static void
-PnozzLeaveVT(int scrnIndex, int flags)
+PnozzLeaveVT(VT_FUNC_ARGS_DECL)
 {
     return;
 }
@@ -848,9 +861,9 @@ PnozzLeaveVT(int scrnIndex, int flags)
 
 /* Mandatory */
 static Bool
-PnozzCloseScreen(int scrnIndex, ScreenPtr pScreen)
+PnozzCloseScreen(CLOSE_SCREEN_ARGS_DECL)
 {
-    ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+    ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
     PnozzPtr pPnozz = GET_PNOZZ_FROM_SCRN(pScrn);
     int state = 1;
 
@@ -861,15 +874,14 @@ PnozzCloseScreen(int scrnIndex, ScreenPt
 
     PnozzRestore(pPnozz);	/* restore colour depth */
     
-    xf86UnmapSbusMem(pPnozz->psdp, pPnozz->fb,0x200000);
+    xf86UnmapSbusMem(pPnozz->psdp, pPnozz->fb,pPnozz->vidmem);
     xf86UnmapSbusMem(pPnozz->psdp, pPnozz->fbc,0x8000);
 
     /* make sure video is turned on */
     ioctl(pPnozz->psdp->fd, FBIOSVIDEO, &state);
     
     pScreen->CloseScreen = pPnozz->CloseScreen;
-    return (*pScreen->CloseScreen)(scrnIndex, pScreen);
-    return FALSE;
+    return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
 }
 
 
@@ -877,9 +889,10 @@ PnozzCloseScreen(int scrnIndex, ScreenPt
 
 /* Optional */
 static void
-PnozzFreeScreen(int scrnIndex, int flags)
+PnozzFreeScreen(FREE_SCREEN_ARGS_DECL)
 {
-    PnozzFreeRec(xf86Screens[scrnIndex]);
+    SCRN_INFO_PTR(arg);
+    PnozzFreeRec(pScrn);
 }
 
 
@@ -887,7 +900,7 @@ PnozzFreeScreen(int scrnIndex, int flags
 
 /* Optional */
 static ModeStatus
-PnozzValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
+PnozzValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags)
 {
     if (mode->Flags & V_INTERLACE)
 	return(MODE_BAD);
@@ -1067,7 +1080,8 @@ PnozzSetDepth(PnozzPtr pPnozz, int depth
     int s0, s1, s2, s3, ps, crtcline;
     unsigned char pf, mc3, es;
 
-#if DEBUG
+#ifdef DEBUG
+    xf86Msg(X_ERROR, "SetDepth: %d\n", depth);
     DumpDAC(pPnozz);
     DumpCRTC(pPnozz);
 #endif

Added files:

Index: xsrc/external/mit/xf86-video-pnozz/dist/src/compat-api.h
diff -u /dev/null xsrc/external/mit/xf86-video-pnozz/dist/src/compat-api.h:1.1
--- /dev/null	Thu May 27 04:48:10 2021
+++ xsrc/external/mit/xf86-video-pnozz/dist/src/compat-api.h	Thu May 27 04:48:10 2021
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2012 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Author: Dave Airlie <airl...@redhat.com>
+ */
+
+/* this file provides API compat between server post 1.13 and pre it,
+   it should be reused inside as many drivers as possible */
+#ifndef COMPAT_API_H
+#define COMPAT_API_H
+
+#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR
+#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum]
+#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p
+#endif
+
+#ifndef XF86_HAS_SCRN_CONV
+#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum]
+#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex]
+#endif
+
+#ifndef XF86_SCRN_INTERFACE
+
+#define SCRN_ARG_TYPE int
+#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)]
+
+#define SCREEN_ARG_TYPE int
+#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)]
+
+#define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv
+
+#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask
+#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask
+
+#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen
+#define CLOSE_SCREEN_ARGS scrnIndex, pScreen
+
+#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags
+#define ADJUST_FRAME_ARGS(arg, x, y) (arg)->scrnIndex, x, y, 0
+
+#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags
+#define SWITCH_MODE_ARGS(arg, m) (arg)->scrnIndex, m, 0
+
+#define FREE_SCREEN_ARGS_DECL int arg, int flags
+
+#define VT_FUNC_ARGS_DECL int arg, int flags
+#define VT_FUNC_ARGS pScrn->scrnIndex, 0
+
+#define XF86_SCRN_ARG(x) ((x)->scrnIndex)
+#else
+#define SCRN_ARG_TYPE ScrnInfoPtr
+#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1)
+
+#define SCREEN_ARG_TYPE ScreenPtr
+#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1)
+
+#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
+
+#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
+#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
+
+#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
+#define CLOSE_SCREEN_ARGS pScreen
+
+#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y
+#define ADJUST_FRAME_ARGS(arg, x, y) arg, x, y
+
+#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode
+#define SWITCH_MODE_ARGS(arg, m) arg, m
+
+#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg
+
+#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg
+#define VT_FUNC_ARGS pScrn
+
+#define XF86_SCRN_ARG(x) (x)
+
+#endif
+
+#endif
Index: xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_exa.c
diff -u /dev/null xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_exa.c:1.1
--- /dev/null	Thu May 27 04:48:10 2021
+++ xsrc/external/mit/xf86-video-pnozz/dist/src/pnozz_exa.c	Thu May 27 04:48:10 2021
@@ -0,0 +1,250 @@
+/*
+ * SBus Weitek P9100 EXA support
+ *
+/*-
+ * Copyright (c) 2021 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Julian Coleman.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pnozz.h"
+#include "pnozz_regs.h"
+
+
+static CARD32 PnozzCopyROP[] = {
+	/*GXclear*/		0,
+	/*GXand*/		ROP_SRC & ROP_DST,
+	/*GXandReverse*/	ROP_SRC & (~ROP_DST),
+	/*GXcopy*/		ROP_SRC,
+	/*GXandInverted*/	(~ROP_SRC) & ROP_DST,
+	/*GXnoop*/		ROP_DST,
+	/*GXxor*/		ROP_SRC ^ ROP_DST,
+	/*GXor*/		ROP_SRC | ROP_DST,
+	/*GXnor*/		(~ROP_SRC) & (~ROP_DST),
+	/*GXequiv*/		(~ROP_SRC) ^ ROP_DST,
+	/*GXinvert*/		(~ROP_DST),
+	/*GXorReverse*/		ROP_SRC | (~ROP_DST),
+	/*GXcopyInverted*/	(~ROP_SRC),
+	/*GXorInverted*/	(~ROP_SRC) | ROP_DST,
+	/*GXnand*/		(~ROP_SRC) | (~ROP_DST),
+	/*GXset*/		ROP_SET
+};
+
+static CARD32 PnozzDrawROP[] = {
+	/*GXclear*/		0,
+	/*GXand*/		ROP_PAT & ROP_DST,
+	/*GXandReverse*/	ROP_PAT & (~ROP_DST),
+	/*GXcopy*/		ROP_PAT,
+	/*GXandInverted*/	(~ROP_PAT) & ROP_DST,
+	/*GXnoop*/		ROP_DST,
+	/*GXxor*/		ROP_PAT ^ ROP_DST,
+	/*GXor*/		ROP_PAT | ROP_DST,
+	/*GXnor*/		(~ROP_PAT) & (~ROP_DST),
+	/*GXequiv*/		(~ROP_PAT) ^ ROP_DST,
+	/*GXinvert*/		(~ROP_DST),
+	/*GXorReverse*/		ROP_PAT | (~ROP_DST),
+	/*GXcopyInverted*/	(~ROP_PAT),
+	/*GXorInverted*/	(~ROP_PAT) | ROP_DST,
+	/*GXnand*/		(~ROP_PAT) | (~ROP_DST),
+	/*GXset*/		ROP_PAT
+};
+
+#define waitReady(pPnozz) while((pnozz_read_4(pPnozz, ENGINE_STATUS) & \
+				(ENGINE_BUSY | BLITTER_BUSY)) !=0 )
+
+void PnozzInitEngine(PnozzPtr);
+void pnozz_write_colour(PnozzPtr pPnozz, int reg, CARD32 colour);
+
+CARD32 MaxClip, junk;
+
+static void
+PnozzWaitMarker(ScreenPtr pScreen, int Marker)
+{
+    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+    PnozzPtr p = GET_PNOZZ_FROM_SCRN(pScrn);
+
+    waitReady(p);
+}
+
+static Bool
+PnozzPrepareCopy
+(
+    PixmapPtr pSrcPixmap,
+    PixmapPtr pDstPixmap,
+    int       xdir,
+    int       ydir,
+    int       alu,
+    Pixel     planemask
+)
+{
+    ScrnInfoPtr pScrn = xf86Screens[pDstPixmap->drawable.pScreen->myNum];
+    PnozzPtr pPnozz = GET_PNOZZ_FROM_SCRN(pScrn);
+    
+    waitReady(pPnozz);
+    pnozz_write_4(pPnozz, RASTER_OP, (PnozzCopyROP[alu] & 0xff));
+    pnozz_write_4(pPnozz, PLANE_MASK, planemask);
+    pPnozz->srcoff = exaGetPixmapOffset(pSrcPixmap) / pPnozz->width;
+
+    return TRUE;
+}
+
+static void
+PnozzCopy
+(
+    PixmapPtr pDstPixmap,
+    int       xSrc,
+    int       ySrc,
+    int       xDst,
+    int       yDst,
+    int       w,
+    int       h
+)
+{
+    ScrnInfoPtr pScrn = xf86Screens[pDstPixmap->drawable.pScreen->myNum];
+    PnozzPtr pPnozz = GET_PNOZZ_FROM_SCRN(pScrn);
+    CARD32 src, dst, srcw, dstw;
+    int doff = exaGetPixmapOffset(pDstPixmap) / pPnozz->width;
+    
+    src = (((xSrc << pPnozz->depthshift) & 0x1fff) << 16) |
+	((ySrc + pPnozz->srcoff) & 0x1fff);
+    dst = (((xDst << pPnozz->depthshift) & 0x1fff) << 16) |
+	((yDst + doff) & 0x1fff);
+    srcw = ((((xSrc + w) << pPnozz->depthshift) - 1) << 16) | 
+        ((ySrc + pPnozz->srcoff + h - 1) & 0x1fff);
+    dstw = ((((xDst + w) << pPnozz->depthshift) - 1) << 16) |
+        ((yDst + doff + h - 1) & 0x1fff);
+
+    waitReady(pPnozz);
+
+    pnozz_write_4(pPnozz, ABS_XY0, src);
+    pnozz_write_4(pPnozz, ABS_XY1, srcw);
+    pnozz_write_4(pPnozz, ABS_XY2, dst);
+    pnozz_write_4(pPnozz, ABS_XY3, dstw);
+    junk = pnozz_read_4(pPnozz, COMMAND_BLIT);
+    exaMarkSync(pDstPixmap->drawable.pScreen);
+}
+
+static void
+PnozzDoneCopy(PixmapPtr pDstPixmap)
+{
+    ScrnInfoPtr pScrn = xf86Screens[pDstPixmap->drawable.pScreen->myNum];
+    PnozzPtr pPnozz = GET_PNOZZ_FROM_SCRN(pScrn);
+
+    waitReady(pPnozz);
+}
+
+static Bool
+PnozzPrepareSolid(
+    PixmapPtr pPixmap,
+    int alu,
+    Pixel planemask,
+    Pixel fg)
+{
+    ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum];
+    PnozzPtr pPnozz = GET_PNOZZ_FROM_SCRN(pScrn);
+    
+    waitReady(pPnozz);
+    pnozz_write_colour(pPnozz, FOREGROUND_COLOR, fg);
+    pnozz_write_4(pPnozz, RASTER_OP, PnozzDrawROP[alu] & 0xff);
+    pnozz_write_4(pPnozz, PLANE_MASK, planemask);
+    pnozz_write_4(pPnozz, COORD_INDEX, 0);
+
+    return TRUE;
+}
+
+static void
+PnozzSolid(
+    PixmapPtr pPixmap,
+    int x,
+    int y,
+    int x2,
+    int y2)
+{
+    ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum];
+    PnozzPtr pPnozz = GET_PNOZZ_FROM_SCRN(pScrn);
+    int w = x2 - x - 1;
+    int h = y2 - y - 1;
+
+    waitReady(pPnozz);
+    pnozz_write_4(pPnozz, RECT_RTW_XY, ((x & 0x1fff) << 16) | 
+        (y & 0x1fff));
+    pnozz_write_4(pPnozz, RECT_RTP_XY, (((w & 0x1fff) << 16) | 
+        (h & 0x1fff)));
+    junk = pnozz_read_4(pPnozz, COMMAND_QUAD);
+    exaMarkSync(pPixmap->drawable.pScreen);
+}
+
+int
+PnozzEXAInit(ScreenPtr pScreen)
+{
+    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+    PnozzPtr pPnozz = GET_PNOZZ_FROM_SCRN(pScrn);
+    ExaDriverPtr pExa;
+    
+    PnozzInitEngine(pPnozz);
+
+    pExa = exaDriverAlloc();
+    if (!pExa)
+	return FALSE;
+
+    pPnozz->pExa = pExa;
+
+    pExa->exa_major = EXA_VERSION_MAJOR;
+    pExa->exa_minor = EXA_VERSION_MINOR;
+
+    pExa->memoryBase = pPnozz->fb;
+
+    /* round to multiple of pixmap pitch */
+    pExa->memorySize = (pPnozz->vidmem / pPnozz->width) * pPnozz->width;
+    pExa->offScreenBase = pPnozz->width * pPnozz->height;
+
+    /*
+     * our blitter can't deal with variable pitches
+     */
+    pExa->pixmapOffsetAlign = pPnozz->width;
+    pExa->pixmapPitchAlign = pPnozz->width;
+
+    pExa->flags = EXA_MIXED_PIXMAPS;
+
+    pExa->maxX = 4096;
+    pExa->maxY = 4096;
+
+    pExa->WaitMarker = PnozzWaitMarker;
+
+    pExa->PrepareSolid = PnozzPrepareSolid;
+    pExa->Solid = PnozzSolid;
+    pExa->DoneSolid = PnozzDoneCopy;
+
+    pExa->PrepareCopy = PnozzPrepareCopy;
+    pExa->Copy = PnozzCopy;
+    pExa->DoneCopy = PnozzDoneCopy;
+
+    return exaDriverInit(pScreen, pExa);;
+}

Reply via email to