drm/tegra: Drop version check

The version check in the Tegra DRM GEM code is not necessary because
this is a fix to the code and so remove the version check.

Bug 3820317

Change-Id: Ib7f5bd2bdb61af50e17399079aa2439bf8d352b1
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026925
(cherry picked from commit 91c367006c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3029984
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Jon Hunter
2023-12-02 16:55:11 +00:00
committed by mobile promotions
parent a6701b19b9
commit 6fe3abc899

View File

@@ -15,7 +15,6 @@
#include <linux/dma-buf.h> #include <linux/dma-buf.h>
#include <linux/iommu.h> #include <linux/iommu.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/version.h>
#include <drm/drm_drv.h> #include <drm/drm_drv.h>
#include <drm/drm_prime.h> #include <drm/drm_prime.h>
@@ -725,7 +724,6 @@ static int tegra_gem_prime_vmap(struct dma_buf *buf, struct iosys_map *map)
{ {
struct drm_gem_object *gem = buf->priv; struct drm_gem_object *gem = buf->priv;
struct tegra_bo *bo = to_tegra_bo(gem); struct tegra_bo *bo = to_tegra_bo(gem);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
void *vaddr; void *vaddr;
vaddr = tegra_bo_mmap(&bo->base); vaddr = tegra_bo_mmap(&bo->base);
@@ -733,21 +731,16 @@ static int tegra_gem_prime_vmap(struct dma_buf *buf, struct iosys_map *map)
return PTR_ERR(vaddr); return PTR_ERR(vaddr);
iosys_map_set_vaddr(map, vaddr); iosys_map_set_vaddr(map, vaddr);
#else
iosys_map_set_vaddr(map, bo->vaddr);
#endif
return 0; return 0;
} }
static void tegra_gem_prime_vunmap(struct dma_buf *buf, struct iosys_map *map) static void tegra_gem_prime_vunmap(struct dma_buf *buf, struct iosys_map *map)
{ {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
struct drm_gem_object *gem = buf->priv; struct drm_gem_object *gem = buf->priv;
struct tegra_bo *bo = to_tegra_bo(gem); struct tegra_bo *bo = to_tegra_bo(gem);
tegra_bo_munmap(&bo->base, map->vaddr); tegra_bo_munmap(&bo->base, map->vaddr);
#endif
} }
#else #else
static int tegra_gem_prime_vmap(struct dma_buf *buf, struct dma_buf_map *map) static int tegra_gem_prime_vmap(struct dma_buf *buf, struct dma_buf_map *map)