diff mbox

[2/2] vt: dirty hack

Message ID 1315013361-3191-3-git-send-email-FlorianSchandinat@gmx.de (mailing list archive)
State New, archived
Headers show

Commit Message

Florian Tobias Schandinat Sept. 3, 2011, 1:29 a.m. UTC
---
 drivers/tty/vt/vt.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

Comments

Alan Cox Sept. 3, 2011, 10:25 a.m. UTC | #1
On Sat,  3 Sep 2011 01:29:21 +0000
Florian Tobias Schandinat <FlorianSchandinat@gmx.de> wrote:

All of the vt stuff wants doing properly not as hacks.

I think the fundamental change you need is to instroduce some sort of
vc->group pointer and vc group object that holds all the globals in the
vt layer for each group (ie move fg_console, console_blanked etc).

That can be done in steps, and once done you can then start to use
vc->group-> within the fbcon driver and possibly also have a per fb
group data attached to vc->group->fb or similar.

Hacks are fine for early prototyping but doing it right means thinking
about the data structures you ultimately need so that existing systems
work, multi-monitor continues to work and you can do proper multi-console
stuff.

I'm all for it happening done right, and some things like being able to
attach an fb console to arbitary GEM objects would allow very nice
integration of the console into things like Wayland.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index b3915b7..8332004 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -3740,7 +3740,6 @@  void do_blank_screen(int entering_gfx)
 		hide_cursor(vc);
 		save_screen(vc);
 		vc->vc_sw->con_blank(vc, -1, 1);
-		console_blanked = fg_console + 1;
 		blank_state = blank_off;
 		set_origin(vc);
 		return;
@@ -3752,7 +3751,6 @@  void do_blank_screen(int entering_gfx)
 
 	/* don't blank graphics */
 	if (vc->vc_mode != KD_TEXT) {
-		console_blanked = fg_console + 1;
 		return;
 	}
 
@@ -3795,7 +3793,7 @@  void do_unblank_screen(int leaving_gfx)
 	WARN_CONSOLE_UNLOCKED();
 
 	ignore_poke = 0;
-	if (!console_blanked)
+	if (!console_blanked && !leaving_gfx)
 		return;
 	if (!vc_cons_allocated(fg_console)) {
 		/* impossible */