MALI: bifrost: kernel_map_user_io_pages(): log error if vmap() returns NULL.

Change-Id: Ie1d3682cc32fc191815210f19198b1b4922d830d
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
This commit is contained in:
Zhen Chen
2022-05-19 16:10:46 +08:00
committed by Tao Huang
parent 9eccd1f8a3
commit 8fd4cab89d

View File

@@ -261,10 +261,15 @@ static int kernel_map_user_io_pages(struct kbase_context *kctx,
queue->user_io_addr = vmap(page_list, ARRAY_SIZE(page_list), VM_MAP, cpu_map_prot);
if (!queue->user_io_addr)
if (!queue->user_io_addr) {
dev_err(kctx->kbdev->dev,
"%s(): queue->user_io_addr is NULL, queue: %p",
__func__,
queue);
ret = -ENOMEM;
else
} else {
atomic_add(ARRAY_SIZE(page_list), &kctx->permanent_mapped_pages);
}
unlock:
kbase_gpu_vm_unlock(kctx);