From f08f477a93e783361d2942133da18504c2851469 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 12 Apr 2018 15:20:17 -0700 Subject: [PATCH] broadcom/vc5: Assert that created BOs have offset != 0. 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/vc5/vc5_bufmgr.c b/src/gallium/drivers/vc5/vc5_bufmgr.c index 1b91fbbdae7..ef6995e4def 100644 --- a/src/gallium/drivers/vc5/vc5_bufmgr.c +++ b/src/gallium/drivers/vc5/vc5_bufmgr.c @@ -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); -- 2.30.2