xserver/hw/kdrive/epson epson13806.c, 1.1, 1.2 epson13806.h, 1.1, 1.2 epson13806draw.c, 1.1, 1.2
Eric Anholt <xserver-commit-u7BhqnqprCWvj1b/[email protected]> Thu, 9 Jun 2005 03:44:47 -0700 (PDT)
| Newsgroups | gmane.comp.freedesktop.xserver.cvs |
|---|---|
| Message-ID | <[email protected]> |
Committed by: anholt
Update of /cvs/xserver/xserver/hw/kdrive/epson
In directory gabe:/tmp/cvs-serv30863/hw/kdrive/epson
Modified Files:
epson13806.c epson13806.h epson13806draw.c
Log Message:
- Replace the syncAccel hook in the kdrive structure with a pair of
hooks in the kaa structure: markSync and waitMarker. The first, if
set, returns a hardware-dependent marker number which can then be
waited for with waitMarker. If markSync is absent (which is the case
on all drivers currently), waitMarker must wait for idle on any given
marker number. The intention is to allow for more parallelism when
we get downloading from framebuffer, or more fine-grained idling.
- Replace the KdMarkSync/KdCheckSync functions with kaaMarkSync and
kaaWaitSync. These will need to be refined when KAA starts being
smart about using them. Merge kpict.c into kasync.c since kasyn.c has
all the rest of these fallback funcs.
- Restructure all drivers to initialize a KaaInfo structure by hand
rather than statically in dubious order.
- Whack the i810 driver into shape in hopes that it'll work after this
change (it certainly wouldn't have before this). Doesn't support my
i845 though.
- Make a new KXV helper to avoid duplicated code to fill the region
with the necessary color key. Use it in i810 and mach64 (tested).
Index: epson13806.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/epson/epson13806.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- epson13806.c 20 Oct 2004 08:20:51 -0000 1.1
+++ epson13806.c 9 Jun 2005 10:44:44 -0000 1.2
@@ -597,7 +597,6 @@
epsonDrawInit, /* initAccel */
epsonDrawEnable, /* enableAccel */
- epsonDrawSync, /* syncAccel */
epsonDrawDisable, /* disableAccel */
epsonDrawFini, /* finiAccel */
Index: epson13806.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/epson/epson13806.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- epson13806.h 20 Oct 2004 08:20:51 -0000 1.1
+++ epson13806.h 9 Jun 2005 10:44:44 -0000 1.2
@@ -57,6 +57,7 @@
typedef struct _epsonScrPriv {
Rotation randr;
Bool shadow;
+ KaaScreenInfoRec kaa;
} EpsonScrPriv;
extern KdCardFuncs epsonFuncs;
@@ -115,9 +116,6 @@
epsonDrawEnable (ScreenPtr pScreen);
void
-epsonDrawSync (ScreenPtr pScreen);
-
-void
epsonDrawDisable (ScreenPtr pScreen);
void
Index: epson13806draw.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/epson/epson13806draw.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- epson13806draw.c 20 Oct 2004 08:20:51 -0000 1.1
+++ epson13806draw.c 9 Jun 2005 10:44:44 -0000 1.2
@@ -33,6 +33,8 @@
#include "epson13806draw.h"
#include "epson13806reg.h"
+#include "kaa.h"
+
#include "gcstruct.h"
#include "scrnintstr.h"
#include "pixmapstr.h"
@@ -182,7 +184,28 @@
{
while (EPSON13806_REG (EPSON13806_BLTCTRL0) & EPSON13806_BLTCTRL0_ACTIVE) {}
}
-
+
+
+/*
+ * epsonDrawSync
+ *
+ * Description: Sync hardware acceleration
+ *
+ * History:
+ * 11-Feb-04 C.Stylianou NBL: Created.
+ *
+ */
+
+static void
+epsonWaitMarker (ScreenPtr pScreen, int marker)
+{
+ EPSON_DEBUG (fprintf(stderr,"+epsonDrawSync\n"));
+
+ epsonWaitForHwBltDone ();
+
+ EPSON_DEBUG (fprintf(stderr,"-epsonDrawSync\n"));
+}
+
/*
* epsonPrepareSolid
@@ -428,20 +451,6 @@
EPSON_DEBUG_COPY (fprintf(stderr,"-epsonDoneCopy\n"));
}
-static KaaScreenInfoRec epsonKaa = {
- .PrepareSolid = epsonPrepareSolid,
- .Solid = epsonSolid,
- .DoneSolid = epsonDoneSolid,
-
- .PrepareCopy = epsonPrepareCopy,
- .Copy = epsonCopy,
- .DoneCopy = epsonDoneCopy,
-
- 0,
- 0,
- .flags = KAA_OFFSCREEN_PIXMAPS, /* Flags */
-};
-
/*
* epsonDrawInit
@@ -456,6 +465,10 @@
Bool
epsonDrawInit (ScreenPtr pScreen)
{
+ KdScreenPriv(pScreen);
+ KdScreenInfo *screen = pScreenPriv->screen;
+ EpsonScrPriv *epsons = screen->driver;
+
EPSON_DEBUG (fprintf(stderr,"+epsonDrawInit\n"));
epsonSet(pScreen);
@@ -535,7 +548,17 @@
EPSON13806_REG16(EPSON13806_GPIOCTRL) |= 0x00fc;
#endif
- if (!kaaDrawInit (pScreen, &epsonKaa))
+ memset(&epsons->kaa, 0, sizeof(KaaScreenInfoRec));
+ epsons->kaa.waitMarker = epsonWaitMarker;
+ epsons->kaa.PrepareSolid = epsonPrepareSolid;
+ epsons->kaa.Solid = epsonSolid;
+ epsons->kaa.DoneSolid = epsonDoneSolid;
+ epsons->kaa.PrepareCopy = epsonPrepareCopy;
+ epsons->kaa.Copy = epsonCopy;
+ epsons->kaa.DoneCopy = epsonDoneCopy;
+ epsons->kaa.flags = KAA_OFFSCREEN_PIXMAPS;
+
+ if (!kaaDrawInit (pScreen, &epsons->kaa))
return FALSE;
EPSON_DEBUG (fprintf(stderr,"-epsonDrawInit\n"));
@@ -558,29 +581,8 @@
{
EPSON_DEBUG (fprintf(stderr,"+epsonDrawEnable\n"));
epsonWaitForHwBltDone ();
- KdMarkSync (pScreen);
- EPSON_DEBUG (fprintf(stderr,"+epsonDrawEnable\n"));
-}
-
-
-/*
- * epsonDrawSync
- *
- * Description: Sync hardware acceleration
- *
- * History:
- * 11-Feb-04 C.Stylianou NBL: Created.
- *
- */
-
-void
-epsonDrawSync (ScreenPtr pScreen)
-{
- EPSON_DEBUG (fprintf(stderr,"+epsonDrawSync\n"));
-
- epsonWaitForHwBltDone ();
-
- EPSON_DEBUG (fprintf(stderr,"-epsonDrawSync\n"));
+ kaaMarkSync (pScreen);
+ EPSON_DEBUG (fprintf(stderr,"-epsonDrawEnable\n"));
}