Skip to content

Commit e3f4474

Browse files
rxrblnhdeller
authored andcommitted
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>
1 parent b104df3 commit e3f4474

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>
@@ -65,7 +66,7 @@ struct gbefb_par {
6566
static unsigned int gbe_mem_size = CONFIG_FB_GBE_MEM * 1024*1024;
6667
static void *gbe_mem;
6768
static dma_addr_t gbe_dma_addr;
68-
static unsigned long gbe_mem_phys;
69+
static phys_addr_t gbe_mem_phys;
6970

7071
static struct {
7172
uint16_t *cpu;
@@ -1183,7 +1184,7 @@ static int gbefb_probe(struct platform_device *p_dev)
11831184
goto out_release_mem_region;
11841185
}
11851186

1186-
gbe_mem_phys = (unsigned long) gbe_dma_addr;
1187+
gbe_mem_phys = dma_to_phys(&p_dev->dev, gbe_dma_addr);
11871188
}
11881189

11891190
par = info->par;

0 commit comments

Comments
 (0)