aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/host1x
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-08-13 08:19:58 -0400
committerDave Airlie <airlied@redhat.com>2013-08-18 20:40:46 -0400
commit2bc7b0ca8cc3bdcf61a7d4a99ed55c4ad084a4ae (patch)
treef5ae58fcde9c00c791536f9772cf762f4804c67e /drivers/gpu/host1x
parentb21e3afe2357c0f49348a5fb61247012bf8262ec (diff)
drm/host1x: stop casting VMA offsets to 32bit
VMA offsets are 64bit so do not cast them to "unsigned int". Also remove the (now useless) offset-retrieval helper. The VMA manager provides simple enough helpers. Cc: Thierry Reding <thierry.reding@gmail.com> Cc: "Terje Bergström" <tbergstrom@nvidia.com> Cc: Arto Merilainen <amerilainen@nvidia.com> Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/host1x')
-rw-r--r--drivers/gpu/host1x/drm/drm.c2
-rw-r--r--drivers/gpu/host1x/drm/gem.c7
-rw-r--r--drivers/gpu/host1x/drm/gem.h1
3 files changed, 2 insertions, 8 deletions
diff --git a/drivers/gpu/host1x/drm/drm.c b/drivers/gpu/host1x/drm/drm.c
index 15684bf073fb..8c61ceeaa12d 100644
--- a/drivers/gpu/host1x/drm/drm.c
+++ b/drivers/gpu/host1x/drm/drm.c
@@ -356,7 +356,7 @@ static int tegra_gem_mmap(struct drm_device *drm, void *data,
356 356
357 bo = to_tegra_bo(gem); 357 bo = to_tegra_bo(gem);
358 358
359 args->offset = tegra_bo_get_mmap_offset(bo); 359 args->offset = drm_vma_node_offset_addr(&bo->gem.vma_node);
360 360
361 drm_gem_object_unreference(gem); 361 drm_gem_object_unreference(gem);
362 362
diff --git a/drivers/gpu/host1x/drm/gem.c b/drivers/gpu/host1x/drm/gem.c
index 3c35622c9f15..59623de4ee15 100644
--- a/drivers/gpu/host1x/drm/gem.c
+++ b/drivers/gpu/host1x/drm/gem.c
@@ -106,11 +106,6 @@ static void tegra_bo_destroy(struct drm_device *drm, struct tegra_bo *bo)
106 dma_free_writecombine(drm->dev, bo->gem.size, bo->vaddr, bo->paddr); 106 dma_free_writecombine(drm->dev, bo->gem.size, bo->vaddr, bo->paddr);
107} 107}
108 108
109unsigned int tegra_bo_get_mmap_offset(struct tegra_bo *bo)
110{
111 return (unsigned int)drm_vma_node_offset_addr(&bo->gem.vma_node);
112}
113
114struct tegra_bo *tegra_bo_create(struct drm_device *drm, unsigned int size) 109struct tegra_bo *tegra_bo_create(struct drm_device *drm, unsigned int size)
115{ 110{
116 struct tegra_bo *bo; 111 struct tegra_bo *bo;
@@ -227,7 +222,7 @@ int tegra_bo_dumb_map_offset(struct drm_file *file, struct drm_device *drm,
227 222
228 bo = to_tegra_bo(gem); 223 bo = to_tegra_bo(gem);
229 224
230 *offset = tegra_bo_get_mmap_offset(bo); 225 *offset = drm_vma_node_offset_addr(&bo->gem.vma_node);
231 226
232 drm_gem_object_unreference(gem); 227 drm_gem_object_unreference(gem);
233 228
diff --git a/drivers/gpu/host1x/drm/gem.h b/drivers/gpu/host1x/drm/gem.h
index 2e93b0379da8..492533a2dacb 100644
--- a/drivers/gpu/host1x/drm/gem.h
+++ b/drivers/gpu/host1x/drm/gem.h
@@ -44,7 +44,6 @@ struct tegra_bo *tegra_bo_create_with_handle(struct drm_file *file,
44 unsigned int size, 44 unsigned int size,
45 unsigned int *handle); 45 unsigned int *handle);
46void tegra_bo_free_object(struct drm_gem_object *gem); 46void tegra_bo_free_object(struct drm_gem_object *gem);
47unsigned int tegra_bo_get_mmap_offset(struct tegra_bo *bo);
48int tegra_bo_dumb_create(struct drm_file *file, struct drm_device *drm, 47int tegra_bo_dumb_create(struct drm_file *file, struct drm_device *drm,
49 struct drm_mode_create_dumb *args); 48 struct drm_mode_create_dumb *args);
50int tegra_bo_dumb_map_offset(struct drm_file *file, struct drm_device *drm, 49int tegra_bo_dumb_map_offset(struct drm_file *file, struct drm_device *drm,