Re: Re: board with broken vga ...

2 messages, 2 authors, 2002-07-22 · open the first message on its own page

Re: Re: board with broken vga ...

From: Petr Vandrovec <hidden>
Date: 2002-07-22 17:55:04

On 22 Jul 02 at 19:46, Sven wrote:
PEtr wrote : 
quoted
thought that:
  take_over_console -> update_screen(x) -> redraw_screen(x,0) ->
(1) set vc_origin to vc_screenbuf in set_origin()
(2) paint picture through do_update_region() -> con_getxy, con_putcs
vc_screenbuf is accessed through screenbuf macro from console_macros.h.
It is very hard to find anything in console.c. I use simple rule:
all X variables you see in function are vc_X members of vt struct unless
you see definition of X on your screen.
Well, i did search for screenbuf and not vc_screenbuf, and i did find the macros.

I did not find any reference in anything excepth vgacon_switch and vgacon_save_screen.
drivers/char/console.c:set_origin(), vc_resize(), ...
 
is vc_screenbuf still part of the framebuffer memory, i thought it was some other main memory, a ...
vc_screenbuf is alloc_bootmem() or kmalloc(if screen resize happens) memory.
vgacon uses its own vgacon_set_origin(), which sets vc_origin to
VGA framebuffer, while with fbcon it sets vc_origin to vc_screenbuf.
BAsically, i am now sure that i copy the right data to the screenbuf (well for the character data, i just use empty attributes, is that ok for now ?, where can i find the attribute format ?).
scr_write() will take a care of byteswapping. If in 8bit characters,
upper 8 bits are attr, low 8 bits is character.
But it seems the problem is when copying the stuff back to the screen that something goes wrong.

I suspect that it is not the correct data (the one in screenbuf) that is taken or something like that.
Just idea: force your fbdev to use same resolution as vgacon
(80x25, 640x400, or change vgacon resolution to 80x30 if your fbdev uses
640x480) so that vc_resize path is not triggered. It does some copying
too.
                                                            Petr
                                                            


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

Re: Re: board with broken vga ...

From: Sven <hidden>
Date: 2002-07-22 19:58:54

Hello, ...

I did a bit more looking, and found that :

Jul 22 21:49:32 iliana kernel: SVEN : c->vc_screenbuf is -1055775808

screen buffer is set to that when i overwrite the vgacon save_scree function, and here i save
it (printed with %ld).

Jul 22 21:49:32 iliana kernel: SVEN : set_origin : screenbuf is -941350912.
Jul 22 21:49:32 iliana kernel: SVEN : set_origin : origin is -1072968800.

when set_origin is first called (not from do_update_screen) after that, it held this values.

Clearly the screenbuf is not the same.

(and contains only garbage).

the nredraw_screen is called, which calls again set_origin, and then calls 
do_update_region as follows :

Jul 22 21:49:32 iliana kernel: SVEN : do_update_region : + start = -941350912, count = 3700

here we see that the screenbuf used is the wrongly set one, 
not the one i copied the stuff to.

Mmm, i suppose that what happens is that the screenbuf is different 
for fbcon and vgacon or something such, and this seems clearly the reason
for lot of garbage appearing on my screen, is it not ?

Friendly,

Sven Luther:wq


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help