diff options
author | Thierry Reding <treding@nvidia.com> | 2018-02-07 20:45:55 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2018-03-08 16:38:30 +0300 |
commit | 04c0746663bd3ae3cce5e02d5b32c8ade2a833b8 (patch) | |
tree | 178b216a4bd526ff3080d1a8083ed6857ffeb760 /drivers/gpu/drm/tegra/gem.c | |
parent | b6d7974d10b30bf3baed7e50d8e574f5184cfdd1 (diff) | |
download | linux-04c0746663bd3ae3cce5e02d5b32c8ade2a833b8.tar.xz |
drm/tegra: gem: Make __tegra_gem_mmap() available more widely
This function allows mapping a GEM object into a virtual memory address
space, which makes it useful outside of the GEM code.
While at it, rename the function so it doesn't clash with the function
that implements the DRM_TEGRA_GEM_MMAP IOCTL.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/gem.c')
-rw-r--r-- | drivers/gpu/drm/tegra/gem.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c index 49b9bf28f872..d3b3aa148225 100644 --- a/drivers/gpu/drm/tegra/gem.c +++ b/drivers/gpu/drm/tegra/gem.c @@ -459,8 +459,7 @@ const struct vm_operations_struct tegra_bo_vm_ops = { .close = drm_gem_vm_close, }; -static int tegra_gem_mmap(struct drm_gem_object *gem, - struct vm_area_struct *vma) +int __tegra_gem_mmap(struct drm_gem_object *gem, struct vm_area_struct *vma) { struct tegra_bo *bo = to_tegra_bo(gem); @@ -507,7 +506,7 @@ int tegra_drm_mmap(struct file *file, struct vm_area_struct *vma) gem = vma->vm_private_data; - return tegra_gem_mmap(gem, vma); + return __tegra_gem_mmap(gem, vma); } static struct sg_table * @@ -600,7 +599,7 @@ static int tegra_gem_prime_mmap(struct dma_buf *buf, struct vm_area_struct *vma) if (err < 0) return err; - return tegra_gem_mmap(gem, vma); + return __tegra_gem_mmap(gem, vma); } static void *tegra_gem_prime_vmap(struct dma_buf *buf) |