Import A346BXXS6BXD1 kernel source

Android 14
This commit is contained in:
Fede2782 2024-04-28 15:56:54 +02:00
parent c9de368c35
commit 6c5be3206f
No known key found for this signature in database
GPG key ID: 1DD0FACD495CE046

View file

@ -3826,9 +3826,6 @@ static int kbase_jit_grow(struct kbase_context *kctx,
if (reg->gpu_alloc->nents >= info->commit_pages)
goto done;
/* Grow the backing */
old_size = reg->gpu_alloc->nents;
/* Allocate some more pages */
delta = info->commit_pages - reg->gpu_alloc->nents;
pages_required = delta;
@ -3875,6 +3872,18 @@ static int kbase_jit_grow(struct kbase_context *kctx,
kbase_mem_pool_lock(pool);
}
if (reg->gpu_alloc->nents > info->commit_pages) {
kbase_mem_pool_unlock(pool);
spin_unlock(&kctx->mem_partials_lock);
dev_warn(
kctx->kbdev->dev,
"JIT alloc grown beyond the required number of initially required pages, this grow no longer needed.");
goto done;
}
old_size = reg->gpu_alloc->nents;
delta = info->commit_pages - old_size;
gpu_pages = kbase_alloc_phy_pages_helper_locked(reg->gpu_alloc, pool,
delta, &prealloc_sas[0]);
if (!gpu_pages) {