Skip to content

Commit 4f7114d

Browse files
rxrblnUlrich Hecht
authored andcommitted
fbdev: gbefb: fix to use physical address instead of dma address
commit e3f44742bbb10537fe53d83d20dea2a7c167674d upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ulrich Hecht <uli@kernel.org>
1 parent 36ac969 commit 4f7114d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

drivers/video/fbdev/gbefb.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <linux/delay.h>
1313
#include <linux/platform_device.h>
1414
#include <linux/dma-mapping.h>
15+
#include <linux/dma-direct.h>
1516
#include <linux/errno.h>
1617
#include <linux/gfp.h>
1718
#include <linux/fb.h>
@@ -71,7 +72,7 @@ struct gbefb_par {
7172
static unsigned int gbe_mem_size = CONFIG_FB_GBE_MEM * 1024*1024;
7273
static void *gbe_mem;
7374
static dma_addr_t gbe_dma_addr;
74-
static unsigned long gbe_mem_phys;
75+
static phys_addr_t gbe_mem_phys;
7576

7677
static struct {
7778
uint16_t *cpu;
@@ -1193,7 +1194,7 @@ static int gbefb_probe(struct platform_device *p_dev)
11931194
goto out_tiles_free;
11941195
}
11951196

1196-
gbe_mem_phys = (unsigned long) gbe_dma_addr;
1197+
gbe_mem_phys = dma_to_phys(&p_dev->dev, gbe_dma_addr);
11971198
}
11981199

11991200
par = info->par;

0 commit comments

Comments
 (0)