]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
fbdev: gbefb: fix to use physical address instead of dma address
authorRene Rebe <rene@exactco.de>
Fri, 14 Nov 2025 15:00:42 +0000 (16:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:10:01 +0000 (13:10 +0100)
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>
drivers/video/fbdev/gbefb.c

index 6b4d5a7f3e152b57cef93bb3f5f78966478d0741..c160b7e1c3322b48dd84a1994ce4e6c62f89280f 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/delay.h>
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
+#include <linux/dma-direct.h>
 #include <linux/errno.h>
 #include <linux/gfp.h>
 #include <linux/fb.h>
@@ -65,7 +66,7 @@ struct gbefb_par {
 static unsigned int gbe_mem_size = CONFIG_FB_GBE_MEM * 1024*1024;
 static void *gbe_mem;
 static dma_addr_t gbe_dma_addr;
-static unsigned long gbe_mem_phys;
+static phys_addr_t gbe_mem_phys;
 
 static struct {
        uint16_t *cpu;
@@ -1187,7 +1188,7 @@ static int gbefb_probe(struct platform_device *p_dev)
                        goto out_release_mem_region;
                }
 
-               gbe_mem_phys = (unsigned long) gbe_dma_addr;
+               gbe_mem_phys = dma_to_phys(&p_dev->dev, gbe_dma_addr);
        }
 
        par = info->par;