aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2015-11-25 10:56:40 -0800
committerTony Lindgren <tony@atomide.com>2015-11-25 10:56:40 -0800
commit970259bff472579204108c6f27036ec4d1206ae1 (patch)
tree869bdcda9aac4c67712d93e6141056fdf3f41bd8 /drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
parentARM: OMAP2+: remove custom abort handler for t410 (diff)
parentarm: omap2+: add missing HWMOD_NO_IDLEST in 81xx hwmod data (diff)
downloadlinux-dev-970259bff472579204108c6f27036ec4d1206ae1.tar.xz
linux-dev-970259bff472579204108c6f27036ec4d1206ae1.zip
Merge branch '81xx' into omap-for-v4.4/fixes
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
index fc419bb8eab7..14107b5b7811 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
@@ -133,18 +133,24 @@ gk20a_instobj_size(struct nvkm_memory *memory)
static void __iomem *
gk20a_instobj_cpu_map_dma(struct nvkm_memory *memory)
{
+#if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
struct gk20a_instobj_dma *node = gk20a_instobj_dma(memory);
struct device *dev = node->base.imem->base.subdev.device->dev;
int npages = nvkm_memory_size(memory) >> 12;
struct page *pages[npages];
int i;
+ /* we shouldn't see a gk20a on anything but arm/arm64 anyways */
/* phys_to_page does not exist on all platforms... */
pages[0] = pfn_to_page(dma_to_phys(dev, node->handle) >> PAGE_SHIFT);
for (i = 1; i < npages; i++)
pages[i] = pages[0] + i;
return vmap(pages, npages, VM_MAP, pgprot_writecombine(PAGE_KERNEL));
+#else
+ BUG();
+ return NULL;
+#endif
}
static void __iomem *