broadcom/vc5: Assert that created BOs have offset != 0.
authorEric Anholt <eric@anholt.net>
Thu, 12 Apr 2018 22:20:17 +0000 (15:20 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 24 Apr 2018 17:37:29 +0000 (10:37 -0700)
The kernel shouldn't return a bo at NULL, and the HW special-cases NULL
address values for things like OQs.

src/gallium/drivers/vc5/vc5_bufmgr.c

index 1b91fbbdae7547501294c574dbcac298e80d9551..ef6995e4defae1d1e82332d74ba6e91feb945d98 100644 (file)
@@ -366,6 +366,7 @@ vc5_bo_open_handle(struct vc5_screen *screen,
                 return NULL;
         }
         bo->offset = get.offset;
+        assert(bo->offset != 0);
 
         util_hash_table_set(screen->bo_handles, (void *)(uintptr_t)handle, bo);