mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
etnaviv: drm: assert mutual exclusivity between cache and zombie list
The BO list member is used to track the BO both on the cache bucket list as well as the zombie list. The BO being on both lists at the same time is an invalid state. Add some asserts to validate this assumption. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32233>
This commit is contained in:
parent
6dd1640ff6
commit
916bd73f1d
2 changed files with 2 additions and 0 deletions
|
|
@ -118,6 +118,7 @@ void etna_bo_free(struct etna_bo *bo) {
|
|||
if (dev->use_softpin) {
|
||||
etna_bo_cleanup_zombies(dev);
|
||||
VG_BO_RELEASE(bo);
|
||||
assert(!list_is_linked(&bo->list));
|
||||
list_addtail(&bo->list, &dev->zombie_list);
|
||||
} else {
|
||||
_etna_bo_free(bo);
|
||||
|
|
|
|||
|
|
@ -185,6 +185,7 @@ int etna_bo_cache_free(struct etna_bo_cache *cache, struct etna_bo *bo)
|
|||
|
||||
bo->free_time = time.tv_sec;
|
||||
VG_BO_RELEASE(bo);
|
||||
assert(!list_is_linked(&bo->list));
|
||||
list_addtail(&bo->list, &bucket->list);
|
||||
etna_bo_cache_cleanup(cache, time.tv_sec);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue