Help re Frame Buffer/Console Problems

Started by Mark Fortescue on Oct 29, 2004 · 12 messages from 4 authors · Last reply Nov 3, 2004

open the first message on its own page

Message details and related content
Hi all,

I have been trying to get a CG3 sparc clone up and running with linux.
Under 2.2.26, the console is fine. During the development of the
2.5.x/2.6.x frame buffer system the CG3 support got broken. I have managed
to track done one of the problems (the blanking code had some typing
errors in it) and this gave me a logo + black screen and cursor using a
linux-2.2.8.1 kernel. Still no console text.

Given that 2.2.10-rc1-bk6 is available, I have downloaded and applied the
appropriate patches and made some additional mods to keep the
compiler/linker happy. Now I have a black console, no text, logo or cursor
and if I redirect the console output to a serial port I get the following:
-------------------------------------------------------------------------
b vmlinux.sun4c
Probing Memory Bank #: 1 2 3 4 5 
Booting from: sd(0,0,0)vmlinux.sun4c 
root on sd0a fstype 4.2
Size: 1990912+0+117384 bytes
PROMLIB: Sun Boot Prom Version 0 Revision 0
Linux version 2.6.10-MTF (mark@fw) (gcc version 3.4.2) #3 Fri Oct 29
18:04:22 BST 2004
ARCH: SUN4C
TYPE: Sun4c SparcStation 1
Ethernet address: 0:80:f1:0:5:89
Loading sun4c MMU routines
Boot time fixup v1.6. 4/Mar/98 Jakub Jelinek (jj@ultra.linux.cz). Patching
kernel for sun4c
SUN4C: 79 mmu entries for the kernel
Booting Linux...
auxio register: 0xffd0e000
Built 1 zonelists
Kernel command line: -p
ip=10.1.1.3:10.1.1.4:10.1.1.3:255.255.255.0:sparc3::off root=/dev/sda4
rootfstype=ufs rootflags=ufstype=sunos 
PID hash table entries: 64 (order: 6, 1024 bytes)
time_init: reg address: fe001000
Console: mono PROM 80x34
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)

89 more lines

Message details and related content
On Fri, Oct 29, 2004 at 07:22:11PM +0100, Mark Fortescue wrote:
I have been trying to get a CG3 sparc clone up and running with linux.
Under 2.2.26, the console is fine. During the development of the
2.5.x/2.6.x frame buffer system the CG3 support got broken. I have managed
to track done one of the problems (the blanking code had some typing
errors in it) and this gave me a logo + black screen and cursor using a
linux-2.2.8.1 kernel. Still no console text.
Given that 2.2.10-rc1-bk6 is available, I have downloaded and applied the
appropriate patches and made some additional mods to keep the
compiler/linker happy. Now I have a black console, no text, logo or cursor
and if I redirect the console output to a serial port I get the following:
Okay, sounds like a relatively major disaster. =(


-- wli

Re: [Linux-fbdev-devel] Help re Frame Buffer/Console Problems

Message details and related content
On Saturday 30 October 2004 02:22, Mark Fortescue wrote:
Hi all,

I have been trying to get a CG3 sparc clone up and running with linux.
Under 2.2.26, the console is fine. During the development of the
2.5.x/2.6.x frame buffer system the CG3 support got broken. I have managed
to track done one of the problems (the blanking code had some typing
errors in it) and this gave me a logo + black screen and cursor using a
linux-2.2.8.1 kernel. Still no console text.

Given that 2.2.10-rc1-bk6 is available, I have downloaded and applied the
appropriate patches and made some additional mods to keep the
compiler/linker happy. Now I have a black console, no text, logo or cursor
and if I redirect the console output to a serial port I get the following:
I'm assuming 2.6.10-rc1-bk6...

Make sure you correctly fill up the red, green, blue, and transp fields
in all->info.var.  You can do it in sbufsfb_fill_var, or somewhere
within cg3.c before the register_framebuffer() part.

As a reminder, info->var and info->fix must be valid prior to framebuffer
registration.

Tony

Re: [Linux-fbdev-devel] Help re Frame Buffer/Console Problems

Message details and related content
Hi all,

Thanks for the info Antonino. I see you spotted my typing error. Yes it is
the 2.6.10-rc1-bk6 kernel. The oter error is the 2.2.8.1. It should be
2.6.8.1.
 
The cgthree driver does not currently set up the all->info.var.red,
all->info.var.green or all->info.var.blue structures. Putting a value of 8
in the length field of these structures (correct for the cgthree) does get
me my logo back but I am still getting black on black text. It makes it
very difficult to read. It is begining to look like there is something
werid going on with the colour pallet stuf for PSEUDO_COLOUR.

Regards
	Mark Fortescue.

On Sat, 30 Oct 2004, Antonino A. Daplas wrote:
On Saturday 30 October 2004 02:22, Mark Fortescue wrote:
quoted
Hi all,

I have been trying to get a CG3 sparc clone up and running with linux.
Under 2.2.26, the console is fine. During the development of the
2.5.x/2.6.x frame buffer system the CG3 support got broken. I have managed
to track done one of the problems (the blanking code had some typing
errors in it) and this gave me a logo + black screen and cursor using a
linux-2.2.8.1 kernel. Still no console text.

Given that 2.2.10-rc1-bk6 is available, I have downloaded and applied the
appropriate patches and made some additional mods to keep the
compiler/linker happy. Now I have a black console, no text, logo or cursor
and if I redirect the console output to a serial port I get the following:
I'm assuming 2.6.10-rc1-bk6...

Make sure you correctly fill up the red, green, blue, and transp fields
in all->info.var.  You can do it in sbufsfb_fill_var, or somewhere
within cg3.c before the register_framebuffer() part.

As a reminder, info->var and info->fix must be valid prior to framebuffer
registration.

Tony


Re: [Linux-fbdev-devel] Help re Frame Buffer/Console Problems

Message details and related content
On Tuesday 02 November 2004 01:32, Mark Fortescue wrote:
Hi all,

Thanks for the info Antonino. I see you spotted my typing error. Yes it is
the 2.6.10-rc1-bk6 kernel. The oter error is the 2.2.8.1. It should be
2.6.8.1.

The cgthree driver does not currently set up the all->info.var.red,
all->info.var.green or all->info.var.blue structures. Putting a value of 8
in the length field of these structures (correct for the cgthree) does get
me my logo back but I am still getting black on black text. It makes it
very difficult to read. It is begining to look like there is something
werid going on with the colour pallet stuf for PSEUDO_COLOUR.
I doubt that the problem is at the driver layer since you were able to
see the logo. It's probably higher up.

Try this mod, hardwire the foreground color to 0x07.

Edit drivers/video/console/bitblit.c:bit_putcs() and change this line:

image.fg_color = fg;
image.bg_color = bg;

to

image.fg_color = 0x07070707;
image.bg_color = 0x0;

You can also try the reverse:

image.fg_color = 0x0;
image.bg_color = 0x07070707

If you get visible text, the problem is either in fbcon.c or vt.c.

Tony

Re: [Linux-fbdev-devel] Help re Frame Buffer/Console Problems

Message details and related content
On Tuesday 02 November 2004 00:46, Antonino A. Daplas wrote:
On Tuesday 02 November 2004 01:32, Mark Fortescue wrote:
quoted
Hi all,

Thanks for the info Antonino. I see you spotted my typing error. Yes it is
the 2.6.10-rc1-bk6 kernel. The oter error is the 2.2.8.1. It should be
2.6.8.1.

The cgthree driver does not currently set up the all->info.var.red,
all->info.var.green or all->info.var.blue structures. Putting a value of 8
in the length field of these structures (correct for the cgthree) does get
me my logo back but I am still getting black on black text. It makes it
very difficult to read. It is begining to look like there is something
werid going on with the colour pallet stuf for PSEUDO_COLOUR.
I saw similiar problems with the stifb driver on HPPA. 
Changing the driver's pseudo_palette[] struct to support 256 colors solved this problem.
But there might be a problem in higher levels as well....

Helge

Re: [Linux-fbdev-devel] Help re Frame Buffer/Console Problems

Message details and related content
Hi all,

I have already hard wired the fg and bg colours. I have got to the point 
where I am checking the cfbimgblt code where it converts the mono bit font
image data to the 8bpp pseudo colour screen image data. It is looking
like there may be a problem with sign extension at this level as the
pixel value being used apears to be 255.

I have changed a char *pt to a u8 *pt to see if this helps.

Regards
	Mark Fortescue.

On Tue, 2 Nov 2004, Antonino A. Daplas wrote:
On Tuesday 02 November 2004 01:32, Mark Fortescue wrote:
quoted
Hi all,

Thanks for the info Antonino. I see you spotted my typing error. Yes it is
the 2.6.10-rc1-bk6 kernel. The oter error is the 2.2.8.1. It should be
2.6.8.1.

The cgthree driver does not currently set up the all->info.var.red,
all->info.var.green or all->info.var.blue structures. Putting a value of 8
in the length field of these structures (correct for the cgthree) does get
me my logo back but I am still getting black on black text. It makes it
very difficult to read. It is begining to look like there is something
werid going on with the colour pallet stuf for PSEUDO_COLOUR.
I doubt that the problem is at the driver layer since you were able to
see the logo. It's probably higher up.

Try this mod, hardwire the foreground color to 0x07.

Edit drivers/video/console/bitblit.c:bit_putcs() and change this line:

image.fg_color = fg;
image.bg_color = bg;

to

image.fg_color = 0x07070707;
image.bg_color = 0x0;

You can also try the reverse:

image.fg_color = 0x0;
image.bg_color = 0x07070707

If you get visible text, the problem is either in fbcon.c or vt.c.

Tony

Re: [Linux-fbdev-devel] Help re Frame Buffer/Console Problems

Message details and related content
Hi all,

I have identified what is going on. My CG3 console uses the same font and
exactly overlaps prom console. [I have re-inserted the console margin code
for my CG3 driver]. The timing is such that the prom overwrites the
console text (using colour 255) a fraction later than the fbcon code.

The two problems to be solved are (apart from seting the red,green and
blue structures up for the cg series fb cards):

1) The prom write (from -p) needs to be disabled as soon as an alternative
console becomes active (either prom console, fbcon console or serial
console). This has probably been the major cause of hassel.

2) The restore pallet function (see cgsix.c in the 2.2.x or 2.4.x kernels)
needs to be re-introduced in some form and called when exiting fbcon so
that the prom does not end up as black on black. My prom uses fg=255,
bg=0. Does any one know if this is standard for all sparc boot proms.

I need to tidy up my code before I start work on the first of these two
problems. The second one should not catch me out as I am using colour
255 as my margin colour and it is set to "Dark Slate Grey" so I do not 
have a black on black prom console.

If any one wants a linux 2.6.10 CG3 driver with software margins then let
me know and I will post an appropriate patch.

Regards
	Mark Fortescue.

On Tue, 2 Nov 2004, Antonino A. Daplas wrote:
On Tuesday 02 November 2004 01:32, Mark Fortescue wrote:
quoted
Hi all,

Thanks for the info Antonino. I see you spotted my typing error. Yes it is
the 2.6.10-rc1-bk6 kernel. The oter error is the 2.2.8.1. It should be
2.6.8.1.

The cgthree driver does not currently set up the all->info.var.red,
all->info.var.green or all->info.var.blue structures. Putting a value of 8
in the length field of these structures (correct for the cgthree) does get
me my logo back but I am still getting black on black text. It makes it
very difficult to read. It is begining to look like there is something
werid going on with the colour pallet stuf for PSEUDO_COLOUR.
I doubt that the problem is at the driver layer since you were able to
see the logo. It's probably higher up.

Try this mod, hardwire the foreground color to 0x07.

Edit drivers/video/console/bitblit.c:bit_putcs() and change this line:

image.fg_color = fg;
image.bg_color = bg;

to

image.fg_color = 0x07070707;
image.bg_color = 0x0;

You can also try the reverse:

image.fg_color = 0x0;
image.bg_color = 0x07070707

If you get visible text, the problem is either in fbcon.c or vt.c.

Tony

Re: [Linux-fbdev-devel] Help re Frame Buffer/Console Problems

Message details and related content
Will this work for a kernel Panic ?

Mark

On Wed, 3 Nov 2004, Antonino A. Daplas wrote:
On Wednesday 03 November 2004 02:03, Mark Fortescue wrote:
quoted
Hi all,

I have identified what is going on. My CG3 console uses the same font and
exactly overlaps prom console. [I have re-inserted the console margin code
for my CG3 driver]. The timing is such that the prom overwrites the
console text (using colour 255) a fraction later than the fbcon code.

The two problems to be solved are (apart from seting the red,green and
blue structures up for the cg series fb cards):

1) The prom write (from -p) needs to be disabled as soon as an alternative
console becomes active (either prom console, fbcon console or serial
console). This has probably been the major cause of hassel.

2) The restore pallet function (see cgsix.c in the 2.2.x or 2.4.x kernels)
needs to be re-introduced in some form and called when exiting fbcon so
that the prom does not end up as black on black. My prom uses fg=255,
You can implement a cg3fb_open() and cg3fb_release() hooks and set up a
use_count field. You increment the count on every open, decrement on every
release. Then restore whatever on the last release. Optionally, you can even
do hardware inits on the first open.

Tony 

Re: [Linux-fbdev-devel] Help re Frame Buffer/Console Problems

Message details and related content
I have just tested it and at the moment it does not. I suspect that
something needs to be registered in the 'panic_notifier_list' to do some
basic resets on the colour palette.

For the moment I will just ensure that colour 255 <> colour 0 by some
visible margin (Black/Dark Slate).

Mark.

On Wed, 3 Nov 2004, Antonino A. Daplas wrote:
On Wednesday 03 November 2004 06:57, Mark Fortescue wrote:
quoted
Will this work for a kernel Panic ?
Probably not, unless the 'Panic' tells fbcon to release the console and 
tells promcon to take over the console again.  That in itself is problematic
as fbcon cannot be safely unloaded yet.

Tony

Re: [Linux-fbdev-devel] Help re Frame Buffer/Console Problems

Message details and related content
On Wednesday 03 November 2004 02:03, Mark Fortescue wrote:
Hi all,

I have identified what is going on. My CG3 console uses the same font and
exactly overlaps prom console. [I have re-inserted the console margin code
for my CG3 driver]. The timing is such that the prom overwrites the
console text (using colour 255) a fraction later than the fbcon code.

The two problems to be solved are (apart from seting the red,green and
blue structures up for the cg series fb cards):

1) The prom write (from -p) needs to be disabled as soon as an alternative
console becomes active (either prom console, fbcon console or serial
console). This has probably been the major cause of hassel.

2) The restore pallet function (see cgsix.c in the 2.2.x or 2.4.x kernels)
needs to be re-introduced in some form and called when exiting fbcon so
that the prom does not end up as black on black. My prom uses fg=255,
You can implement a cg3fb_open() and cg3fb_release() hooks and set up a
use_count field. You increment the count on every open, decrement on every
release. Then restore whatever on the last release. Optionally, you can even
do hardware inits on the first open.

Tony 




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help