msm: kgsl: remove redundant check for usermem type

The check for usermem type, while updating the stat
for memory mapped to userspace is not required.
Memory with usermem type KGSL_MEM_ENTRY_ION is not
mapped to user by kgsl and the mapsize would always be
zero. So remove the unnecessary check for usermem type.

Change-Id: Iaa0b86d1c7160657de1d802f2cc10c3bdbdf84b3
Signed-off-by: Puranam V G Tejaswi <[email protected]>
This commit is contained in:
Puranam V G Tejaswi 2019-08-12 16:08:22 +05:30 • committed by Jordan Crouse
commit 4d2b26fbcf

View file

@ -494,8 +494,6 @@ static int kgsl_mem_entry_attach_process(struct kgsl_device *device,
/* Detach a memory entry from a process and unmap it from the MMU */
static void kgsl_mem_entry_detach_process(struct kgsl_mem_entry *entry)
{
unsigned int type;
if (entry == NULL)
return;
@ -508,10 +506,7 @@ static void kgsl_mem_entry_detach_process(struct kgsl_mem_entry *entry)
idr_remove(&entry->priv->mem_idr, entry->id);
entry->id = 0;
type = kgsl_memdesc_usermem_type(&entry->memdesc);
if (type != KGSL_MEM_ENTRY_ION)
entry->priv->gpumem_mapped -= entry->memdesc.mapsize;
entry->priv->gpumem_mapped -= entry->memdesc.mapsize;
spin_unlock(&entry->priv->mem_lock);