diff options
author | Keith Packard <keithp@keithp.com> | 2003-10-15 01:00:38 +0000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2003-10-15 01:00:38 +0000 |
commit | b3e47ce18ff9c86833fc6302b1e074912edce404 (patch) | |
tree | bb2df3d7bec665dfeade2b15014606ac0b45ea3c /hw/kdrive | |
parent | 28bcd2efd134bfea3daa0738c9155b36cdf84168 (diff) |
various Split out pixmap allocation debug statements Fix bogus offscreen
pixmap size test Add migration to composite function for source
operands
VbeDPMS Remove extraneous call to VbeGetVib.
Diffstat (limited to 'hw/kdrive')
-rw-r--r-- | hw/kdrive/src/kaa.c | 17 | ||||
-rw-r--r-- | hw/kdrive/vesa/vbe.c | 9 | ||||
-rw-r--r-- | hw/kdrive/vesa/vbe.h | 2 | ||||
-rw-r--r-- | hw/kdrive/vesa/vesa.c | 2 | ||||
-rw-r--r-- | hw/kdrive/vesa/vm86.c | 2 |
5 files changed, 15 insertions, 17 deletions
diff --git a/hw/kdrive/src/kaa.c b/hw/kdrive/src/kaa.c index 0159e5e49..e85cfe65d 100644 --- a/hw/kdrive/src/kaa.c +++ b/hw/kdrive/src/kaa.c @@ -32,11 +32,17 @@ #include "dixfontstr.h" #define DEBUG_MIGRATE 0 +#define DEBUG_PIXMAP 0 #if DEBUG_MIGRATE #define DBG_MIGRATE(a) ErrorF a #else #define DBG_MIGRATE(a) #endif +#if DEBUG_PIXMAP +#define DBG_PIXMAP(a) ErrorF a +#else +#define DBG_PIXMAP(a) +#endif int kaaGeneration; int kaaScreenPrivateIndex; @@ -144,7 +150,7 @@ kaaPixmapAllocArea (PixmapPtr pPixmap) if (!pKaaPixmap->area) return FALSE; - DBG_MIGRATE(("++ 0x%08x (0x%x) (%dx%d)\n", + DBG_PIXMAP(("++ 0x%08x (0x%x) (%dx%d)\n", pPixmap->drawable.id, KaaGetPixmapPriv(pPixmap)->area ? KaaGetPixmapPriv(pPixmap)->area->offset : -1, @@ -219,7 +225,6 @@ kaaPixmapUseScreen (PixmapPtr pPixmap) if (pKaaPixmap->score < KAA_PIXMAP_SCORE_MAX) { pKaaPixmap->score++; - DBG_MIGRATE (("UseScreen 0x%x (%d)\n", pPixmap->drawable.id, pKaaPixmap->score)); if (!pKaaPixmap->area && pKaaPixmap->score >= KAA_PIXMAP_SCORE_MOVE_IN) kaaMoveInPixmap (pPixmap); @@ -234,7 +239,6 @@ kaaPixmapUseMemory (PixmapPtr pPixmap) if (pKaaPixmap->score > KAA_PIXMAP_SCORE_MIN) { pKaaPixmap->score--; - DBG_MIGRATE (("UseMemory 0x%x (%d)\n", pPixmap->drawable.id, pKaaPixmap->score)); if (pKaaPixmap->area && pKaaPixmap->score <= KAA_PIXMAP_SCORE_MOVE_OUT) kaaMoveOutPixmap (pPixmap); @@ -252,7 +256,7 @@ kaaDestroyPixmap (PixmapPtr pPixmap) KaaPixmapPriv (pPixmap); if (pKaaPixmap->area) { - DBG_MIGRATE(("-- 0x%08x (0x%x) (%dx%d)\n", + DBG_PIXMAP(("-- 0x%08x (0x%x) (%dx%d)\n", pPixmap->drawable.id, KaaGetPixmapPriv(pPixmap)->area->offset, pPixmap->drawable.width, @@ -287,8 +291,7 @@ kaaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth) pKaaPixmap->score = 0; pKaaPixmap->area = NULL; -/* if ((pPixmap->devKind * h >= MIN_OFFPIX_SIZE) */ - if (w * h > 100 * 100) + if ((pPixmap->devKind * h) >= MIN_OFFPIX_SIZE) kaaPixmapAllocArea (pPixmap); return pPixmap; } @@ -912,11 +915,11 @@ kaaComposite(CARD8 op, CARD16 width, CARD16 height) { -#if 0 if (pSrc->pDrawable->type == DRAWABLE_PIXMAP) kaaPixmapUseMemory ((PixmapPtr) pSrc->pDrawable); if (pMask && pMask->pDrawable->type == DRAWABLE_PIXMAP) kaaPixmapUseMemory ((PixmapPtr) pMask->pDrawable); +#if 0 if (pDst->pDrawable->type == DRAWABLE_PIXMAP) kaaPixmapUseMemory ((PixmapPtr) pDst->pDrawable); #endif diff --git a/hw/kdrive/vesa/vbe.c b/hw/kdrive/vesa/vbe.c index bcd400333..4bcedf08d 100644 --- a/hw/kdrive/vesa/vbe.c +++ b/hw/kdrive/vesa/vbe.c @@ -604,14 +604,9 @@ static const int VbeDPMSModes[4] = { }; Bool -VbeDPMS(Vm86InfoPtr vi, VbeInfoPtr vbe, int mode) +VbeDPMS(Vm86InfoPtr vi, int mode) { int code; - VbeInfoBlock vib; - - code = VbeGetVib (vi, &vib); - if (code < 0) - return FALSE; /* * Check which modes are supported @@ -623,7 +618,7 @@ VbeDPMS(Vm86InfoPtr vi, VbeInfoPtr vbe, int mode) code = VbeDoInterrupt10 (vi); if (code < 0) { - ErrorF ("No DPMS Support\n"); + ErrorF ("No DPMS Support %d\n", code); return FALSE; } /* Skip this stage if it's not supported */ diff --git a/hw/kdrive/vesa/vbe.h b/hw/kdrive/vesa/vbe.h index 8ec82dca7..8aa3276d8 100644 --- a/hw/kdrive/vesa/vbe.h +++ b/hw/kdrive/vesa/vbe.h @@ -152,7 +152,7 @@ void * VbeSetWindow(Vm86InfoPtr vi, VbeInfoPtr vbe, int offset, int purpose, int *size_return); Bool -VbeDPMS(Vm86InfoPtr vi, VbeInfoPtr vbe, int mode); +VbeDPMS(Vm86InfoPtr vi, int mode); int VbeDoInterrupt10(Vm86InfoPtr vi); diff --git a/hw/kdrive/vesa/vesa.c b/hw/kdrive/vesa/vesa.c index 747575686..8786d2562 100644 --- a/hw/kdrive/vesa/vesa.c +++ b/hw/kdrive/vesa/vesa.c @@ -1553,7 +1553,7 @@ vesaDPMS (ScreenPtr pScreen, int mode) return TRUE; #endif if (pscr->mode.vbe) - return VbeDPMS (priv->vi, priv->vbeInfo, mode); + return VbeDPMS (priv->vi, mode); return FALSE; } diff --git a/hw/kdrive/vesa/vm86.c b/hw/kdrive/vesa/vm86.c index 3af5042e0..85200fdad 100644 --- a/hw/kdrive/vesa/vm86.c +++ b/hw/kdrive/vesa/vm86.c @@ -235,7 +235,7 @@ Vm86DoInterrupt(Vm86InfoPtr vi, int num) code = vm86_loop(vi); OsReleaseSignals (); if(code < 0) { - perror("vm86 failed"); + ErrorF("vm86 failed (errno %d)\n", errno); return -1; } else if(code != 0) { ErrorF("vm86 returned 0x%04X\n", code); |