gpu: ion: Switch to using a single shrink function
The single shrink function will free lower order pages first. This
enables compaction to work properly.
Change-Id: Iddc5b2afbaec1d122de303c42a549f8f5d16c6cf
Git-commit: 38de9828c544c985d1d4a7c2167efd94222f3bf1
Git-repo: https://android.googlesource.com/kernel/common
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
diff --git a/drivers/gpu/ion/ion_priv.h b/drivers/gpu/ion/ion_priv.h
index a30b273..a6144ba 100644
--- a/drivers/gpu/ion/ion_priv.h
+++ b/drivers/gpu/ion/ion_priv.h
@@ -235,6 +235,7 @@
* when the shrinker fires
* @gfp_mask: gfp_mask to use from alloc
* @order: order of pages in the pool
+ * @list: plist node for list of pools
*
* Allows you to keep a pool of pre allocated pages to use from your heap.
* Keeping a pool of pages that is ready for dma, ie any cached mapping have
@@ -246,12 +247,12 @@
int low_count;
struct list_head high_items;
struct list_head low_items;
- struct shrinker shrinker;
struct mutex mutex;
void *(*alloc)(struct ion_page_pool *pool);
void (*free)(struct ion_page_pool *pool, struct page *page);
gfp_t gfp_mask;
unsigned int order;
+ struct plist_node list;
};
struct ion_page_pool *ion_page_pool_create(gfp_t gfp_mask, unsigned int order);