mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
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:
committed by
Laxman Dewangan
parent
429e344bea
commit
437bb539be
@@ -7,6 +7,7 @@
|
||||
#include <linux/clk.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/iommu.h>
|
||||
#include <linux/interconnect.h>
|
||||
#include <linux/module.h>
|
||||
@@ -21,8 +22,10 @@
|
||||
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_blend.h>
|
||||
#include <drm/drm_debugfs.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
#include <drm/drm_plane_helper.h>
|
||||
#include <drm/drm_vblank.h>
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <drm/drm_debugfs.h>
|
||||
#include <drm/drm_drv.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
#include <drm/drm_ioctl.h>
|
||||
#include <drm/drm_prime.h>
|
||||
#include <drm/drm_vblank.h>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <linux/version.h>
|
||||
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
#include <drm/drm_gem_framebuffer_helper.h>
|
||||
#include <drm/drm_modeset_helper.h>
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -20,9 +20,6 @@
|
||||
#include <soc/tegra/common.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_crtc.h>
|
||||
#include <drm/drm_debugfs.h>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/host1x-next.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
@@ -16,7 +17,9 @@
|
||||
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_blend.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
#include <drm/drm_probe_helper.h>
|
||||
|
||||
#include "drm.h"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/host1x-next.h>
|
||||
#include <linux/iommu.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2017 NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/iommu.h>
|
||||
#include <linux/interconnect.h>
|
||||
#include <linux/version.h>
|
||||
@@ -10,6 +11,7 @@
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
#include <drm/drm_gem_atomic_helper.h>
|
||||
#include <drm/drm_plane_helper.h>
|
||||
|
||||
|
||||
@@ -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);
|
||||
int err;
|
||||
@@ -358,7 +358,7 @@ disable:
|
||||
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);
|
||||
int err;
|
||||
@@ -470,7 +470,6 @@ static int vic_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct host1x_syncpt **syncpts;
|
||||
struct resource *regs;
|
||||
struct vic *vic;
|
||||
int err;
|
||||
|
||||
@@ -491,13 +490,7 @@ static int vic_probe(struct platform_device *pdev)
|
||||
if (!syncpts)
|
||||
return -ENOMEM;
|
||||
|
||||
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!regs) {
|
||||
dev_err(&pdev->dev, "failed to get registers\n");
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
vic->regs = devm_ioremap_resource(dev, regs);
|
||||
vic->regs = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(vic->regs))
|
||||
return PTR_ERR(vic->regs);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user