Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d2b26fb authored by Puranam V G Tejaswi's avatar Puranam V G Tejaswi Committed by Jordan Crouse
Browse files

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: default avatarPuranam V G Tejaswi <pvgtejas@codeaurora.org>
parent 30a223f0
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -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,9 +506,6 @@ 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;

	spin_unlock(&entry->priv->mem_lock);