From: Eric Anholt Date: Thu, 12 Apr 2018 22:20:17 +0000 (-0700) Subject: broadcom/vc5: Assert that created BOs have offset != 0. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f08f477a93e783361d2942133da18504c2851469;p=mesa.git 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. --- 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);