OSDN Git Service

ilo: unmap cp bo before destroying it
authorChia-I Wu <olvaffe@gmail.com>
Tue, 4 Jun 2013 05:25:38 +0000 (13:25 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Fri, 7 Jun 2013 03:28:20 +0000 (11:28 +0800)
The BOs are mapped in their entire life times for the chipsets we support so
do not forget to unmap it.

src/gallium/drivers/ilo/ilo_cp.c

index 1fd4741..b29a014 100644 (file)
@@ -256,8 +256,13 @@ ilo_cp_flush(struct ilo_cp *cp)
 void
 ilo_cp_destroy(struct ilo_cp *cp)
 {
-   if (cp->bo)
+   if (cp->bo) {
+      if (!cp->sys)
+         cp->bo->unmap(cp->bo);
+
       cp->bo->unreference(cp->bo);
+   }
+
    if (cp->render_ctx)
       cp->winsys->destroy_context(cp->winsys, cp->render_ctx);