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

@@ -7,6 +7,7 @@
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/iommu.h> #include <linux/iommu.h>
#include <linux/interconnect.h> #include <linux/interconnect.h>
#include <linux/module.h> #include <linux/module.h>
@@ -21,8 +22,10 @@
#include <drm/drm_atomic.h> #include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_helper.h>
#include <drm/drm_blend.h>
#include <drm/drm_debugfs.h> #include <drm/drm_debugfs.h>
#include <drm/drm_fourcc.h> #include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_plane_helper.h> #include <drm/drm_plane_helper.h>
#include <drm/drm_vblank.h> #include <drm/drm_vblank.h>

View File

@@ -19,6 +19,7 @@
#include <drm/drm_debugfs.h> #include <drm/drm_debugfs.h>
#include <drm/drm_drv.h> #include <drm/drm_drv.h>
#include <drm/drm_fourcc.h> #include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_ioctl.h> #include <drm/drm_ioctl.h>
#include <drm/drm_prime.h> #include <drm/drm_prime.h>
#include <drm/drm_vblank.h> #include <drm/drm_vblank.h>

View File

@@ -11,6 +11,7 @@
#include <linux/version.h> #include <linux/version.h>
#include <drm/drm_fourcc.h> #include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_modeset_helper.h> #include <drm/drm_modeset_helper.h>

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 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;
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); 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 tegra_bo *bo = to_tegra_bo(gem);
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)

View File

@@ -20,9 +20,6 @@
#include <soc/tegra/common.h> #include <soc/tegra/common.h>
#include <sound/hdmi-codec.h> #include <sound/hdmi-codec.h>
#include <soc/tegra/common.h>
#include <sound/hdmi-codec.h>
#include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h> #include <drm/drm_crtc.h>
#include <drm/drm_debugfs.h> #include <drm/drm_debugfs.h>

View File

@@ -5,6 +5,7 @@
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/host1x-next.h> #include <linux/host1x-next.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/of.h> #include <linux/of.h>
@@ -16,7 +17,9 @@
#include <drm/drm_atomic.h> #include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_helper.h>
#include <drm/drm_blend.h>
#include <drm/drm_fourcc.h> #include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_probe_helper.h> #include <drm/drm_probe_helper.h>
#include "drm.h" #include "drm.h"

View File

@@ -5,6 +5,7 @@
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/host1x-next.h> #include <linux/host1x-next.h>
#include <linux/iommu.h> #include <linux/iommu.h>
#include <linux/module.h> #include <linux/module.h>

View File

@@ -3,6 +3,7 @@
* Copyright (C) 2017 NVIDIA CORPORATION. All rights reserved. * Copyright (C) 2017 NVIDIA CORPORATION. All rights reserved.
*/ */
#include <linux/dma-mapping.h>
#include <linux/iommu.h> #include <linux/iommu.h>
#include <linux/interconnect.h> #include <linux/interconnect.h>
#include <linux/version.h> #include <linux/version.h>
@@ -10,6 +11,7 @@
#include <drm/drm_atomic.h> #include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_helper.h>
#include <drm/drm_fourcc.h> #include <drm/drm_fourcc.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_atomic_helper.h> #include <drm/drm_gem_atomic_helper.h>
#include <drm/drm_plane_helper.h> #include <drm/drm_plane_helper.h>

View File

@@ -324,7 +324,7 @@ cleanup:
} }
static int vic_runtime_resume(struct device *dev) static int __maybe_unused vic_runtime_resume(struct device *dev)
{ {
struct vic *vic = dev_get_drvdata(dev); struct vic *vic = dev_get_drvdata(dev);
int err; int err;
@@ -358,7 +358,7 @@ disable:
return err; return err;
} }
static int vic_runtime_suspend(struct device *dev) static int __maybe_unused vic_runtime_suspend(struct device *dev)
{ {
struct vic *vic = dev_get_drvdata(dev); struct vic *vic = dev_get_drvdata(dev);
int err; int err;
@@ -470,7 +470,6 @@ static int vic_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct host1x_syncpt **syncpts; struct host1x_syncpt **syncpts;
struct resource *regs;
struct vic *vic; struct vic *vic;
int err; int err;
@@ -491,13 +490,7 @@ static int vic_probe(struct platform_device *pdev)
if (!syncpts) if (!syncpts)
return -ENOMEM; return -ENOMEM;
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); vic->regs = devm_platform_ioremap_resource(pdev, 0);
if (!regs) {
dev_err(&pdev->dev, "failed to get registers\n");
return -ENXIO;
}
vic->regs = devm_ioremap_resource(dev, regs);
if (IS_ERR(vic->regs)) if (IS_ERR(vic->regs))
return PTR_ERR(vic->regs); return PTR_ERR(vic->regs);