Skip to contentSkip to conversation

afbinit failure with 2.6.15 kernels (can no longer load Elite

DISCUSSION Ferris McCormick 3 participants 6 messages Jan 30, 2006 – Jan 31, 2006

lore
Share & tools
lore
#0 lore raw

With kernel-2.6.15 series, the program for loading Elite graphics microcode fails:

Is this a known problem, or is the fix for afbinit known? With the 2.6.15 kernel series (on SB1000), an attempt to load the Elite graphics microcode with the afbinit program:
/* $Id: afbinit.c,v 1.1.1.1 1999/09/08 06:42:36 davem Exp $ (e.g., using
afbinit /dev/fb/0 /usr/lib/afb.ucode)
results in
mmap user regs: Invalid argument --- this comes from this bit of code:
====================
uregs = mmap(0, 0x2000,

             PROT_READ | PROT_WRITE,
             MAP_PRIVATE,
             afb_fd,
             0x04000000);

====================

I'd be happy to just fix it if I knew what the mmap call should look like with this kernel, but I don't. (The Elite did open OK; to get this far,
afb_fd = open(afb_fname, O_RDWR);
has to have worked.

Regards,
Ferris

Signature · 2 lines
Ferris McCormick (P44646, MI) <[email protected]>
Developer, Gentoo Linux (Sparc, Devrel)
#1 lore raw

From: Ferris McCormick <[email protected]>
Date: Mon, 30 Jan 2006 19:34:26 +0000

Quoted 5 lines

With kernel-2.6.15 series, the program for loading Elite graphics microcode fails:

Is this a known problem, or is the fix for afbinit known?

It's a known problem, something is buggered up in afbinit because the change made to the kernel that creates this problem is totally correct.

I'll try to look into it soon, I have AFB hardware here on which I can reproduce.

#2 lore raw
In reply to Ferris McCormick
Quoted 4 lines · David S. Miller

From: Ferris McCormick <[email protected]>
Date: Mon, 30 Jan 2006 19:34:26 +0000

Quoted 1 line
Quoted 8 lines
Quoted 4 lines

With kernel-2.6.15 series, the program for loading Elite graphics microcode fails:

Is this a known problem, or is the fix for afbinit known?

It's a known problem, something is buggered up in afbinit because the change made to the kernel that creates this problem is totally correct.

After looking at the description of the problem, I recalled that I've seen something like this reported on the debian-sparc list. It turns out that we have a bug #346085 [0] filed exactly for this issue, and Ian Viemeister has recently submitted a patch [1] for afbinit which reportedly fixes this problem. I don't have a possibility to test it myself.

[0] http://bugs.debian.org/346085
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi/afbinit.c.diff?bug46085;msg;att=1

Best regards,

Jurij Smakov [email protected]
Key: http://www.wooyd.org/pgpkey/ KeyID: C99E03CC

#3 lore raw
In reply to Ferris McCormick

From: Jurij Smakov <[email protected]>
Date: Mon, 30 Jan 2006 19:15:36 -0800 (PST)

Quoted 8 lines

After looking at the description of the problem, I recalled that I've seen something like this reported on the debian-sparc list. It turns out that we have a bug #346085 [0] filed exactly for this issue, and Ian Viemeister has recently submitted a patch [1] for afbinit which reportedly fixes this problem. I don't have a possibility to test it myself.

[0] http://bugs.debian.org/346085
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi/afbinit.c.diff?bug46085;msg;att=1

That patch looks good to me.

Ferris can you test that out and say if it works for you as well? Thanks.

#4 lore raw
In reply to Ferris McCormick
Quoted 9 lines · David S. Miller

From: Jurij Smakov <[email protected]>
Date: Mon, 30 Jan 2006 19:15:36 -0800 (PST)

Quoted 6 lines

After looking at the description of the problem, I recalled that I've seen something like this reported on the debian-sparc list. It turns out that we have a bug #346085 [0] filed exactly for this issue, and Ian Viemeister has recently submitted a patch [1] for afbinit which reportedly fixes this problem. I don't have a possibility to test it myself.

Quoted 7 lines
Quoted 2 lines

[0] http://bugs.debian.org/346085
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi/afbinit.c.diff?bug=346085;msg=10;att=1

That patch looks good to me.

Ferris can you test that out and say if it works for you as well? Thanks.

Yes; will do later today.

Quoted 4 lines

-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 2 lines
Ferris McCormick (P44646, MI) <[email protected]>
Developer, Gentoo Linux (Sparc, Devrel)
#5 lore raw
In reply to Ferris McCormick
Quoted 9 lines · David S. Miller

From: Jurij Smakov <[email protected]>
Date: Mon, 30 Jan 2006 19:15:36 -0800 (PST)

Quoted 6 lines

After looking at the description of the problem, I recalled that I've seen something like this reported on the debian-sparc list. It turns out that we have a bug #346085 [0] filed exactly for this issue, and Ian Viemeister has recently submitted a patch [1] for afbinit which reportedly fixes this problem. I don't have a possibility to test it myself.

Quoted 7 lines
Quoted 2 lines

[0] http://bugs.debian.org/346085
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi/afbinit.c.diff?bug=346085;msg=10;att=1

That patch looks good to me.

Ferris can you test that out and say if it works for you as well? Thanks.

Tested.
Patch (MAP_PRIVATE ---> MAP_SHARED) works for me (SB1000-SMP, Elite 3dm3) with kernels 2.6.13-r3, 2.6.15-r1. Thanks.

GENTOO SPARC PEOPLE: I will be making a revision bump (as ~sparc) to afbinit to add this patch. If you try it and experience any difficulties, please let me know.

Quoted 4 lines

-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Regards,
Ferris

Signature · 2 lines
Ferris McCormick (P44646, MI) <[email protected]>
Developer, Gentoo Linux (Sparc, Devrel)