board with broken vga ...
Quoted 10 lines · Sven
Quoted 8 lines · PEtr
thought that:
take_over_console->update_screen(x)->redraw_screen(x,0)->
(1) setvc_origintovc_screenbufinset_origin()
(2) paint picture throughdo_update_region()->con_getxy,con_putcsvc_screenbufis accessed through screenbuf macro fromconsole_macros.h. It is very hard to find anything inconsole.c. I use simple rule:
all X variables you see in function arevc_Xmembers of vt struct unless you see definition of X on your screen.
Quoted 3 lines
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_switchandvgacon_save_screen.
drivers/char/console.c:set_origin(), vc_resize(), ...
Quoted 1 line
is
vc_screenbufstill 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.
Quoted 1 line
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.
Quoted 3 lines
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
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