diff options
author | Maarten Maathuis <madman2003@gmail.com> | 2009-12-12 22:27:30 +0100 |
---|---|---|
committer | Maarten Maathuis <madman2003@gmail.com> | 2009-12-12 22:35:23 +0100 |
commit | 740c9f3e79729e4e06c693e66826afbad9bd1ce5 (patch) | |
tree | 808d178f1d1ff8d840d9687032c0011ef2efa71b | |
parent | 0b5120cf8ef2528a15d88054afdc6fc33eb521f5 (diff) |
exa: map the pixmap bo after creation to ensure a useable driver pixmap
- Large pixmaps (think of 8000x8000 pixmaps on NV50) will cause crashes
otherwise because exa assumes driver pixmaps to be mappable. Handling this
elsewhere is problematic.
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
-rw-r--r-- | src/nouveau_exa.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c index 4769fd9..68d1030 100644 --- a/src/nouveau_exa.c +++ b/src/nouveau_exa.c @@ -421,6 +421,15 @@ nouveau_exa_create_pixmap(ScreenPtr pScreen, int width, int height, int depth, return NULL; } + /* We need to be sure we actually have space for this pixmap. */ + ret = nouveau_bo_map(nvpix->bo, NOUVEAU_BO_RDWR); + if (ret) { + nouveau_bo_ref(NULL, &nvpix->bo); + xfree(nvpix); + return NULL; + } + nouveau_bo_unmap(nvpix->bo); + return nvpix; } |