minigbm: fix map time assertions
We should assert when the refcount is equal to zero as well. BUG=chromium:764871 TEST=gbmtest passes Change-Id: Iaf8b5bd4bf51472ad7c564341b42a7079b58bd6e Reviewed-on: https://chromium-review.googlesource.com/758143 Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
This commit is contained in:
parent
3e9d3830dc
commit
425173a0c8
1 changed files with 2 additions and 2 deletions
4
drv.c
4
drv.c
|
|
@ -458,7 +458,7 @@ int drv_bo_invalidate(struct bo *bo, struct map_info *data)
|
|||
{
|
||||
int ret = 0;
|
||||
assert(data);
|
||||
assert(data->refcount >= 0);
|
||||
assert(data->refcount > 0);
|
||||
|
||||
if (bo->drv->backend->bo_invalidate)
|
||||
ret = bo->drv->backend->bo_invalidate(bo, data);
|
||||
|
|
@ -470,7 +470,7 @@ int drv_bo_flush(struct bo *bo, struct map_info *data)
|
|||
{
|
||||
int ret = 0;
|
||||
assert(data);
|
||||
assert(data->refcount >= 0);
|
||||
assert(data->refcount > 0);
|
||||
assert(!(bo->use_flags & BO_USE_PROTECTED));
|
||||
|
||||
if (bo->drv->backend->bo_flush)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue