Skip to contentSkip to conversation

rivafb & 16 bit

PATCH New Paweł Goleniowski 1 participant 1 message Dec 22, 2003 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rivafb & 16 bit

There is a problem with 16 bit mode with rivafb. Colors are sometimes broken (specialy under Midnight Commander). This small patch fixes it. I've been using it for last months and it works without any problems.

Pawel 'Goldi' Goleniowski

drivers/video/riva/accel.c +2 -2
@@ -300,8 +300,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;
 }