From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: John Zielinski <grim@undead.cc>
Cc: Linux Fbdev development list
<linux-fbdev-devel@lists.sourceforge.net>,
James Simmons <jsimmons@infradead.org>
Subject: Re: Restoring Screen when coming back from KD_GRAPHICS
Date: Wed, 24 Dec 2003 19:26:19 +1100 [thread overview]
Message-ID: <1072254378.739.65.camel@gaston> (raw)
In-Reply-To: <3FC4603C.2000702@undead.cc>
On Wed, 2003-11-26 at 19:11, John Zielinski wrote:
> I was playing with the fbtest program and noticed some minor glitches.
> You could see corruption in the graphics where the console was still
> trying to output text from the program. After exiting the program's
> output would mix in with the saved screen.
>
> So I modified the fbtest program to do ioctl to KD_GRAPHICS at startup
> and KD_TEXT on exit and the graphics corruption went away. I also
> didn't save/restore the framebuffer if we started in KD_TEXT on entry.
> This made things worse as now the graphics output was still plus the old
> text and the programs output would now appear after scrolling one line.
>
> I checked the kernel to see why the screen wasn't being refreshed when
> switching back to KD_TEXT. I found that if the fbdev driver has a
> blanking routine the fbcon driver doesn't do a update_screen call. And
> the fbdev if it's using vesa blanking doesn't restore the screen nor
> does it return 1 to tell the vt driver to redraw the screen.
>
>.../...
That's an old problem, I think your patch isn't enough though, we really
need to first callback into the fbdev layer with some sort of "restore state"
call so we have a chance to restore the palette and accel engine status
properly (and maybe even the mode).
Basically, when switching to KD_TEXT, we switch from userland having taken
control of the HW (either partially, that is only the accel engine, or
completely including mode setting) back to kernel control. At this point,
we need to restore the HW in a known state, we can't rely on userland to
do it properly (and that's not always possible) while it's very simple
for us to do it from the fbdev.
It's on my todolist of things to fix, but still I lack time, if you feel
like implementing the background (we can fix individual drivers later on)
support for that, go on :)
Regards,
Ben.
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
next prev parent reply other threads:[~2003-12-24 8:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-26 8:11 Restoring Screen when coming back from KD_GRAPHICS John Zielinski
2003-12-24 8:26 ` Benjamin Herrenschmidt [this message]
2003-12-24 22:07 ` John Zielinski
2003-12-24 22:47 ` Benjamin Herrenschmidt
2003-12-25 1:22 ` John Zielinski
2003-12-25 10:37 ` Benjamin Herrenschmidt
2003-12-25 16:28 ` John Zielinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1072254378.739.65.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=grim@undead.cc \
--cc=jsimmons@infradead.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).