lkml.org 
[lkml]   [2004]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: vga16fb broke

> Guys, can you help with http://bugme.osdl.org/show_bug.cgi?id=2711 ?
>
> The recent change broke it on x86 becuase we're now doing ioremap()
> of a kernel-virtual address, but the oriiginal version doesn't work on ARM.
>
> Should it just be:
>
> vga16fb.screen_base = VGA_MAP_MEM(VGA_FB_PHYS);

I went looking at the various platforms to see what exactly was going on.
We have:

Useage

./drivers/video/console/mdacon.c: mda_vram_base = VGA_MAP_MEM(0xb0000);
./drivers/video/console/vgacon.c: vga_vram_base = VGA_MAP_MEM(vga_vram_base);
./drivers/video/console/vgacon.c: vga_vram_end = VGA_MAP_MEM(vga_vram_end);
./drivers/video/console/vgacon.c: charmap = (char *) VGA_MAP_MEM(colourmap);
./drivers/video/console/vgacon.c: charmap = (char *) VGA_MAP_MEM(blackwmap);
./drivers/video/hgafb.c: hga_fix.smem_start = VGA_MAP_MEM(hga_vram_base);
./drivers/video/vga16fb.c: vga16fb.screen_base = ioremap(VGA_MAP_MEM(VGA_FB_PHYS), VGA_FB_PHYS_LEN);
./drivers/video/vga16fb.c: vga16fb.fix.smem_start = VGA_MAP_MEM(vga16fb.fix.smem_start);

ioremap happy

./include/asm-alpha/vga.h:#define VGA_MAP_MEM(x) ((unsigned long) ioremap((x), 0))
./include/asm-ia64/vga.h:#define VGA_MAP_MEM(x) ((unsigned long) ioremap((x), 0))
./include/asm-ppc64/vga.h:#define VGA_MAP_MEM(x) ((unsigned long) ioremap((x), 0))

can be ioremap happy because ioremap in io.h matches below definetions.

./include/asm-i386/vga.h:#define VGA_MAP_MEM(x) (unsigned long)phys_to_virt(x)
./include/asm-sparc64/vga.h:#define VGA_MAP_MEM(x) (x)
./include/asm-x86_64/vga.h:#define VGA_MAP_MEM(x) (unsigned long)phys_to_virt(x)

Not happy.

./include/asm-arm/vga.h:#define VGA_MAP_MEM(x) (PCIMEM_BASE + (x))
./include/asm-mips/vga.h:#define VGA_MAP_MEM(x) (0xb0000000L + (unsigned long)(x))
./include/asm-ppc/vga.h:#define VGA_MAP_MEM(x) (x + vgacon_remap_base)


So you can see that VGA_MAP_MEM is already ioremapping which is causing
the problem. Personally I like to see the lose ends fixed on ARM, MIPS,
and PPC so we can use just ioremap.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.042 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site