* Fbdev 2.5.49 BK fixes.
[not found] <20021122100215.GA4998@pazke.ipt>
@ 2002-11-26 23:22 ` James Simmons
2002-11-27 11:04 ` Helge Hafting
0 siblings, 1 reply; 8+ messages in thread
From: James Simmons @ 2002-11-26 23:22 UTC (permalink / raw)
To: Andrey Panin; +Cc: Linux Kernel Mailing List, Linux Fbdev development list
> > Hm. Strange. It should work. Can you get serial console working?
>
> Forgot to mention, I've seen message:
> fbcon_setup: No support for fontwidth 8
> in /var/log/dmesg.
>
> I found this printk() in fbcon_setup(), but i can't even imagine
> why it happens.
Perfect. I found the problem and I'm about to commit to BK. I posted the
latest patch against 2.5.49 at
http://phoenix.infradead.org/~jsimmons/fbdev.diff.gz
> I understand this situation perfectly, looks like it's almost common for
> developers working in "not so importatnt for servers" subsystems :(
:-( Some day that attitude will change.
P.S
Several drivers have been ported but not all. NVIDIA is still broken
but I will fix it tonight.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Fbdev 2.5.49 BK fixes.
2002-11-26 23:22 ` Fbdev 2.5.49 BK fixes James Simmons
@ 2002-11-27 11:04 ` Helge Hafting
2002-11-27 17:49 ` James Simmons
0 siblings, 1 reply; 8+ messages in thread
From: Helge Hafting @ 2002-11-27 11:04 UTC (permalink / raw)
To: James Simmons, linux-fbdev-devel; +Cc: linux-kernel
James Simmons wrote:
> Perfect. I found the problem and I'm about to commit to BK. I posted the
> latest patch against 2.5.49 at
>
> http://phoenix.infradead.org/~jsimmons/fbdev.diff.gz
I tried this patch, but it crashed during boot.
I have a
01:00.0 VGA compatible controller: ATI Technologies Inc 3D Rage Pro AGP
1X/2X (rev 5c)
and use this in lilo.conf:
image=/boot/2.5.49fb
label=2.5.49fb
append="video=atyfb:1280x1024-16@85"
This got me a 160x64 framebuffer with yellow text on
blue background. Nice, but only got about 10 lines before
the kernel hung. The disk light got stuck on and there were
no response to things like sysrq.
The few lines displayed was about the fb, drm, and finally
the 3com network adapter. Then nothing more.
2.5.49 without this patch works. I use devfs & preempt,
the machine is UP and I use gcc-2.95.4 for compiling.
Helge Hafting
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Fbdev 2.5.49 BK fixes.
2002-11-27 11:04 ` Helge Hafting
@ 2002-11-27 17:49 ` James Simmons
2002-11-27 18:08 ` Helge Hafting
0 siblings, 1 reply; 8+ messages in thread
From: James Simmons @ 2002-11-27 17:49 UTC (permalink / raw)
To: Helge Hafting; +Cc: linux-fbdev-devel, linux-kernel
> I tried this patch, but it crashed during boot.
Any oops info?
> I have a
> 01:00.0 VGA compatible controller: ATI Technologies Inc 3D Rage Pro AGP
> 1X/2X (rev 5c)
>
> and use this in lilo.conf:
> image=/boot/2.5.49fb
> label=2.5.49fb
> append="video=atyfb:1280x1024-16@85"
Hm. Are you using a PPC or ix86 box? I will test this tonight.
> This got me a 160x64 framebuffer with yellow text on
> blue background. Nice, but only got about 10 lines before
> the kernel hung. The disk light got stuck on and there were
> no response to things like sysrq.
> The few lines displayed was about the fb, drm, and finally
> the 3com network adapter. Then nothing more.
Sounds like panning flipped put.
> 2.5.49 without this patch works. I use devfs & preempt,
> the machine is UP and I use gcc-2.95.4 for compiling.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Fbdev 2.5.49 BK fixes.
2002-11-27 17:49 ` James Simmons
@ 2002-11-27 18:08 ` Helge Hafting
2002-11-27 23:18 ` James Simmons
0 siblings, 1 reply; 8+ messages in thread
From: Helge Hafting @ 2002-11-27 18:08 UTC (permalink / raw)
To: James Simmons; +Cc: linux-fbdev-devel, linux-kernel
James Simmons wrote:
>
> > I tried this patch, but it crashed during boot.
>
> Any oops info?
No. The machine froze solid. No oops, no sysrq.
The reset button worked.
>
> > I have a
> > 01:00.0 VGA compatible controller: ATI Technologies Inc 3D Rage Pro AGP
> > 1X/2X (rev 5c)
> >
> > and use this in lilo.conf:
> > image=/boot/2.5.49fb
> > label=2.5.49fb
> > append="video=atyfb:1280x1024-16@85"
>
> Hm. Are you using a PPC or ix86 box? I will test this tonight.
i386. Specifically, a pentium II, compiled for pentium II.
> > This got me a 160x64 framebuffer with yellow text on
> > blue background. Nice, but only got about 10 lines before
> > the kernel hung. The disk light got stuck on and there were
> > no response to things like sysrq.
> > The few lines displayed was about the fb, drm, and finally
> > the 3com network adapter. Then nothing more.
>
> Sounds like panning flipped put.
>
Perhaps. It didn't look like it ended at the bottom of the
screen, but then it might have been panning at the wrong moment.
> > 2.5.49 without this patch works. I use devfs & preempt,
> > the machine is UP and I use gcc-2.95.4 for compiling.
Helge Hafting
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Fbdev 2.5.49 BK fixes.
2002-11-27 18:08 ` Helge Hafting
@ 2002-11-27 23:18 ` James Simmons
2002-11-28 8:32 ` Joseph Fannin
2002-11-28 8:35 ` Joseph Fannin
0 siblings, 2 replies; 8+ messages in thread
From: James Simmons @ 2002-11-27 23:18 UTC (permalink / raw)
To: Helge Hafting; +Cc: linux-fbdev-devel, linux-kernel
> No. The machine froze solid. No oops, no sysrq.
> The reset button worked.
VESA fbdev did this to me. I have no trouble with neofb. Strange???
I will track it down tonight.
> > Hm. Are you using a PPC or ix86 box? I will test this tonight.
> i386. Specifically, a pentium II, compiled for pentium II.
Hm. I have that same card and a similar machine.
> Perhaps. It didn't look like it ended at the bottom of the
> screen, but then it might have been panning at the wrong moment.
I have a MDA monitor and card. So I can setup mdacon and turn on
debugging in fbcon and trace threw it.
> > > 2.5.49 without this patch works. I use devfs & preempt,
> > > the machine is UP and I use gcc-2.95.4 for compiling.
>
> Helge Hafting
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Fbdev 2.5.49 BK fixes.
2002-11-27 23:18 ` James Simmons
@ 2002-11-28 8:32 ` Joseph Fannin
2002-12-02 21:11 ` [Linux-fbdev-devel] " James Simmons
2002-11-28 8:35 ` Joseph Fannin
1 sibling, 1 reply; 8+ messages in thread
From: Joseph Fannin @ 2002-11-28 8:32 UTC (permalink / raw)
To: James Simmons; +Cc: linux-kernel, linux-fbdev-devel
[-- Attachment #1: Type: text/plain, Size: 1062 bytes --]
On Wed, Nov 27, 2002 at 11:18:22PM +0000, James Simmons wrote:
>
> > No. The machine froze solid. No oops, no sysrq.
> > The reset button worked.
>
> VESA fbdev did this to me. I have no trouble with neofb. Strange???
> I will track it down tonight.
aty128fb works for me here with:
01:00.0 VGA compatible controller: ATI Technologies Inc Rage 128 PF/PRO AGP 4x TMDS
Thank you!
There are a few glitches, but I've been unable to pin down
anything serious as the fbdev patch's fault. I'm still playing with
things (like Antonio Daplas' patches). I'll give a more full report
later.
FWIW, the fbdev patch applies with a few minor offsets to 2.5.50
except for the attached patch, which I extracted from bk. So if you
apply this patch in *reverse* to a clean 2.5.50 tree, the fbdev patch
should then apply okay (patch complained about a reversed hunk in
fbcon.c, but it should be harmless, I think.)
--
Joseph Fannin
jhf@rivenstone.net
"Anyone who quotes me in their sig is an idiot." -- Rusty Russell.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Fbdev 2.5.49 BK fixes.
2002-11-27 23:18 ` James Simmons
2002-11-28 8:32 ` Joseph Fannin
@ 2002-11-28 8:35 ` Joseph Fannin
1 sibling, 0 replies; 8+ messages in thread
From: Joseph Fannin @ 2002-11-28 8:35 UTC (permalink / raw)
To: James Simmons; +Cc: linux-kernel, linux-fbdev-devel
[-- Attachment #1.1: Type: text/plain, Size: 290 bytes --]
Whoops, I forgot to attach the patch.
--
Joseph Fannin
jhf@rivenstone.net
"For future reference - don't anybody else try to send patches as vi
scripts, please. Yes, it's manly, but let's face it, so is bungee-jumping
with the cord tied to your testicles." -- Linus Torvalds
[-- Attachment #1.2: vga16.patch --]
[-- Type: text/plain, Size: 7653 bytes --]
diff -Nru a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c
--- a/drivers/video/vga16fb.c Thu Nov 28 03:03:45 2002
+++ b/drivers/video/vga16fb.c Thu Nov 28 03:03:45 2002
@@ -22,6 +22,7 @@
#include <linux/selection.h>
#include <linux/ioport.h>
#include <linux/init.h>
+#include <linux/interrupt.h>
#include <asm/io.h>
@@ -81,22 +82,33 @@
/* --------------------------------------------------------------------- */
static struct fb_var_screeninfo vga16fb_defined = {
- 640,480,640,480,/* W,H, W, H (virtual) load xres,xres_virtual*/
- 0,0, /* virtual -> visible no offset */
- 4, /* depth -> load bits_per_pixel */
- 0, /* greyscale ? */
- {0,0,0}, /* R */
- {0,0,0}, /* G */
- {0,0,0}, /* B */
- {0,0,0}, /* transparency */
- 0, /* standard pixel format */
- FB_ACTIVATE_NOW,
- -1,-1,
- 0,
- 39721, 48, 16, 39, 8,
- 96, 2, 0, /* No sync info */
- FB_VMODE_NONINTERLACED,
- {0,0,0,0,0,0}
+ .xres = 640,
+ .yres = 480,
+ .xres_virtual = 640,
+ .yres_virtual = 480,
+ .bits_per_pixel = 4,
+ .activate = FB_ACTIVATE_NOW,
+ .height = -1,
+ .width = -1,
+ .pixclock = 39721,
+ .left_margin = 48,
+ .right_margin = 16,
+ .upper_margin = 39,
+ .lower_margin = 8,
+ .hsync_len = 96,
+ .vsync_len = 2,
+ .vmode = FB_VMODE_NONINTERLACED,
+};
+
+static struct fb_fix_screeninfo vga16fb_fix __initdata = {
+ .id = "VGA16 VGA",
+ .smem_start = VGA_FB_PHYS,
+ .smem_len = VGA_FB_PHYS_LEN,
+ .type = FB_TYPE_VGA_PLANES,
+ .visual = FB_VISUAL_PSEUDOCOLOR,
+ .xpanstep = 8,
+ .ypanstep = 1,
+ .line_length = 640 / 8,
};
static struct display disp;
@@ -121,69 +133,22 @@
#endif
}
-static int vga16fb_update_var(int con, struct fb_info *info)
-{
- vga16fb_pan_var(info, &fb_display[con].var);
- return 0;
-}
-
-static int vga16fb_get_fix(struct fb_fix_screeninfo *fix, int con,
- struct fb_info *info)
-{
- struct display *p;
-
- if (con < 0)
- p = &disp;
- else
- p = fb_display + con;
-
- memset(fix, 0, sizeof(struct fb_fix_screeninfo));
- strcpy(fix->id,"VGA16 VGA");
-
- fix->smem_start = VGA_FB_PHYS;
- fix->smem_len = VGA_FB_PHYS_LEN;
- fix->type = FB_TYPE_VGA_PLANES;
- fix->visual = FB_VISUAL_PSEUDOCOLOR;
- fix->xpanstep = 8;
- fix->ypanstep = 1;
- fix->ywrapstep = 0;
- fix->line_length = p->var.xres_virtual / 8;
- return 0;
-}
-
-static int vga16fb_get_var(struct fb_var_screeninfo *var, int con,
- struct fb_info *info)
-{
- if(con==-1)
- memcpy(var, &vga16fb_defined, sizeof(struct fb_var_screeninfo));
- else
- *var=fb_display[con].var;
- return 0;
-}
-
static void vga16fb_set_disp(int con, struct vga16fb_info *info)
{
- struct fb_fix_screeninfo fix;
- struct display *display;
-
- if (con < 0)
- display = &disp;
- else
- display = fb_display + con;
+ struct display *display = (con < 0) ? info->fb_info.disp : (fb_display + con);
-
- vga16fb_get_fix(&fix, con, &info->fb_info);
-
- display->visual = fix.visual;
- display->type = fix.type;
- display->type_aux = fix.type_aux;
- display->ypanstep = fix.ypanstep;
- display->ywrapstep = fix.ywrapstep;
- display->line_length = fix.line_length;
- display->next_line = fix.line_length;
display->can_soft_blank = 1;
+ display->dispsw_data = NULL;
+ display->var = info->fb_info.var;
display->inverse = 0;
+ /*
+ * If we are setting all the virtual consoles, also set
+ * the defaults used to create new consoles.
+ */
+ if (con < 0 || info->fb_info.var.activate & FB_ACTIVATE_ALL)
+ info->fb_info.disp->var = info->fb_info.var;
+
if (info->isVGA)
display->dispsw = &fbcon_vga_planes;
else
@@ -500,13 +465,9 @@
{
struct vga16fb_info *info = (struct vga16fb_info*)fb;
struct vga16fb_par par;
- struct display *display;
+ struct display *display = (con < 0) ? fb->disp : (fb_display + con);
int err;
- if (con < 0)
- display = fb->disp;
- else
- display = fb_display + con;
if ((err = vga16fb_decode_var(var, &par, info)) != 0)
return err;
vga16fb_encode_var(var, &par, info);
@@ -552,25 +513,6 @@
outb_p(0x20, 0x3C0); /* unblank screen */
}
-static int vga16_getcolreg(unsigned regno, unsigned *red, unsigned *green,
- unsigned *blue, unsigned *transp,
- struct fb_info *fb_info)
-{
- /*
- * Read a single color register and split it into colors/transparent.
- * Return != 0 for invalid regno.
- */
-
- if (regno >= 16)
- return 1;
-
- *red = palette[regno].red;
- *green = palette[regno].green;
- *blue = palette[regno].blue;
- *transp = 0;
- return 0;
-}
-
static void vga16_setpalette(int regno, unsigned red, unsigned green, unsigned blue)
{
outb(regno, dac_reg);
@@ -615,19 +557,6 @@
return 0;
}
-static int vga16fb_get_cmap(struct fb_cmap *cmap, int kspc, int con,
- struct fb_info *info)
-{
- if (con == info->currcon) /* current console? */
- return fb_get_cmap(cmap, kspc, vga16_getcolreg, info);
- else if (fb_display[con].cmap.len) /* non default colormap? */
- fb_copy_cmap(&fb_display[con].cmap, cmap, kspc ? 0 : 2);
- else
- fb_copy_cmap(fb_default_cmap(16),
- cmap, kspc ? 0 : 2);
- return 0;
-}
-
static int vga16fb_pan_display(struct fb_var_screeninfo *var, int con,
struct fb_info *info)
{
@@ -811,10 +740,8 @@
static struct fb_ops vga16fb_ops = {
.owner = THIS_MODULE,
- .fb_get_fix = vga16fb_get_fix,
- .fb_get_var = vga16fb_get_var,
.fb_set_var = vga16fb_set_var,
- .fb_get_cmap = vga16fb_get_cmap,
+ .fb_get_cmap = gen_get_cmap,
.fb_set_cmap = gen_set_cmap,
.fb_setcolreg = vga16fb_setcolreg,
.fb_pan_display =vga16fb_pan_display,
@@ -839,27 +766,6 @@
return 0;
}
-static int vga16fb_switch(int con, struct fb_info *fb)
-{
- struct vga16fb_par par;
- struct vga16fb_info *info = (struct vga16fb_info*)fb;
-
- /* Do we have to save the colormap? */
- if (fb_display[fb->currcon].cmap.len)
- fb_get_cmap(&fb_display[fb->currcon].cmap, 1, vga16_getcolreg,
- fb);
-
- fb->currcon = con;
- vga16fb_decode_var(&fb_display[con].var, &par, info);
- vga16fb_set_par(&par, info);
- vga16fb_set_disp(con, info);
-
- /* Install new colormap */
- do_install_cmap(con, fb);
-/* vga16fb_update_var(con, fb); */
- return 1;
-}
-
int __init vga16fb_init(void)
{
int i,j;
@@ -895,18 +801,21 @@
disp.var = vga16fb_defined;
- /* name should not depend on EGA/VGA */
- strcpy(vga16fb.fb_info.modename, "VGA16 VGA");
+ strcpy(vga16fb.fb_info.modename, vga16fb_fix.id);
vga16fb.fb_info.changevar = NULL;
vga16fb.fb_info.node = NODEV;
+ vga16fb.fb_info.var = vga16fb_defined;
+ vga16fb.fb_info.fix = vga16fb_fix;
vga16fb.fb_info.fbops = &vga16fb_ops;
vga16fb.fb_info.screen_base = vga16fb.video_vbase;
vga16fb.fb_info.disp=&disp;
vga16fb.fb_info.currcon = -1;
- vga16fb.fb_info.switch_con=&vga16fb_switch;
- vga16fb.fb_info.updatevar=&vga16fb_update_var;
+ vga16fb.fb_info.switch_con=&gen_switch;
+ vga16fb.fb_info.updatevar=&gen_update_var;
vga16fb.fb_info.flags=FBINFO_FLAG_DEFAULT;
vga16fb_set_disp(-1, &vga16fb);
+
+ fb_alloc_cmap(&vga16fb.fb_info.cmap, 16, 0);
if (register_framebuffer(&vga16fb.fb_info)<0) {
iounmap(vga16fb.video_vbase);
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Linux-fbdev-devel] Re: Fbdev 2.5.49 BK fixes.
2002-11-28 8:32 ` Joseph Fannin
@ 2002-12-02 21:11 ` James Simmons
0 siblings, 0 replies; 8+ messages in thread
From: James Simmons @ 2002-12-02 21:11 UTC (permalink / raw)
To: Joseph Fannin; +Cc: linux-kernel, linux-fbdev-devel
> aty128fb works for me here with:
>
> 01:00.0 VGA compatible controller: ATI Technologies Inc Rage 128 PF/PRO AGP 4x TMDS
>
> Thank you!
Great. I made more inprovements with my latest patch. Give it a try.
> There are a few glitches, but I've been unable to pin down
> anything serious as the fbdev patch's fault. I'm still playing with
> things (like Antonio Daplas' patches). I'll give a more full report
> later.
I just intergrated a bunch of his work. The subsystem is starting to
really take shape.
> FWIW, the fbdev patch applies with a few minor offsets to 2.5.50
> except for the attached patch, which I extracted from bk. So if you
> apply this patch in *reverse* to a clean 2.5.50 tree, the fbdev patch
> should then apply okay (patch complained about a reversed hunk in
> fbcon.c, but it should be harmless, I think.)
I noticed. My new patch fixes that.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-12-02 21:11 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20021122100215.GA4998@pazke.ipt>
2002-11-26 23:22 ` Fbdev 2.5.49 BK fixes James Simmons
2002-11-27 11:04 ` Helge Hafting
2002-11-27 17:49 ` James Simmons
2002-11-27 18:08 ` Helge Hafting
2002-11-27 23:18 ` James Simmons
2002-11-28 8:32 ` Joseph Fannin
2002-12-02 21:11 ` [Linux-fbdev-devel] " James Simmons
2002-11-28 8:35 ` Joseph Fannin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).