xserver: Branch 'master' - 3 commits
Dave Airlie
airlied at kemper.freedesktop.org
Tue Oct 2 19:01:55 PDT 2007
exa/exa.c | 12 ++++++------
exa/exa.h | 7 +++++++
exa/exa_accel.c | 8 +++++---
exa/exa_migration.c | 3 +++
4 files changed, 21 insertions(+), 9 deletions(-)
New commits:
diff-tree 1365aeff5499a051375e43a9fcbf54733ac93929 (from 566dd3b7d789ba60d0adf33b3f729cfb02ff33cd)
Author: Dave Airlie <airlied at redhat.com>
Date: Wed Oct 3 12:00:16 2007 +1000
exa: direct access to the pixmap sys ptr is bad if the pixmap isn't mapped
diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index abe5c20..e10bf5c 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -1138,17 +1138,19 @@ exaFillRegionSolid (DrawablePtr pDrawabl
pDrawable->bitsPerPixel != 24) {
ExaPixmapPriv(pPixmap);
+ exaPrepareAccess(pDrawable, EXA_PREPARE_DEST);
switch (pDrawable->bitsPerPixel) {
case 32:
- *(CARD32*)pExaPixmap->sys_ptr = pixel;
+ *(CARD32*)pPixmap->devPrivate.ptr = pixel;
break;
case 16:
- *(CARD16*)pExaPixmap->sys_ptr = pixel;
+ *(CARD16*)pPixmap->devPrivate.ptr = pixel;
break;
case 8:
- *(CARD8*)pExaPixmap->sys_ptr = pixel;
+ *(CARD8*)pPixmap->devPrivate.ptr = pixel;
}
+ exaFinishAccess(pDrawable, EXA_PREPARE_DEST);
REGION_UNION(pScreen, &pExaPixmap->validSys, &pExaPixmap->validSys,
pRegion);
}
diff-tree 566dd3b7d789ba60d0adf33b3f729cfb02ff33cd (from 1df1fee82d3565f6d8cfb91ce25a81c23a10a4b5)
Author: Dave Airlie <airlied at redhat.com>
Date: Wed Oct 3 11:59:52 2007 +1000
exa: add new flags to denote driver handles all pixmap migration/hiding
diff --git a/exa/exa.c b/exa/exa.c
index 8a4b8c1..7ad226f 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -410,7 +410,7 @@ exaPixmapIsOffscreen(PixmapPtr p)
save_ptr = p->devPrivate.ptr;
- if (!save_ptr && pExaPixmap)
+ if (!save_ptr && pExaPixmap && !(pExaScr->info->flags & EXA_HANDLES_PIXMAPS))
p->devPrivate.ptr = ExaGetPixmapAddress(p);
if (pExaScr->info->PixmapIsOffscreen)
@@ -460,7 +460,7 @@ ExaDoPrepareAccess(DrawablePtr pDrawable
Bool offscreen = exaPixmapIsOffscreen(pPixmap);
/* Unhide pixmap pointer */
- if (pPixmap->devPrivate.ptr == NULL) {
+ if (pPixmap->devPrivate.ptr == NULL && !(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) {
pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap);
}
@@ -521,8 +521,7 @@ exaFinishAccess(DrawablePtr pDrawable, i
ExaPixmapPriv (pPixmap);
/* Rehide pixmap pointer if we're doing that. */
- if (pExaPixmap)
- {
+ if (pExaPixmap && !(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) {
pPixmap->devPrivate.ptr = NULL;
}
diff --git a/exa/exa.h b/exa/exa.h
index f852df4..1ff0518 100644
--- a/exa/exa.h
+++ b/exa/exa.h
@@ -733,6 +733,13 @@ typedef struct _ExaDriver {
* (right-to-left, bottom-to-top).
*/
#define EXA_TWO_BITBLT_DIRECTIONS (1 << 2)
+
+/**
+ * EXA_HANDLES_PIXMAPS indicates to EXA that the driver can handle
+ * all pixmap addressing and migration.
+ */
+#define EXA_HANDLES_PIXMAPS (1 << 3)
+
/** @} */
ExaDriverPtr
diff --git a/exa/exa_migration.c b/exa/exa_migration.c
index c0e022c..7968521 100644
--- a/exa/exa_migration.c
+++ b/exa/exa_migration.c
@@ -553,6 +553,9 @@ exaDoMigration (ExaMigrationPtr pixmaps,
ExaScreenPriv(pScreen);
int i, j;
+ if (pExaScr->info->flags & EXA_HANDLES_PIXMAPS)
+ return;
+
/* If this debugging flag is set, check each pixmap for whether it is marked
* as clean, and if so, actually check if that's the case. This should help
* catch issues with failing to mark a drawable as dirty. While it will
diff-tree 1df1fee82d3565f6d8cfb91ce25a81c23a10a4b5 (from c8ccf469dcb2d7609b23faa8b4999c436263051e)
Author: Dave Airlie <airlied at redhat.com>
Date: Wed Oct 3 11:56:04 2007 +1000
exa: make sure we set fb_ptr to NULL
diff --git a/exa/exa.c b/exa/exa.c
index 3e8054d..8a4b8c1 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -286,8 +286,9 @@ exaCreatePixmap(ScreenPtr pScreen, int w
(*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0,
paddedWidth, NULL);
- pExaPixmap->driverPriv = driver_priv;
- pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
+ pExaPixmap->driverPriv = driver_priv;
+ pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
+ pExaPixmap->fb_ptr = NULL;
} else {
pExaPixmap->driverPriv = NULL;
/* Glyphs have w/h equal to zero, and may not be migrated. See exaGlyphs. */
More information about the xorg-commit
mailing list