drm/tegra: Update to Linux v6.0-rc5

Update the Tegra-DRM driver to align with the latest upstream driver
from Linux v6.0-rc5.

Bug 3767126

Change-Id: Iaadc3b6a616b327fea5dab9acfba9c1d174557d3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2776688
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2022-09-14 10:46:47 +01:00
committed by Laxman Dewangan
parent 429e344bea
commit 437bb539be
9 changed files with 29 additions and 13 deletions

View File

@@ -716,14 +716,29 @@ static int tegra_gem_prime_vmap(struct dma_buf *buf, struct iosys_map *map)
{
struct drm_gem_object *gem = buf->priv;
struct tegra_bo *bo = to_tegra_bo(gem);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0)
void *vaddr;
vaddr = tegra_bo_mmap(&bo->base);
if (IS_ERR(vaddr))
return PTR_ERR(vaddr);
iosys_map_set_vaddr(map, vaddr);
#else
iosys_map_set_vaddr(map, bo->vaddr);
#endif
return 0;
}
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 tegra_bo *bo = to_tegra_bo(gem);
tegra_bo_munmap(&bo->base, map->vaddr);
#endif
}
#else
static int tegra_gem_prime_vmap(struct dma_buf *buf, struct dma_buf_map *map)