[PATCH 1/2] exa: Only call driver finish access hook when needed.
Maarten Maathuis
madman2003 at gmail.com
Thu Dec 9 12:17:58 PST 2010
- exa classic and mixed don't always access the "driver" pixmap.
Signed-off-by: Maarten Maathuis <madman2003 at gmail.com>
---
exa/exa.c | 3 ++-
exa/exa_driver.c | 2 ++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/exa/exa.c b/exa/exa.c
index 8adf847..4790bfa 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -421,7 +421,8 @@ exaFinishAccess(DrawablePtr pDrawable, int index)
/* We always hide the devPrivate.ptr. */
pPixmap->devPrivate.ptr = NULL;
- if (!pExaScr->info->FinishAccess || !exaPixmapHasGpuCopy(pPixmap))
+ if (!pExaScr->info->FinishAccess || !exaPixmapHasGpuCopy(pPixmap) ||
+ !pExaPixmap->use_gpu_copy)
return;
if (i >= EXA_PREPARE_AUX_DEST &&
diff --git a/exa/exa_driver.c b/exa/exa_driver.c
index a913cfb..b9903d1 100644
--- a/exa/exa_driver.c
+++ b/exa/exa_driver.c
@@ -115,6 +115,8 @@ exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth,
exaSetAccelBlock(pExaScr, pExaPixmap,
w, h, bpp);
+ pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
+
/* During a fallback we must prepare access. */
if (pExaScr->fallback_counter)
exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_AUX_DEST);
--
1.7.3.2
More information about the xorg-devel
mailing list