summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/lima
diff options
context:
space:
mode:
authorVasily Khoruzhick <anarsoul@gmail.com>2019-10-24 22:14:05 -0700
committerVasily Khoruzhick <anarsoul@gmail.com>2019-11-01 13:12:07 -0700
commitdd52744201952af487e87753eee9fad09657578f (patch)
tree08c46434a41034916e2b630dcb5d5140495573d2 /src/gallium/drivers/lima
parentae0b05d8db852cfe4df716e9b6d46c77510214d1 (diff)
lima: ignore flags while looking for BO in cache
Any BO would work, we don't have any BO types yet anyway. Moreover lima_submit_add_bo() changes BO flags so they won't match allocation flags. Reviewed-by: Erico Nunes <nunes.erico@gmail.com> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Diffstat (limited to 'src/gallium/drivers/lima')
-rw-r--r--src/gallium/drivers/lima/lima_bo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/lima/lima_bo.c b/src/gallium/drivers/lima/lima_bo.c
index 779e23ce1c8..2ee80e190cf 100644
--- a/src/gallium/drivers/lima/lima_bo.c
+++ b/src/gallium/drivers/lima/lima_bo.c
@@ -256,8 +256,7 @@ lima_bo_cache_get(struct lima_screen *screen, uint32_t size, uint32_t flags)
}
list_for_each_entry_safe(struct lima_bo, entry, bucket, size_list) {
- if (entry->size >= size &&
- entry->flags == flags) {
+ if (entry->size >= size) {
/* Check if BO is idle. If it's not it's better to allocate new one */
if (!lima_bo_wait(entry, LIMA_GEM_WAIT_WRITE, 0)) {
if (lima_debug & LIMA_DEBUG_BO_CACHE) {
@@ -269,6 +268,7 @@ lima_bo_cache_get(struct lima_screen *screen, uint32_t size, uint32_t flags)
lima_bo_cache_remove(entry);
p_atomic_set(&entry->refcnt, 1);
+ entry->flags = flags;
bo = entry;
if (lima_debug & LIMA_DEBUG_BO_CACHE) {
fprintf(stderr, "%s: got BO: %p (size=%d), requested size %d\n",