dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/nouveau: fix build failures on all non ARM.
@ 2015-11-09 22:36 Dave Airlie
  0 siblings, 0 replies; only message in thread
From: Dave Airlie @ 2015-11-09 22:36 UTC (permalink / raw)
  To: dri-devel

From: Dave Airlie <airlied@redhat.com>

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.

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
index fc419bb..c4b8704 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
@@ -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));
 }
-- 
2.5.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-09 22:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-09 22:36 [PATCH] drm/nouveau: fix build failures on all non ARM Dave Airlie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox