2.5.11 framebuffer compilation error
Subsystems (2)
I'll know this kernel is ready for merger with the 2.4 when I can finally compile it :) ... must have tried 6-7 versions by now ...
Error:
Note...this is something new that I haven't tried to compile before. Error might be caused by an earlier kernel.
However, 2.5.11 does contain a lot of screen_base changes.
________________________________________________
gcc -D__KERNEL__ -I/usr/src/linux-2.5.11/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=athlon -DKBUILD_BASENAME=fbcon_cfb8 -DEXPORT_SYMTAB -c fbcon-cfb8.c fbcon-cfb8.c: In function `fbcon_cfb8_bmove':
fbcon-cfb8.c:55: structure has no member named screen_base' fbcon-cfb8.c:56: structure has no member named screen_base' fbcon-cfb8.c:66: structure has no member named screen_base' fbcon-cfb8.c:67: structure has no member named screen_base' fbcon-cfb8.c:74: structure has no member named screen_base' fbcon-cfb8.c:75: structure has no member named screen_base' fbcon-cfb8.c:52: warning: src' might be used uninitialized in this function fbcon-cfb8.c:52: warning: dst' might be used uninitialized in this function fbcon-cfb8.c: In function `fbcon_cfb8_clear':
fbcon-cfb8.c:100: structure has no member named screen_base' fbcon-cfb8.c:96: warning: dest' might be used uninitialized in this function fbcon-cfb8.c: In function `fbcon_cfb8_putc':
fbcon-cfb8.c:118: structure has no member named screen_base' fbcon-cfb8.c:114: warning: dest' might be used uninitialized in this function fbcon-cfb8.c: In function `fbcon_cfb8_putcs':
fbcon-cfb8.c:165: structure has no member named screen_base' fbcon-cfb8.c:160: warning: dest0' might be used uninitialized in this functionfbcon-cfb8.c: In function `fbcon_cfb8_revc':
fbcon-cfb8.c:222: structure has no member named screen_base' fbcon-cfb8.c:219: warning: dest' might be used uninitialized in this function fbcon-cfb8.c: In function `fbcon_cfb8_clear_margins':
fbcon-cfb8.c:247: structure has no member named screen_base' fbcon-cfb8.c:250: structure has no member named screen_base' make[3]: *** [fbcon-cfb8.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.5.11/drivers/video' make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.5.11/drivers/video' make[1]: *** [_subdir_video] Error 2
make[1]: Leaving directory `/usr/src/linux-2.5.11/drivers'
make: *** [_dir_drivers] Error 2
I hit this error as well. Here is the pertinent .config snippet.
#
# Console drivers
#CONFIG_VGA_CONSOLE=yCONFIG_VIDEO_SELECT=y
#
# Frame-buffer support
#CONFIG_FB=yCONFIG_DUMMY_CONSOLE=yCONFIG_FB_RIVA=yCONFIG_VIDEO_SELECT=yCONFIG_FBCON_CFB8=yCONFIG_FBCON_CFB16=yCONFIG_FBCON_CFB32=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
Quoted 49 lines · Ivan G.
I'll know this kernel is ready for merger with the 2.4 when I can finally compile it :) ... must have tried 6-7 versions by now ...
Error:
Note...this is something new that I haven't tried to compile before. Error might be caused by an earlier kernel.
However, 2.5.11 does contain a lot ofscreen_basechanges.
________________________________________________
gcc -D__KERNEL__ -I/usr/src/linux-2.5.11/include -Wall -Wstrict-prototypes(quoted diff) +0
-3-Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=athlon -DKBUILD_BASENAME=fbcon_cfb8 -DEXPORT_SYMTAB -c fbcon-cfb8.c
fbcon-cfb8.c: In function `fbcon_cfb8_bmove':
fbcon-cfb8.c:55: structure has no member namedscreen_base' fbcon-cfb8.c:56: structure has no member namedscreen_base' fbcon-cfb8.c:66: structure has no member namedscreen_base' fbcon-cfb8.c:67: structure has no member namedscreen_base' fbcon-cfb8.c:74: structure has no member namedscreen_base' fbcon-cfb8.c:75: structure has no member namedscreen_base' fbcon-cfb8.c:52: warning:src' might be used uninitialized in this function fbcon-cfb8.c:52: warning:dst' might be used uninitialized in this functionfbcon-cfb8.c: In function `fbcon_cfb8_clear':
fbcon-cfb8.c:100: structure has no member namedscreen_base' fbcon-cfb8.c:96: warning:dest' might be used uninitialized in this functionfbcon-cfb8.c: In function `fbcon_cfb8_putc':
fbcon-cfb8.c:118: structure has no member namedscreen_base' fbcon-cfb8.c:114: warning:dest' might be used uninitialized in this functionfbcon-cfb8.c: In function `fbcon_cfb8_putcs':
fbcon-cfb8.c:165: structure has no member namedscreen_base' fbcon-cfb8.c:160: warning:dest0' might be used uninitialized in this functionfbcon-cfb8.c: In function `fbcon_cfb8_revc':
fbcon-cfb8.c:222: structure has no member namedscreen_base' fbcon-cfb8.c:219: warning:dest' might be used uninitialized in this functionfbcon-cfb8.c: In function `fbcon_cfb8_clear_margins':
fbcon-cfb8.c:247: structure has no member namedscreen_base' fbcon-cfb8.c:250: structure has no member namedscreen_base' make[3]: *** [fbcon-cfb8.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.5.11/drivers/video' make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.5.11/drivers/video' make[1]: *** [_subdir_video] Error 2
make[1]: Leaving directory `/usr/src/linux-2.5.11/drivers'
make: *** [_dir_drivers] Error 2
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 8 lines
I'll know this kernel is ready for merger with the 2.4 when I can finally compile it :) ... must have tried 6-7 versions by now ...
Error:
Note...this is something new that I haven't tried to compile before. Error might be caused by an earlier kernel.
However, 2.5.11 does contain a lot ofscreen_basechanges.
Thats my fault. I had all the correct changes locally but my experience with BK is just starting :-/ So this first time was a bit painful. I asked people to tes my stuff but no one compiled so I toke that as everything was okay. Please folks. Test the stuff. I even make classic diff patches for people as well.
I have fixes against 2.5.11 avaliable for this.
Diff:
http://www.transvirtual.com/~jsimmons/fbdev_fixs.diff
Also I commited these changes to the BK repository. The URL for this is
Quoted 5 lines
Please folks. Test the stuff. I even make classic
diff patches for people as well.I have fixes against 2.5.11 avaliable for this.
Tested and verified to work. Thank you.
Wow. I actually compiled a 2.5 kernel.
must be a miracle of some kind :)
Now let's reboot and test my new kernel.
2.5.11 framebuffer kernel panic
In reply to James SimmonsWell, here's the result of my first 2.5 compiled kernel :
Codes were hand-copied. Inaccuracy is possible but unlikely. I checked several times.
----------------------------------------------------------------
ksymoops 2.4.0 on i686 2.4.19-pre3. Options used
-v /usr/src/linux-2.5.11/vmlinux (specified)
-K (specified)
-L (specified)
-o /lib/modules/2.5.11 (specified)
-m /boot/System.map-2.5.11 (specified)No modules in ksyms, skipping objects
Unable to handle kernel NULL pointer dereference at virtual address 000001b4 *pde = 00000000 oops: 0000 CPU: 0
EIP: 0010: [<c02055f6>] Not tainted.
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010283
eax: c0336570 ebx: 00007f80 ecx: 00000000
esi: 00000000 edi: 00000180 ebp: 00000000 esp: d3eefce8
ds: 0018 es: 0018 ss: 0018
Stack: 00007f80 c0336680 c1313800 00000000 c0203a70 c0336570 00000002 00000000
00000180 00000003 c02b48f4 c02b4a60 00000206 00000003 00000246 c012f69f
c02b48f4 c02b4a5c 000001f0 00000000 c12d79c0 000001f0 c1308000 c012d39e
Call Trace: [<c0203a70>] [<c012f69f>] [<c012d39f>] [<c01ff424>] [<c0200990>]
[<c01ba4a9>] [<c01fef53>] [<c01fe603>] [<c01ba5de>] [<c01be0ed>]
[<c01fd91a>] [<c0105000>] [<c0105070>] [<c0105000>] [<c0105646>]
[<c0105050>]
Code: 8b 9d b4 01 00 00 85 db 0f 84 ac 00 00 00 0f b7 82 02 01 00Quoted 1 line
Quoted 1 line
EIP;
c02055f6<atyfb_cursor+16/e0> <=====
Trace; c0203a70 <atyfbcon_switch+70/e0>
Trace; c012f69f <__alloc_pages+3f/180>
Trace; c012d39f <kmem_cache_grow+ef/270>
Trace; c01ff424 <fbcon_cursor+b4/1e0>
Trace; c0200990 <fbcon_switch+140/1c0>
Trace; c01ba4a9 <redraw_screen+c9/140>
Trace; c01fef53 <fbcon_setup+843/940>
Trace; c01fe603 <fbcon_init+b3/e0>
Trace; c01ba5de <visual_init+9e/100>
Trace; c01be0ed <take_over_console+ad/180>
Trace; c01fd91a <register_framebuffer+fa/130>
Trace; c0105000 <_stext+0/0>
Trace; c0105070 <init+20/180>
Trace; c0105000 <_stext+0/0>
Trace; c0105646 <kernel_thread+26/30>
Trace; c0105050 <init+0/180>
Code; c02055f6 <atyfb_cursor+16/e0>
00000000 <_EIP>:
Code; c02055f6 <atyfb_cursor+16/e0> <=====
0: 8b 9d b4 01 00 00 mov 0x1b4(%ebp),%ebx <=====
Code; c02055fc <atyfb_cursor+1c/e0>
6: 85 db test %ebx,%ebx
Code; c02055fe <atyfb_cursor+1e/e0>
8: 0f 84 ac 00 00 00 je ba <_EIP+0xba> c02056b0
<atyfb_cursor+d0/e0>
Code; c0205604 <atyfb_cursor+24/e0>
e: 0f b7 82 02 01 00 00 movzwl 0x102(%edx),%eax
<0> Kernel panic: Attempted to kill Init!
Re: 2.5.11 framebuffer kernel panic
Try this patch and tell me if it works.
atyfb_base.c renamed from usr/src/linux-2.5.11/drivers/video/aty/atyfb_base.c +1 -1
@@ -2625,7 +2625,7 @@#ifdef CONFIG_FB_ATY_CT /* Erase HW Cursor */ -if (info->cursor) +if (info->cursor && (fb->currcon >=0 ))atyfb_cursor (&fb_display[fb->currcon],CM_ERASE , info->cursor->pos.x, info->cursor->pos.y);#endif /* CONFIG_FB_ATY_CT */
Re: 2.5.11 framebuffer kernel panic [Resolved]
Quoted 1 line · you
Try this patch and tell me if it works.
It worked. I got a penguin, just before it died again with an ide-related panic for which I'll start a new LKML thread :)
Re: 2.5.11 framebuffer kernel panic [Resolved]
Quoted 5 lines · you
Quoted 1 line
Try this patch and tell me if it works.
It worked. I got a penguin,
:-)
Quoted 2 lines
just before it died again with an ide-related
panic for which I'll start a new LKML thread :)
:-(
Quoted 3 lines · James Simmons
Diff:
I tried 2.5.12 with this patch on PPC, with most of the mac framebuffers selected, and got a few errors. Here is a patch that fixes the compilation errors plus a few other things.
The files affected are:
chipsfb.c )controlfb.c ) fix compile errors from recent changesplatinumfb.c)valkyriefb.c)
offb.c fix a problem with colormap corruption on blank
add support for IBM GXT2000P display fix compile errors from recent changes
aty128.h remove duplicate definitionaty128fb.c add btext_update_display call
add Rage128 Pro TR eliminate compile warnings make aty128fb_blank be actually used add more default resolutions based on
which type of powermac we have
imsttfb.c eliminate compile warning
aty/atyfb_base.c add btext_update_display call
Some of these changes have come from Ben Herrenschmidt.
I have changes to the radeon driver too but I haven't included them in this patch since I am using version 0.1.4 in my tree at the moment whereas Linus' tree only has version 0.1.1.
James, it would be good if you could look at this and either apply it, or let me know if there is anything you don't like so we can discuss it.
Regards,
Paul.
drivers/video/aty/atyfb_base.c +10 -0
@@ -87,6 +87,9 @@#include <linux/adb.h> #include <linux/pmu.h> #endif +#ifdef CONFIG_BOOTX_TEXT +#include <asm/btext.h> +#endif #ifdef CONFIG_NVRAM #include <linux/nvram.h> #endif
@@ -815,6 +818,13 @@ display_info.disp_reg_address = info->ati_regbase_phys; }#endif /* CONFIG_FB_COMPAT_XPMAC */ +#ifdef CONFIG_BOOTX_TEXT +btext_update_display (info->frame_buffer_phys, + (((par->crtc.h_tot_disp>>16 ) &0xff )+1 )*8 , + ((par->crtc.v_tot_disp>>16 ) &0x7ff )+1 , + par->crtc.bpp, + par->crtc.vxres*par->crtc.bpp/8 ); +#endif /* CONFIG_BOOTX_TEXT */ } static int atyfb_decode_var(const struct fb_var_screeninfo *var,
drivers/video/aty128.h +0 -1
@@ -267,7 +267,6 @@#define DAC_MASK 0xFF000000#define DAC_BLANKING 0x00000004#define DAC_RANGE_CNTL 0x00000003 -#define DAC_RANGE_CNTL 0x00000003#define DAC_PALETTE_ACCESS_CNTL 0x00000020#define DAC_PDWN 0x00008000
drivers/video/aty128fb.c +40 -1
86 lines not on this page · raw message
drivers/video/chipsfb.c +2 -2
@@ -312,7 +312,7 @@struct fb_var_screeninfo * var = &p->var;if (bpp ==16 ) { -if (con == info->currcon) { +if (con == p->info.currcon) {write_cr (0x13 ,200 );// Set line length (doublewords) write_xr (0x81 ,0x14 );// 15 bit (555) color mode write_xr (0x82 ,0x00 );// Disable palettes
@@ -334,7 +334,7 @@ disp->dispsw = &fbcon_dummy;#endif }else if (bpp ==8 ) { -if (con == info->currcon) { +if (con == p->info.currcon) {write_cr (0x13 ,100 );// Set line length (doublewords) write_xr (0x81 ,0x12 );// 8 bit color mode write_xr (0x82 ,0x08 );// Graphics gamma enable
drivers/video/controlfb.c +5 -5
@@ -149,7 +149,7 @@ struct fb_info *info);static int control_get_cmap (struct fb_cmap *cmap,int kspc,int con,struct fb_info *info); -static int controlfb_setcolreg (u_int regno,u_int red,u_int green,u_int blue, +static int control_setcolreg (u_int regno,u_int red,u_int green,u_int blue,u_int transp,struct fb_info *info);static int controlfb_blank (int blank_mode,struct fb_info *info); static int control_mmap(struct fb_info *info, struct file *file,
@@ -225,7 +225,7 @@ fb_set_var: control_set_var, fb_get_cmap: control_get_cmap, fb_set_cmap: gen_set_cmap, - fb_setcolreg: controlfb_setcolreg, + fb_setcolreg: control_setcolreg, fb_pan_display: control_pan_display, fb_blank: controlfb_blank, fb_mmap: control_mmap,
@@ -520,7 +520,7 @@return 0 ; } -static int controlfb_setcolreg (u_int regno,u_int red,u_int green,u_int blue, +static int control_setcolreg (u_int regno,u_int red,u_int green,u_int blue,u_int transp,struct fb_info *info) {struct fb_info_control *p = (struct fb_info_control *) info;
@@ -1238,7 +1238,7 @@u8 *dest;int bytes = p->next_line, rows; - dest = p->info.screen_base + yy *fontheight (p) * bytes + xx *fontwidth (p)*2 ; + dest = p->fb_info->screen_base + yy *fontheight (p) * bytes + xx *fontwidth (p)*2 ;for (rows =fontheight (p); rows--; dest += bytes) {switch (fontwidth (p)) {case 16 :
@@ -1261,7 +1261,7 @@u8 *dest;int bytes = p->next_line, rows; - dest = p->info.screen_base + yy *fontheight (p) * bytes + xx *fontwidth (p) *4 ; + dest = p->fb_info->screen_base + yy *fontheight (p) * bytes + xx *fontwidth (p) *4 ;for (rows =fontheight (p); rows--; dest += bytes) {switch (fontwidth (p)) {case 16 :
drivers/video/imsttfb.c +1 -1
@@ -1908,7 +1908,7 @@ p->ramdac =TVP ;break ;default : -printk (KERN_INFO "imsttfb: Device 0x%lx unknown, " +printk (KERN_INFO "imsttfb: Device 0x%x unknown, " "contact maintainer.\n" , pdev->device);return -ENODEV ; }
drivers/video/offb.c +32 -6
@@ -49,7 +49,8 @@ cmap_r128,/* ATI Rage128 */ cmap_M3A,/* ATI Rage Mobility M3 Head A */ cmap_M3B,/* ATI Rage Mobility M3 Head B */ - cmap_radeon/* ATI Radeon */ + cmap_radeon,/* ATI Radeon */ + cmap_gxt2000/* IBM GXT2000 */ }; struct fb_info_offb {
@@ -61,6 +62,7 @@volatile unsigned char *cmap_adr;volatile unsigned char *cmap_data;int cmap_type; +int blanked;union {#ifdef FBCON_HAS_CFB16 u16 cfb16[16 ];
@@ -207,9 +209,11 @@static int offb_get_cmap (struct fb_cmap *cmap,int kspc,int con,struct fb_info *info) { -if (con == info->currcon)/* current console? */ +struct fb_info_offb *info2 = (struct fb_info_offb *)info; + +if (con == info->currcon && !info2->blanked)/* current console? */ return fb_get_cmap (cmap, kspc, offb_getcolreg, info); -else if (fb_display[con].cmap.len)/* non default colormap? */ +if (fb_display[con].cmap.len)/* non default colormap? */ fb_copy_cmap (&fb_display[con].cmap, cmap, kspc ?0 :2 );else {
@@ -237,7 +241,7 @@if ((err =fb_alloc_cmap (&fb_display[con].cmap, size,0 )))return err; } -if (con == info->currcon)/* current console? */ +if (con == info->currcon && !info2->blanked)/* current console? */ return fb_set_cmap (cmap, kspc, info);else fb_copy_cmap (cmap, &fb_display[con].cmap, kspc ?0 :1 );
@@ -254,7 +258,16 @@int i, j;if (!info2->cmap_adr) -return ; +return 0 ; + +if (!info2->blanked) { +if (!blank) +return 0 ; +if (fb_display[info->currcon].cmap.len) +fb_get_cmap (&fb_display[info->currcon].cmap,1 , offb_getcolreg, info); + } + + info2->blanked = blank;if (blank)for (i =0 ; i <256 ; i++) {
@@ -288,6 +301,9 @@out_8 (info2->cmap_adr +0xb0 , i);out_le32 ((unsigned *)(info2->cmap_adr +0xb4 ),0 );break ; +case cmap_gxt2000: +out_le32 ((unsigned *)info2->cmap_adr + i,0 ); +break ; } }else
@@ -496,6 +512,10 @@ info->cmap_adr =ioremap (base +0x7ff000 ,0x1000 ) +0xcc0 ; info->cmap_data = info->cmap_adr +1 ; info->cmap_type = cmap_m64; + }else if (device_is_compatible (dp,"pci1014,b7" )) { +unsigned long regbase = dp->addrs[0 ].address; + info->cmap_adr =ioremap (regbase +0x6000 ,0x1000 ); + info->cmap_type = cmap_gxt2000; } fix->visual = info->cmap_adr ?FB_VISUAL_PSEUDOCOLOR :FB_VISUAL_STATIC_PSEUDOCOLOR ;
@@ -667,8 +687,10 @@static int offbcon_switch (int con,struct fb_info *info) { +struct fb_info_offb *info2 = (struct fb_info_offb *)info; +/* Do we have to save the colormap? */ -if (fb_display[info->currcon].cmap.len) +if (fb_display[info->currcon].cmap.len && !info2->blanked)fb_get_cmap (&fb_display[info->currcon].cmap,1 , offb_getcolreg, info); info->currcon = con;
@@ -765,6 +787,10 @@out_8 (info2->cmap_adr +0xb0 , regno);out_le32 ((unsigned *)(info2->cmap_adr +0xb4 ), (red <<16 | green <<8 | blue)); +break ; +case cmap_gxt2000: +out_le32 ((unsigned *)info2->cmap_adr + regno, + (red <<16 | green <<8 | blue));break ; }
drivers/video/platinumfb.c +3 -3
@@ -329,10 +329,10 @@struct fb_info_platinum *info = (struct fb_info_platinum *) fb;struct fb_par_platinum par; -if (fb_display[info->currcon].cmap.len) -fb_get_cmap (&fb_display[info->currcon].cmap,1 , platinum_getcolreg, +if (fb_display[fb->currcon].cmap.len) +fb_get_cmap (&fb_display[fb->currcon].cmap,1 , platinum_getcolreg, fb); - info->currcon = con; + fb->currcon = con;platinum_var_to_par (&fb_display[con].var, &par, info);platinum_set_par (&par, info);
drivers/video/valkyriefb.c +1 -1
@@ -260,7 +260,7 @@ fb); fb->currcon = con;#if 1 -valkyrie_var_to_par (&fb_display[currcon].var, &par, fb); +valkyrie_var_to_par (&fb_display[fb->currcon].var, &par, fb);valkyrie_set_par (&par, info);do_install_cmap (con, fb);#else
Quoted 9 lines
Quoted 3 lines · James Simmons
Diff:
I tried 2.5.12 with this patch on PPC, with most of the mac framebuffers selected, and got a few errors. Here is a patch that fixes the compilation errors plus a few other things.
I applied your patch. Same place and I also applied to my BK tree. As for other changes. Alot of cleanups are going to happen. Soon you will see with my new VESA framebuffer driver.