Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

David Herrmann and committed by
Dave Airlie
2bc7b0ca b21e3afe

+2 -8
+1 -1
drivers/gpu/host1x/drm/drm.c
··· 356 356 357 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 361 drm_gem_object_unreference(gem); 362 362
+1 -6
drivers/gpu/host1x/drm/gem.c
··· 106 106 dma_free_writecombine(drm->dev, bo->gem.size, bo->vaddr, bo->paddr); 107 107 } 108 108 109 - unsigned 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 - 114 109 struct tegra_bo *tegra_bo_create(struct drm_device *drm, unsigned int size) 115 110 { 116 111 struct tegra_bo *bo; ··· 222 227 223 228 bo = to_tegra_bo(gem); 224 229 225 - *offset = tegra_bo_get_mmap_offset(bo); 230 + *offset = drm_vma_node_offset_addr(&bo->gem.vma_node); 226 231 227 232 drm_gem_object_unreference(gem); 228 233
-1
drivers/gpu/host1x/drm/gem.h
··· 44 44 unsigned int size, 45 45 unsigned int *handle); 46 46 void tegra_bo_free_object(struct drm_gem_object *gem); 47 - unsigned int tegra_bo_get_mmap_offset(struct tegra_bo *bo); 48 47 int tegra_bo_dumb_create(struct drm_file *file, struct drm_device *drm, 49 48 struct drm_mode_create_dumb *args); 50 49 int tegra_bo_dumb_map_offset(struct drm_file *file, struct drm_device *drm,