iris: vma_free bo->size, not bo_size
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 3 Oct 2018 02:55:29 +0000 (19:55 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:09 +0000 (10:26 -0800)
this is more obviously correct.  I think the two end up being the same
in practice, since this is in the alloc_from_cache case, and presumably
bo from the bucket has bo->size == bucket->size, and bo_size also is
bucket->size...

still.  better to do the obvious thing.

brw_bufmgr already does it this way.

src/gallium/drivers/iris/iris_bufmgr.c

index 30f9746a30833eaeac3d56103a3deb6210a93fbc..6ac5e88fa5557c2b01efd3d22c96db5549271bd3 100644 (file)
@@ -570,7 +570,7 @@ retry:
        * memory and assign it a new address.
        */
       if (memzone != memzone_for_address(bo->gtt_offset)) {
-         vma_free(bufmgr, bo->gtt_offset, bo_size);
+         vma_free(bufmgr, bo->gtt_offset, bo->size);
          bo->gtt_offset = 0ull;
       }
    } else {