Messages in this thread Patch in this message | | | Date | Wed, 9 Aug 2000 10:50:10 +0200 | From | Petr Vandrovec <> | Subject | [PATCH] Re: black screen in X, linux-2.4.0-test5 |
| |
On 9 Aug 00 at 12:30, Nathan Hand wrote: > > > > - set_palette(currcons); > > > > do_update_region(currcons, origin, screenbuf_size/2); > > > > } > > > > } > > > > Hi Dieter and others, can you try this instead? Doing set_palette() (and > > set_origin too if we are talking about it) before con_switch is severely > > broken. Old code, before moving set_palette, did set_palette unconditionally > > even when KD_GRAPHICS. Code below restores this behavior, but still does > > set_palette() after console switch. Please tell me whether it fixes your > > problem too (if not, then X server must be fixed... if yes, then I believe > > that this is THE ONE CORRECT > Could you discuss further on how the X server is broken here? I'm not > denying the X server is broken, but I'd like to know in what way it's > broken so that it can be fixed.
Hmm.I'm looking into vgacon and I just cannot get idea why ordering of vgacon_switch and vga_set_palette can matter, as vgacon_switch is simple memcpy() and vga_set_palette just programs palette... Looking at code again... Oops. Hey, James made a bug... Code in console.c should read
if (redraw) { int updateregion; set_origin(currcons); updateregion = sw->con_switch(vc_cons[currcons].d); set_palette(currcons); if (updateregion && (vcmode != KD_GRAPHICS)) do_update_region(currcons, origin, screenbuf_size / 2); }
as con_switch does not return success/failure, but it returns whether screen was repainted by con_switch (0) or whether update_region should be invoked (1)... I believe that it will solve your problem.
If it solves your problem, tell me and I'll resend patch below to Linus. Best regards, Petr Vandrovec vandrove@vc.cvut.cz
--- linux/drivers/char/console.c Wed Jul 19 00:57:28 2000 +++ linux/drivers/char/console.c Wed Aug 9 10:44:35 2000 @@ -586,12 +586,14 @@ } if (redraw) { + int updateregion; + set_origin(currcons); - if (sw->con_switch(vc_cons[currcons].d) && vcmode != KD_GRAPHICS) { - /* Update the screen contents */ - set_palette(currcons); + updateregion = sw->con_switch(vc_cons[currcons].d); + set_palette(currcons); + /* Update the screen contents */ + if (updateregion && (vcmode != KD_GRAPHICS)) do_update_region(currcons, origin, screenbuf_size/2); - } } set_cursor(currcons); if (is_switch) { - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |