From: Jakub Bogusz <qboosh@pld.org.pl>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: [PATCH] tdfxfb: fix for background used in fbcon_clear
Date: Thu, 31 Jul 2003 01:43:27 +0200 [thread overview]
Message-ID: <20030730234327.GA3694@satan.blackhosts> (raw)
[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]
Hello,
This time I checked recent linux-fbdev-devel archives - and didn't see
any patch for this issue. So here is my fix.
There was wrong color used in fillrect in 16/24/32bpp (pseudo_palette
mapping was omitted), which resulted in ugly black (well, almost black)
rectangles painted when some "clear" terminal command was sent (like
"^[[J", "^[[K") with background colour different than black.
It was visible e.g. in mc's View.
BTW, if I use 800x600 framebuffer (i.e. 100x37.5 charasters) the
remaining half line at the bottom sometimes changes colour from black
to some other (used as background in last "clear" command).
Shouldn't margins always be black?
Background of last erase character is definitely not what we want...
I changed "region.color = attr_bgcol_ec(bgshift, vc);" to
"region.color = 0;" in accel_clear_margins()
(linux/drivers/video/console/fbcon.c:505) - it fixed this issue and
I can't see any side-effects.
--
Jakub Bogusz http://cyber.cs.net.pl/~qboosh/
PLD Linux http://www.pld-linux.org/
[-- Attachment #2: linux-tdfxfb-fillrect.patch --]
[-- Type: text/plain, Size: 798 bytes --]
This fixes background used for "clear" terminal commands (^[[J, ^[[K etc.)
in 16/24/32bpp modes.
--- linux-2.6.0-test2/drivers/video/tdfxfb.c.orig 2003-07-30 08:31:57.000000000 +0200
+++ linux-2.6.0-test2/drivers/video/tdfxfb.c 2003-07-31 00:44:26.000000000 +0200
@@ -890,7 +890,11 @@
banshee_make_room(par, 5);
tdfx_outl(par, DSTFORMAT, fmt);
- tdfx_outl(par, COLORFORE, rect->color);
+ if (info->fix.visual == FB_VISUAL_PSEUDOCOLOR) {
+ tdfx_outl(par, COLORFORE, rect->color);
+ } else { /* FB_VISUAL_TRUECOLOR */
+ tdfx_outl(par, COLORFORE, ((u32*)(info->pseudo_palette))[rect->color]);
+ }
tdfx_outl(par, COMMAND_2D, COMMAND_2D_FILLRECT | (tdfx_rop << 24));
tdfx_outl(par, DSTSIZE, rect->width | (rect->height << 16));
tdfx_outl(par, LAUNCH_2D, rect->dx | (rect->dy << 16));
reply other threads:[~2003-07-30 23:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20030730234327.GA3694@satan.blackhosts \
--to=qboosh@pld.org.pl \
--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).