Merge "msm: kgsl: Detach page table first for every close"
This commit is contained in:
commit
5e49832995
|
@ -994,6 +994,8 @@ static void kgsl_process_private_close(struct kgsl_device_private *dev_priv,
|
|||
|
||||
process_release_sync_sources(private);
|
||||
|
||||
kgsl_mmu_detach_pagetable(private->pagetable);
|
||||
|
||||
/* Remove the process struct from the master list */
|
||||
list_del(&private->list);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2002,2007-2014, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2002,2007-2015, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -263,13 +263,7 @@ static void kgsl_destroy_pagetable(struct kref *kref)
|
|||
struct kgsl_pagetable *pagetable = container_of(kref,
|
||||
struct kgsl_pagetable, refcount);
|
||||
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&kgsl_driver.ptlock, flags);
|
||||
list_del(&pagetable->list);
|
||||
spin_unlock_irqrestore(&kgsl_driver.ptlock, flags);
|
||||
|
||||
pagetable_remove_sysfs_objects(pagetable);
|
||||
kgsl_mmu_detach_pagetable(pagetable);
|
||||
|
||||
kgsl_unmap_global_pt_entries(pagetable);
|
||||
|
||||
|
@ -410,6 +404,7 @@ pagetable_remove_sysfs_objects(struct kgsl_pagetable *pagetable)
|
|||
&pagetable_attr_group);
|
||||
|
||||
kobject_put(pagetable->kobj);
|
||||
pagetable->kobj = NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -437,6 +432,21 @@ err:
|
|||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
kgsl_mmu_detach_pagetable(struct kgsl_pagetable *pagetable)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&kgsl_driver.ptlock, flags);
|
||||
if (pagetable->list.next) {
|
||||
list_del(&pagetable->list);
|
||||
pagetable->list.next = NULL;
|
||||
}
|
||||
spin_unlock_irqrestore(&kgsl_driver.ptlock, flags);
|
||||
|
||||
pagetable_remove_sysfs_objects(pagetable);
|
||||
}
|
||||
|
||||
int
|
||||
kgsl_mmu_get_ptname_from_ptbase(struct kgsl_mmu *mmu, phys_addr_t pt_base)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2002,2007-2014, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2002,2007-2015, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -191,6 +191,7 @@ void kgsl_remove_global_pt_entry(struct kgsl_memdesc *memdesc);
|
|||
struct kgsl_memdesc *kgsl_search_global_pt_entries(unsigned int gpuaddr,
|
||||
unsigned int size);
|
||||
|
||||
void kgsl_mmu_detach_pagetable(struct kgsl_pagetable *pagetable);
|
||||
/*
|
||||
* Static inline functions of MMU that simply call the SMMU specific
|
||||
* function using a function pointer. These functions can be thought
|
||||
|
|
Loading…
Reference in New Issue