Skip to contentSkip to conversation

drm/nouveau: fix build failures on all non ARM.

PATCH New Dave Airlie 1 participant 1 message Nov 9, 2015

Subsystems (4)
lore
Share & tools
lore

Dave Airlie

author maintainer
#0 lore raw

PATCH 1/1 drm/nouveau: fix build failures on all non ARM.

From: Dave Airlie <[email protected]>

gk20a is an ARM only GPU, so we can just do the correct thing on ARM but fail on other architectures. The other option was to use SWIOTLB as the define, which means phys_to_page exists, but this seems clearer.

---
 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c +6 -0
index fc419bb..c4b8704 100644
@@ -139,10 +139,16 @@ gk20a_instobj_cpu_map_dma(struct nvkm_memory *memory)
 	struct page *pages[npages];
 	int i;
 
+	/* we shouldn't see a gk20a on anything but arm/arm64 anyways */
+#if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
 	/* 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;
+#else
+	BUG();
+	return NULL;
+#endif
 
 	return vmap(pages, npages, VM_MAP, pgprot_writecombine(PAGE_KERNEL));
 }
Signature · 6 lines
2.5.0

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel