summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/instmem
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 07:54:23 +0300
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 05:40:49 +0300
commit43a70661eaa64aa4e36e421eee3b9ded3190837b (patch)
treec0792db927aec0ba026039edb894c9460d252c7e /drivers/gpu/drm/nouveau/nvkm/subdev/instmem
parent340b0e7c500a0ac8fb649c58cf8528550642c1d8 (diff)
downloadlinux-43a70661eaa64aa4e36e421eee3b9ded3190837b.tar.xz
drm/nouveau/tegra: merge platform setup from nouveau drm
The copyright header in nvkm/engine/device/platform.c has been replaced with the NVIDIA one from drm/nouveau_platform.c, as most of the actual code is now theirs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/instmem')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
index 5ef04b72a80a..cd7feb1b25f6 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
@@ -42,14 +42,9 @@
#include <core/memory.h>
#include <core/mm.h>
+#include <core/tegra.h>
#include <subdev/fb.h>
-#ifdef __KERNEL__
-#include <linux/dma-attrs.h>
-#include <linux/iommu.h>
-#include <nouveau_platform.h>
-#endif
-
#define gk20a_instobj(p) container_of((p), struct gk20a_instobj, memory)
struct gk20a_instobj {
@@ -423,8 +418,9 @@ gk20a_instmem = {
int
gk20a_instmem_new(struct nvkm_device *device, int index,
- struct nvkm_instmem **pimem)
+ struct nvkm_instmem **pimem)
{
+ struct nvkm_device_tegra *tdev = device->func->tegra(device);
struct gk20a_instmem *imem;
if (!(imem = kzalloc(sizeof(*imem), GFP_KERNEL)))
@@ -433,11 +429,11 @@ gk20a_instmem_new(struct nvkm_device *device, int index,
spin_lock_init(&imem->lock);
*pimem = &imem->base;
- if (device->gpu->iommu.domain) {
- imem->domain = device->gpu->iommu.domain;
- imem->mm = device->gpu->iommu.mm;
- imem->iommu_pgshift = device->gpu->iommu.pgshift;
- imem->mm_mutex = &device->gpu->iommu.mutex;
+ if (tdev->iommu.domain) {
+ imem->domain = tdev->iommu.domain;
+ imem->mm = &tdev->iommu.mm;
+ imem->iommu_pgshift = tdev->iommu.pgshift;
+ imem->mm_mutex = &tdev->iommu.mutex;
nvkm_info(&imem->base.subdev, "using IOMMU\n");
} else {