summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2012-02-21 10:21:18 +0200
committerSimone Willett <swillett@nvidia.com>2012-03-15 20:08:56 -0700
commitae5255b1fdd60fda4c31aab929de5c9b395ed064 (patch)
tree147fc8acd0375d4f3400b24f7438dd34c4dc68bb /include
parent2be9ecb9df0fd3861cb33278a28c71447a0eee0b (diff)
video: tegra: host: Refactor context handling logic
Currently nvhost hard codes usage of context handler and sync point id. Split the context handler and context structures into generic and host1x specific parts, and move the allocation to happen via a function pointer in nvhost_device. Also updates gr3d and mpe to use sync point id and waitbase from nvhost_device. Bug 926690 Change-Id: I7f00b450cac99f3816baa27b37ee4e4cf68cfe24 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/84901 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nvhost.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/nvhost.h b/include/linux/nvhost.h
index 80f257ac6684..bc1d9d76b9a3 100644
--- a/include/linux/nvhost.h
+++ b/include/linux/nvhost.h
@@ -81,6 +81,9 @@ struct nvhost_device {
struct nvhost_channel *channel; /* Channel assigned for the module */
+ /* Allocates a context handler for the device */
+ struct nvhost_hwctx_handler *(*alloc_hwctx_handler)(u32 syncpt,
+ u32 waitbase, struct nvhost_channel *ch);
/* Preparing for power off. Used for context save. */
int (*prepare_poweroff)(struct nvhost_device *dev);
/* Finalize power on. Can be used for context restore. */