summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Frederick <tfred@google.com>2022-11-29 19:31:34 +0000
committerTodd Frederick <tfred@google.com>2022-11-29 19:33:02 +0000
commitb6a9c4cf18bc2b7ab55f37df1b998c5833d4dbf3 (patch)
treea6e703d09d3f0136b28f3fc936efbef3cc4bda61
parentcb8f5eab1fc57a03b3ab8ba2d9de289df458db29 (diff)
downloadexynos-android-exynos-r11-4.19-android11-wear-jr2.tar.gz
Bug: 258018678 Change-Id: I5556230c17ba29d6125a61bd387809df2c450fa7 Signed-off-by: Todd Frederick <tfred@google.com>
-rw-r--r--drivers/gpu/arm/t72x/r29p0/mali_kbase_mem_linux.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/arm/t72x/r29p0/mali_kbase_mem_linux.c b/drivers/gpu/arm/t72x/r29p0/mali_kbase_mem_linux.c
index a193324f8afd..0349361a10b0 100644
--- a/drivers/gpu/arm/t72x/r29p0/mali_kbase_mem_linux.c
+++ b/drivers/gpu/arm/t72x/r29p0/mali_kbase_mem_linux.c
@@ -807,6 +807,15 @@ int kbase_mem_flags_change(struct kbase_context *kctx, u64 gpu_addr, unsigned in
if (kbase_is_region_invalid_or_free(reg))
goto out_unlock;
+ /* There is no use case to support MEM_FLAGS_CHANGE ioctl for allocations
+ * that have NO_USER_FREE flag set, to mark them as evictable/reclaimable.
+ * This would usually include JIT allocations, Tiler heap related allocations
+ * & GPU queue ringbuffer and none of them needs to be explicitly marked
+ * as evictable by Userspace.
+ */
+ if (reg->flags & KBASE_REG_NO_USER_FREE)
+ goto out_unlock;
+
/* Is the region being transitioning between not needed and needed? */
prev_needed = (KBASE_REG_DONT_NEED & reg->flags) == KBASE_REG_DONT_NEED;
new_needed = (BASE_MEM_DONT_NEED & flags) == BASE_MEM_DONT_NEED;