This patch adds a function to get a hardware identifier for the
given vm structure.
Bug
1243060
Change-Id: I3cf860f7f11d73ec3b6208df3c46ea0ec7a6d951
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/672450
struct nvhost_vm_buffer *buffer);
int (*pin_static_buffer)(struct nvhost_vm *vm,
struct nvhost_vm_static_buffer *sbuffer);
+ int (*get_id)(struct nvhost_vm *vm);
};
struct nvhost_pushbuffer_ops {
unsigned int num_buffers;
};
+int nvhost_vm_get_id(struct nvhost_vm *vm)
+{
+ if (!vm_op().get_id)
+ return -ENOSYS;
+
+ return vm_op().get_id(vm);
+}
+
int nvhost_vm_map_static(struct platform_device *pdev,
void *vaddr, dma_addr_t paddr,
size_t size)
struct list_head list;
};
+/**
+ * nvhost_vm_get_id - get hw identifier of this vm
+ * @vm: Pointer to nvhost_vm structure
+ *
+ * This function returns hardware identifier of the given vm.
+ */
+int nvhost_vm_get_id(struct nvhost_vm *vm);
+
/**
* nvhost_vm_map_static - map allocated area to iova
* @pdev: pointer to host1x or host1x client device