|
From: James S. <jsi...@tr...> - 2002-04-30 17:59:40
|
> The problem is, essentially, that the outgoing VGA console and the incoming FB > console are the same card. Initialise that card to a graphics mode and *blam* > the card remaps to the graphics mode and fishing around in the text mode > screen memory to find the contents of the outgoing console produces random > garbage. Correct. On ix86 before you set the video hardware we are at 0xA000 in text mode. Once you change to graphics mode it is somewhere in PCI memory space, plus the data format is completely different. Then calling register_framebuffer then calls take_over_console whcih in turn calls the old video driver (vgacon) to grab the data (save_screen). Now that the hardware is in a different state the data is invalid. Then it updates the screen with the new data. > So Antonio's suggestion that the card should not be in graphics mode when > registering the FB is correct; registering needs to happen before the card is > switched away from VGA mode in any way. Simply removing the call to do_set_var > doesn't work for pm2fb; I think too much initialisation has happened by then. > Sven, pmfb is (I think) similar in this respect; any ideas? The key is to not touch the hardware at all before register_framebuffer. fbcon_init could do it instead. The problem we have to watch out for is con_switch. This is where alot of problems lie. |