Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev: gbefb: fix to use physical address instead of dma address

While debuggigng why X would not start on mips64 Sgi/O2 I found the
phys adress being off. Turns out the gbefb passed the internal
dma_addr as phys. May be broken pre git history. Fix by converting
dma_to_phys.

Signed-off-by: René Rebe <rene@exactco.de>
Cc: <stable@vger.kernel.org> # v4.0+
Signed-off-by: Helge Deller <deller@gmx.de>

authored by

Rene Rebe and committed by
Helge Deller
e3f44742 b104df37

+3 -2
+3 -2
drivers/video/fbdev/gbefb.c
··· 12 12 #include <linux/delay.h> 13 13 #include <linux/platform_device.h> 14 14 #include <linux/dma-mapping.h> 15 + #include <linux/dma-direct.h> 15 16 #include <linux/errno.h> 16 17 #include <linux/gfp.h> 17 18 #include <linux/fb.h> ··· 66 65 static unsigned int gbe_mem_size = CONFIG_FB_GBE_MEM * 1024*1024; 67 66 static void *gbe_mem; 68 67 static dma_addr_t gbe_dma_addr; 69 - static unsigned long gbe_mem_phys; 68 + static phys_addr_t gbe_mem_phys; 70 69 71 70 static struct { 72 71 uint16_t *cpu; ··· 1184 1183 goto out_release_mem_region; 1185 1184 } 1186 1185 1187 - gbe_mem_phys = (unsigned long) gbe_dma_addr; 1186 + gbe_mem_phys = dma_to_phys(&p_dev->dev, gbe_dma_addr); 1188 1187 } 1189 1188 1190 1189 par = info->par;