freedreno/drm: Don't return shared/control bo's to cache

They can never be allocated from the cache, as fd_bo_state() would
return FD_BO_STATE_UNKNOWN

Fixes: 7dabd62464 ("freedreno/drm: Userspace fences")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11176>
This commit is contained in:
Rob Clark 2021-09-15 15:16:48 -07:00 committed by Marge Bot
parent 429986d5aa
commit 21fcb2657f

View file

@ -185,6 +185,9 @@ retry:
int
fd_bo_cache_free(struct fd_bo_cache *cache, struct fd_bo *bo)
{
if (bo->nosync || bo->shared)
return -1;
struct fd_bo_bucket *bucket = get_bucket(cache, bo->size);
/* see if we can be green and recycle: */