diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-10-17 13:54:51 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-10-17 14:00:39 +0100 |
commit | ba6c82cd9d8089354b90632ca8edbb35cc09b9c4 (patch) | |
tree | 8675f8cf04dd69b06e4f8d97667d302709047615 | |
parent | 7927f9a351ead1a5593bc91e465706bdd889bb8d (diff) |
sna/dri: Defensively check for GTT mmap failure during fallback
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_dri.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index 15ac46a3..09ecd29b 100644 --- a/src/sna/sna_dri.c +++ b/src/sna/sna_dri.c @@ -525,6 +525,9 @@ sna_dri_copy_fallback(struct sna *sna, int bpp, void *dst = kgem_bo_map__gtt(&sna->kgem, dst_bo); void *src = kgem_bo_map__gtt(&sna->kgem, src_bo); + if (dst == NULL || src == NULL) + return; + DBG(("%s: src(%d, %d), dst(%d, %d) x %d\n", __FUNCTION__, sx, sy, dx, dy, n)); |