aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/gem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/tegra/gem.c')
-rw-r--r--drivers/gpu/drm/tegra/gem.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c
index ef853e558036..bcf9895cef9f 100644
--- a/drivers/gpu/drm/tegra/gem.c
+++ b/drivers/gpu/drm/tegra/gem.c
@@ -8,14 +8,9 @@
8 * 8 *
9 * Copyright (c) 2011 Samsung Electronics Co., Ltd. 9 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
10 * 10 *
11 * This program is free software; you can redistribute it and/or 11 * This program is free software; you can redistribute it and/or modify
12 * modify it under the terms of the GNU General Public License 12 * it under the terms of the GNU General Public License version 2 as
13 * as published by the Free Software Foundation; either version 2 13 * published by the Free Software Foundation.
14 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 */ 14 */
20 15
21#include <linux/dma-buf.h> 16#include <linux/dma-buf.h>
@@ -394,6 +389,18 @@ static int tegra_gem_prime_mmap(struct dma_buf *buf, struct vm_area_struct *vma)
394 return -EINVAL; 389 return -EINVAL;
395} 390}
396 391
392static void *tegra_gem_prime_vmap(struct dma_buf *buf)
393{
394 struct drm_gem_object *gem = buf->priv;
395 struct tegra_bo *bo = to_tegra_bo(gem);
396
397 return bo->vaddr;
398}
399
400static void tegra_gem_prime_vunmap(struct dma_buf *buf, void *vaddr)
401{
402}
403
397static const struct dma_buf_ops tegra_gem_prime_dmabuf_ops = { 404static const struct dma_buf_ops tegra_gem_prime_dmabuf_ops = {
398 .map_dma_buf = tegra_gem_prime_map_dma_buf, 405 .map_dma_buf = tegra_gem_prime_map_dma_buf,
399 .unmap_dma_buf = tegra_gem_prime_unmap_dma_buf, 406 .unmap_dma_buf = tegra_gem_prime_unmap_dma_buf,
@@ -403,6 +410,8 @@ static const struct dma_buf_ops tegra_gem_prime_dmabuf_ops = {
403 .kmap = tegra_gem_prime_kmap, 410 .kmap = tegra_gem_prime_kmap,
404 .kunmap = tegra_gem_prime_kunmap, 411 .kunmap = tegra_gem_prime_kunmap,
405 .mmap = tegra_gem_prime_mmap, 412 .mmap = tegra_gem_prime_mmap,
413 .vmap = tegra_gem_prime_vmap,
414 .vunmap = tegra_gem_prime_vunmap,
406}; 415};
407 416
408struct dma_buf *tegra_gem_prime_export(struct drm_device *drm, 417struct dma_buf *tegra_gem_prime_export(struct drm_device *drm,