Skip to content

Commit d28ff99

Browse files
Christoph Hellwigtorvalds
authored andcommitted
gpu/drm: remove the powerpc hack in drm_legacy_sg_alloc
The non-cached vmalloc mapping was initially added as a hack for the first-gen amigaone platform (6xx/book32s), isn't fully supported upstream, and which used the legacy radeon driver together with non-coherent DMA. However this only ever worked reliably for DRI . Remove the hack as it is the last user of __vmalloc passing a page protection flag other than PAGE_KERNEL and didn't do anything for other platforms with non-coherent DMA. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Acked-by: Daniel Vetter <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: Christophe Leroy <[email protected]> Cc: David Airlie <[email protected]> Cc: Gao Xiang <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Haiyang Zhang <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: "K. Y. Srinivasan" <[email protected]> Cc: Laura Abbott <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Michael Kelley <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Nitin Gupta <[email protected]> Cc: Robin Murphy <[email protected]> Cc: Sakari Ailus <[email protected]> Cc: Stephen Hemminger <[email protected]> Cc: Sumit Semwal <[email protected]> Cc: Wei Liu <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Vasily Gorbik <[email protected]> Cc: Will Deacon <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent cca98e9 commit d28ff99

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

drivers/gpu/drm/drm_scatter.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,6 @@
4343

4444
#define DEBUG_SCATTER 0
4545

46-
static inline void *drm_vmalloc_dma(unsigned long size)
47-
{
48-
#if defined(__powerpc__) && defined(CONFIG_NOT_COHERENT_CACHE)
49-
return __vmalloc(size, GFP_KERNEL, pgprot_noncached_wc(PAGE_KERNEL));
50-
#else
51-
return vmalloc_32(size);
52-
#endif
53-
}
54-
5546
static void drm_sg_cleanup(struct drm_sg_mem * entry)
5647
{
5748
struct page *page;
@@ -126,7 +117,7 @@ int drm_legacy_sg_alloc(struct drm_device *dev, void *data,
126117
return -ENOMEM;
127118
}
128119

129-
entry->virtual = drm_vmalloc_dma(pages << PAGE_SHIFT);
120+
entry->virtual = vmalloc_32(pages << PAGE_SHIFT);
130121
if (!entry->virtual) {
131122
kfree(entry->busaddr);
132123
kfree(entry->pagelist);

0 commit comments

Comments
 (0)