diff options
author | Thierry Reding <treding@nvidia.com> | 2014-01-29 20:32:33 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2014-04-04 09:12:49 +0200 |
commit | d40326f4b9f9617cdfd30f83a2db57d47e9c5bac (patch) | |
tree | 9d8a1cafb67aa0b6aedbb29be680b560695c86ea /drivers/gpu/drm/tegra | |
parent | 88759686c702f1fbbb8e737e6231b64a9880db73 (diff) | |
download | talos-op-linux-d40326f4b9f9617cdfd30f83a2db57d47e9c5bac.tar.gz talos-op-linux-d40326f4b9f9617cdfd30f83a2db57d47e9c5bac.zip |
drm/tegra: prime: Add vmap support
This is trivial to support since all GEM objects are mapped into kernel
space anyway.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra')
-rw-r--r-- | drivers/gpu/drm/tegra/gem.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c index ef853e558036..29913eb9b25d 100644 --- a/drivers/gpu/drm/tegra/gem.c +++ b/drivers/gpu/drm/tegra/gem.c @@ -394,6 +394,18 @@ static int tegra_gem_prime_mmap(struct dma_buf *buf, struct vm_area_struct *vma) return -EINVAL; } +static void *tegra_gem_prime_vmap(struct dma_buf *buf) +{ + struct drm_gem_object *gem = buf->priv; + struct tegra_bo *bo = to_tegra_bo(gem); + + return bo->vaddr; +} + +static void tegra_gem_prime_vunmap(struct dma_buf *buf, void *vaddr) +{ +} + static const struct dma_buf_ops tegra_gem_prime_dmabuf_ops = { .map_dma_buf = tegra_gem_prime_map_dma_buf, .unmap_dma_buf = tegra_gem_prime_unmap_dma_buf, @@ -403,6 +415,8 @@ static const struct dma_buf_ops tegra_gem_prime_dmabuf_ops = { .kmap = tegra_gem_prime_kmap, .kunmap = tegra_gem_prime_kunmap, .mmap = tegra_gem_prime_mmap, + .vmap = tegra_gem_prime_vmap, + .vunmap = tegra_gem_prime_vunmap, }; struct dma_buf *tegra_gem_prime_export(struct drm_device *drm, |