diff options
Diffstat (limited to 'drivers/video/tegra/host/dmabuf.c')
-rw-r--r-- | drivers/video/tegra/host/dmabuf.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/drivers/video/tegra/host/dmabuf.c b/drivers/video/tegra/host/dmabuf.c index 52d56638d413..62e5331c30b3 100644 --- a/drivers/video/tegra/host/dmabuf.c +++ b/drivers/video/tegra/host/dmabuf.c @@ -109,52 +109,3 @@ int nvhost_dmabuf_get_param(struct mem_mgr *memmgr, struct mem_handle *handle, /* TBD: find a way to associate size, kind, etc */ return -EINVAL; } - -int nvhost_dmabuf_pin_array_ids(struct platform_device *dev, - ulong *ids, - u32 id_type_mask, - u32 id_type, - u32 count, - struct nvhost_job_unpin *unpin_data, - dma_addr_t *phys_addr) { - int i; - int pin_count = 0; - int err; - - for (i = 0; i < count; i++) { - struct mem_handle *handle; - struct sg_table *sgt; - - if ((ids[i] & id_type_mask) != id_type) - continue; - - handle = nvhost_dmabuf_get(ids[i], dev); - - if (IS_ERR(handle)) { - err = PTR_ERR(handle); - goto fail; - } - - sgt = nvhost_dmabuf_pin(handle); - if (IS_ERR(sgt)) { - nvhost_dmabuf_put(handle); - err = PTR_ERR(sgt); - goto fail; - } - - phys_addr[i] = sg_dma_address(sgt->sgl); - - unpin_data[pin_count].h = handle; - unpin_data[pin_count].mem = sgt; - pin_count++; - } - return pin_count; -fail: - while (pin_count) { - pin_count--; - nvhost_dmabuf_unpin(unpin_data[pin_count].h, - unpin_data[pin_count].mem); - nvhost_dmabuf_put(unpin_data[pin_count].h); - } - return err; -} |