diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-13 13:15:51 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-13 13:15:51 +0000 |
commit | 2fabb5068d36ce97242844066b5121fcf6d9c24e (patch) | |
tree | 25e3e7af032f6cc761d6c89cce89fdf7509f5103 | |
parent | e037379c8e57f8e42956863c10a4e2b18057a6d5 (diff) |
sna: Debug fixup for non-LLC systems
The cpu bo is only allocated on LLC systems, so do avoid the NULL deref on
debugging for others.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index c7b4ebf1..be73f68c 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -213,10 +213,10 @@ static void sna_pixmap_alloc_cpu(struct sna *sna, static void sna_pixmap_free_cpu(struct sna *sna, struct sna_pixmap *priv) { - DBG(("%s: discarding CPU buffer, handle=%d, size=%d\n", - __FUNCTION__, priv->cpu_bo->handle, priv->cpu_bo->size)); - if (priv->cpu_bo) { + DBG(("%s: discarding CPU buffer, handle=%d, size=%d\n", + __FUNCTION__, priv->cpu_bo->handle, priv->cpu_bo->size)); + kgem_bo_unmap__cpu(&sna->kgem, priv->cpu_bo, priv->ptr); kgem_bo_destroy(&sna->kgem, priv->cpu_bo); |