]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: host: Add nvhost_vm_get_id()
authorArto Merilainen <amerilainen@nvidia.com>
Wed, 14 Jan 2015 13:55:08 +0000 (15:55 +0200)
committerArto Merilainen <amerilainen@nvidia.com>
Thu, 12 Feb 2015 07:14:22 +0000 (23:14 -0800)
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

drivers/video/tegra/host/chip_support.h
drivers/video/tegra/host/nvhost_vm.c
drivers/video/tegra/host/nvhost_vm.h

index 36645050885b68f9d84194e4de88d4834ac373bc..abd3b6a77c34166eda306ec6b41adccc54c73ef0 100644 (file)
@@ -71,6 +71,7 @@ struct nvhost_vm_ops {
                             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 {
index 7cffd71a8a7468ed7ebe3191c36176cb7f259970..6d5a178b19b4987e9b159b3e04ab139e710d375d 100644 (file)
@@ -31,6 +31,14 @@ struct nvhost_vm_pin {
        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)
index ee8e83bfabb2e904497cdb28b64d5ca0400391de..83a0ae85c2fcb3777a19b386636c273053e42927 100644 (file)
@@ -80,6 +80,14 @@ struct nvhost_vm_static_buffer {
        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