summaryrefslogtreecommitdiff
path: root/src/nv_exa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nv_exa.c')
-rw-r--r--src/nv_exa.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/nv_exa.c b/src/nv_exa.c
index cf00fa8..4fafdb4 100644
--- a/src/nv_exa.c
+++ b/src/nv_exa.c
@@ -683,15 +683,12 @@ NVExaPrepareAccess(PixmapPtr pPix, int index)
if (!nvpix || !nvpix->bo)
return FALSE;
- /*XXX: ho hum.. sync if needed */
-
- if (nvpix->mapped)
- return TRUE;
+ if (!nvpix->bo->map) {
+ if (nouveau_bo_map(nvpix->bo, NOUVEAU_BO_RDWR))
+ return FALSE;
+ }
- if (nouveau_bo_map(nvpix->bo, NOUVEAU_BO_RDWR))
- return FALSE;
pPix->devPrivate.ptr = nvpix->bo->map;
- nvpix->mapped = TRUE;
return TRUE;
}
@@ -704,12 +701,11 @@ NVExaFinishAccess(PixmapPtr pPix, int index)
(void)pNv;
nvpix = exaGetPixmapDriverPrivate(pPix);
- if (!nvpix || !nvpix->bo || !nvpix->mapped)
+ if (!nvpix || !nvpix->bo)
return;
nouveau_bo_unmap(nvpix->bo);
pPix->devPrivate.ptr = NULL;
- nvpix->mapped = FALSE;
}
static Bool