Skip to content

Commit

Permalink
INTERNAL: Iris: Fix to release BO immediately if not busy
Browse files Browse the repository at this point in the history
Currently the iris driver is adding the buffer objects to zombie list
without checking if it is busy or not. It checks for it after 1 second
which adds delay to buffer release.

This fix checks if the bo is busy or not before adding it to zombie list.

Without this fix, the applications expecting immediate buffer release would fail.

The fix is identified while debugging below cts tests:
android.graphics.cts.BitmapTest#testDrawingHardwareBitmapNotLeaking
android.graphics.cts.BitmapTest#testHardwareBitmapNotLeaking

Tracked-On: OAM-105862
Signed-off-by: Sai Teja Pottumuttu <[email protected]>
  • Loading branch information
saiteja13427 authored and yhe39 committed Mar 7, 2023
1 parent 029a359 commit 3d6c7fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gallium/drivers/iris/iris_bufmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,8 @@ bo_free(struct iris_bo *bo)
if (!bo->real.userptr && bo->real.map)
bo_unmap(bo);

iris_bo_busy(bo);

if (bo->idle) {
bo_close(bo);
} else {
Expand Down

0 comments on commit 3d6c7fb

Please sign in to comment.