diff options
Diffstat (limited to 'drivers/video/tegra/nvmap/nvmap.h')
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap.h | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap.h b/drivers/video/tegra/nvmap/nvmap.h index 5ba5793d3257..fd4bcd7a7081 100644 --- a/drivers/video/tegra/nvmap/nvmap.h +++ b/drivers/video/tegra/nvmap/nvmap.h @@ -92,15 +92,22 @@ struct nvmap_share { #endif }; +struct nvmap_carveout_commit { + size_t commit; + struct list_head list; +}; + struct nvmap_client { - struct nvmap_device *dev; - struct nvmap_share *share; - struct rb_root handle_refs; - atomic_t iovm_commit; - size_t iovm_limit; - spinlock_t ref_lock; - bool super; - atomic_t count; + struct nvmap_device *dev; + struct nvmap_share *share; + struct rb_root handle_refs; + atomic_t iovm_commit; + size_t iovm_limit; + spinlock_t ref_lock; + bool super; + atomic_t count; + struct task_struct *task; + struct nvmap_carveout_commit carveout_commit[0]; }; /* handle_ref objects are client-local references to an nvmap_handle; @@ -146,6 +153,14 @@ struct nvmap_heap_block *nvmap_carveout_alloc(struct nvmap_client *dev, unsigned long nvmap_carveout_usage(struct nvmap_client *c, struct nvmap_heap_block *b); +struct nvmap_carveout_node; +void nvmap_carveout_commit_add(struct nvmap_client *client, + struct nvmap_carveout_node *node, size_t len); + +void nvmap_carveout_commit_subtract(struct nvmap_client *client, + struct nvmap_carveout_node *node, + size_t len); + struct nvmap_handle *nvmap_validate_get(struct nvmap_client *client, unsigned long handle); |