diff options
author | Ben Skeggs <skeggsb@nisroch.keine.ath.cx> | 2008-11-03 21:12:50 +1100 |
---|---|---|
committer | Ben Skeggs <skeggsb@nisroch.keine.ath.cx> | 2008-11-03 21:12:50 +1100 |
commit | c68b62b618a41a73af0ff9ae34481e71aeb80735 (patch) | |
tree | 668898b5447a1f418bcc8a9dee44bd5bb9bb98a1 | |
parent | 4cf7f54714b734079770082f271bac71469bd12d (diff) | |
download | xorg-driver-xf86-video-nouveau-c68b62b618a41a73af0ff9ae34481e71aeb80735.tar.gz |
exa: struct nouveau_pixmap doesn't need "mapped" field
-rw-r--r-- | src/nv_crtc.c | 1 | ||||
-rw-r--r-- | src/nv_exa.c | 14 | ||||
-rw-r--r-- | src/nv_type.h | 1 |
3 files changed, 5 insertions, 11 deletions
diff --git a/src/nv_crtc.c b/src/nv_crtc.c index bca091e..210e760 100644 --- a/src/nv_crtc.c +++ b/src/nv_crtc.c @@ -1186,7 +1186,6 @@ nv_crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No initial shadow private available for rotation.\n"); } else { nvpix->bo = nv_crtc->shadow; - nvpix->mapped = TRUE; } /* Modify the pixmap to actually be the one we need. */ 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 diff --git a/src/nv_type.h b/src/nv_type.h index 5666afd..b36987e 100644 --- a/src/nv_type.h +++ b/src/nv_type.h @@ -357,7 +357,6 @@ enum LVDS_script { struct nouveau_pixmap { struct nouveau_bo *bo; - int mapped; }; static inline struct nouveau_pixmap * |