summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/nvmap/nvmap_priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/tegra/nvmap/nvmap_priv.h')
-rw-r--r--drivers/video/tegra/nvmap/nvmap_priv.h26
1 files changed, 3 insertions, 23 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap_priv.h b/drivers/video/tegra/nvmap/nvmap_priv.h
index 49ee2e7ad7d4..3044d0e042a8 100644
--- a/drivers/video/tegra/nvmap/nvmap_priv.h
+++ b/drivers/video/tegra/nvmap/nvmap_priv.h
@@ -179,11 +179,9 @@ struct nvmap_handle_ref {
struct nvmap_page_pool {
struct mutex lock;
- u32 alloc; /* Alloc index. */
- u32 fill; /* Fill index. */
- u32 count; /* Number of pages in the table. */
- u32 length; /* Length of the pages array. */
- struct page **page_array;
+ u32 count; /* Number of pages in the page list. */
+ u32 max; /* Max length of the page list. */
+ struct list_head page_list;
#ifdef CONFIG_NVMAP_PAGE_POOL_DEBUG
u64 allocs;
@@ -193,24 +191,6 @@ struct nvmap_page_pool {
#endif
};
-#define pp_empty(pp) \
- ((pp)->fill == (pp)->alloc && !(pp)->page_array[(pp)->alloc])
-#define pp_full(pp) \
- ((pp)->fill == (pp)->alloc && (pp)->page_array[(pp)->alloc])
-
-#define nvmap_pp_alloc_inc(pp) nvmap_pp_inc_index((pp), &(pp)->alloc)
-#define nvmap_pp_fill_inc(pp) nvmap_pp_inc_index((pp), &(pp)->fill)
-
-/* Handle wrap around. */
-static inline void nvmap_pp_inc_index(struct nvmap_page_pool *pp, u32 *ind)
-{
- *ind += 1;
-
- /* Wrap condition. */
- if (*ind >= pp->length)
- *ind = 0;
-}
-
static inline void nvmap_page_pool_lock(struct nvmap_page_pool *pool)
{
mutex_lock(&pool->lock);