Commit b3e47ce1 authored by Keith Packard's avatar Keith Packard

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.
parent 28bcd2ef
......@@ -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
......
......@@ -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 */
......
......@@ -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);
......
......@@ -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;
}
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment