* [PATCH 2.4, 2.6] rivafb 16bpp text background colour fix
@ 2004-04-22 16:41 Jakub Bogusz
2004-04-22 18:43 ` James Simmons
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Bogusz @ 2004-04-22 16:41 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-nvidia, ajoshi
[-- Attachment #1: Type: text/plain, Size: 970 bytes --]
I sent it already to Ani Joshi long time ago (December 2002),
but it seems to be lost somewhere in time.
I noticed that Pawel Goleniowski made the same patch and sent to LKML
in December 2003 and January 2004:
http://www.uwsg.iu.edu/hypermail/linux/kernel/0312.2/1258.html
http://www.uwsg.iu.edu/hypermail/linux/kernel/0401.1/0225.html
but it's still not fixed.
The same applies to 2.6.x series, only filename
(linux-2.6.*/drivers/video/riva/fbdev.c instead of .../riva/accel.c)
and whitespace (tabs are used now instead of spaces) differ.
Original description (written in Dec 2002):
> I noticed, that text background in 16bpp (only) modes is displayed
> incorrectly. That's because convert_bgcolor_16() converts value to RGBA
> from 15bpp, not 16bpp.
>
> The fix is attached (works for me, tested by one more person).
> Patch was made against Linux 2.4.19, but should apply to 2.4.20 and
> 2.5.x without changes.
--
Jakub Bogusz http://cyber.cs.net.pl/~qboosh/
[-- Attachment #2: linux-rivafb16-bgcolor.patch --]
[-- Type: text/plain, Size: 611 bytes --]
Text background in 16bpp (only) modes was displayed incorrectly because
onvert_bgcolor_16() converted value to RGBA from 15bpp, not 16bpp as it
should.
--- linux-2.4.19/drivers/video/riva/accel.c.orig Sat Aug 3 02:39:45 2002
+++ linux-2.4.19/drivers/video/riva/accel.c Thu Nov 28 12:08:49 2002
@@ -293,8 +293,8 @@
static inline void convert_bgcolor_16(u32 *col)
{
- *col = ((*col & 0x00007C00) << 9)
- | ((*col & 0x000003E0) << 6)
+ *col = ((*col & 0x0000F800) << 8)
+ | ((*col & 0x000007E0) << 5)
| ((*col & 0x0000001F) << 3)
| 0xFF000000;
}
[-- Attachment #3: linux-2.6-rivafb16.patch --]
[-- Type: text/plain, Size: 583 bytes --]
Text background in 16bpp (only) modes was displayed incorrectly because
onvert_bgcolor_16() converted value to RGBA from 15bpp, not 16bpp as it
should.
--- linux-2.6.4/drivers/video/riva/fbdev.c.orig 2004-03-11 03:55:36.000000000 +0100
+++ linux-2.6.4/drivers/video/riva/fbdev.c 2004-04-22 18:42:33.063742432 +0200
@@ -1368,8 +1368,8 @@
static inline void convert_bgcolor_16(u32 *col)
{
- *col = ((*col & 0x00007C00) << 9)
- | ((*col & 0x000003E0) << 6)
+ *col = ((*col & 0x0000F800) << 8)
+ | ((*col & 0x000007E0) << 5)
| ((*col & 0x0000001F) << 3)
| 0xFF000000;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2.4, 2.6] rivafb 16bpp text background colour fix
2004-04-22 16:41 [PATCH 2.4, 2.6] rivafb 16bpp text background colour fix Jakub Bogusz
@ 2004-04-22 18:43 ` James Simmons
0 siblings, 0 replies; 2+ messages in thread
From: James Simmons @ 2004-04-22 18:43 UTC (permalink / raw)
To: Jakub Bogusz; +Cc: linux-kernel, linux-nvidia, ajoshi
I applied it to the newer Nvidia driver I have. I plan to o stream line in
the next few weeks.
On Thu, 22 Apr 2004, Jakub Bogusz wrote:
> I sent it already to Ani Joshi long time ago (December 2002),
> but it seems to be lost somewhere in time.
> I noticed that Pawel Goleniowski made the same patch and sent to LKML
> in December 2003 and January 2004:
> http://www.uwsg.iu.edu/hypermail/linux/kernel/0312.2/1258.html
> http://www.uwsg.iu.edu/hypermail/linux/kernel/0401.1/0225.html
> but it's still not fixed.
>
> The same applies to 2.6.x series, only filename
> (linux-2.6.*/drivers/video/riva/fbdev.c instead of .../riva/accel.c)
> and whitespace (tabs are used now instead of spaces) differ.
>
> Original description (written in Dec 2002):
> > I noticed, that text background in 16bpp (only) modes is displayed
> > incorrectly. That's because convert_bgcolor_16() converts value to RGBA
> > from 15bpp, not 16bpp.
> >
> > The fix is attached (works for me, tested by one more person).
> > Patch was made against Linux 2.4.19, but should apply to 2.4.20 and
> > 2.5.x without changes.
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-04-22 18:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-22 16:41 [PATCH 2.4, 2.6] rivafb 16bpp text background colour fix Jakub Bogusz
2004-04-22 18:43 ` James Simmons
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®