msm: kgsl: fix accounting of memory mapped to userspace

The mapsize of kgsl_memdesc and gpumem_mapped of process are
incremented only in vmfault handler. But for cache modes
write through and write back, pages are inserted in kgsl_mmap.
So account for those mappings also in gpumem_mapped.

Change-Id: I98e29b28fa6fd2915b03bdcb9c655015a926d0eb
Signed-off-by: Puranam V G Tejaswi <[email protected]>
This commit is contained in:
Puranam V G Tejaswi 2019-08-07 23:20:14 +05:30 • committed by Jordan Crouse
commit 30a223f051

View file

@ -4659,6 +4659,8 @@ static int kgsl_mmap(struct file *file, struct vm_area_struct *vma)
vm_insert_page(vma, addr, page);
addr += PAGE_SIZE;
}
m->mapsize = m->size;
entry->priv->gpumem_mapped += m->mapsize;
}
vma->vm_file = file;