diff options
author | Alex Waterman <alexw@nvidia.com> | 2013-09-05 14:33:11 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-16 17:42:27 -0700 |
commit | 0ccee2d95685227c6ef4cc5b35ab904e5f767f3f (patch) | |
tree | f3cae35faf8b8d085f9f8e230ee61ed8ccb224c3 /drivers/video/tegra/nvmap/nvmap_ioctl.c | |
parent | 7fd8c9d2dfd79a8e8f8655f8339f3dfd82640ceb (diff) |
video: tegra: nvmap: Replace nvmap's pin code
Replace nvmap's pin/unpin code with calls to the DMA API. All the
currently supported operations are still supported and have
identical functionality.
Bug 1356091
Change-Id: Ibd04c27e4c46702ca90ab7ff7387420f3127fdb5
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/266236
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/video/tegra/nvmap/nvmap_ioctl.c')
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap_ioctl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap_ioctl.c b/drivers/video/tegra/nvmap/nvmap_ioctl.c index feac33eb48eb..62b93cdb397e 100644 --- a/drivers/video/tegra/nvmap/nvmap_ioctl.c +++ b/drivers/video/tegra/nvmap/nvmap_ioctl.c @@ -20,6 +20,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#define pr_fmt(fmt) "nvmap: %s() " fmt, __func__ + #include <linux/dma-mapping.h> #include <linux/export.h> #include <linux/fs.h> @@ -194,11 +196,11 @@ int nvmap_ioctl_pinop(struct file *filp, bool is_pin, void __user *arg) unsigned long addr; h = (struct nvmap_handle *)refs[i]; - if (h->heap_pgalloc && h->pgalloc.contig) addr = page_to_phys(h->pgalloc.pages[0]); else if (h->heap_pgalloc) - addr = h->pgalloc.area->iovm_start; + addr = sg_dma_address( + ((struct sg_table *)h->attachment->priv)->sgl); else addr = h->carveout->base; |