Skip to contentSkip to conversation

ffb: The pseudo_palette is only 16 elements long

PATCH In review Antonino A. Daplas 2 participants 3 messages Jun 2, 2007 – Jun 5, 2007 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 5/24 ffb: The pseudo_palette is only 16 elements long

The pseudo_palette is only 16 elements long.

---

 drivers/video/ffb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/ffb.c +2 -2
index 1d4e835..3f6c98f 100644
@@ -656,7 +656,7 @@ static int ffb_setcolreg(unsigned regno,
 {
 	u32 value;
 
-	if (regno >= 256)
+	if (regno >= 16)
 		return 1;
 
 	red >>= 8;
@@ -903,7 +903,7 @@ ffb_init_fix(struct fb_info *info)
 struct all_info {
 	struct fb_info info;
 	struct ffb_par par;
-	u32 pseudo_palette[256];
+	u32 pseudo_palette[16];
 };
 
 static int ffb_init_one(struct of_device *op)

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

#1 lore raw

From: "Antonino A. Daplas" <[email protected]>
Date: Sat, 02 Jun 2007 17:57:36 +0800

Quoted 3 lines

The pseudo_palette is only 16 elements long.

Antonio, if you don't mind I'll merge the ffb, xvr2500, and xvr500 pseudo palette fixes in via my Sparc tree.

Thanks for doing this audit!

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

#2 lore raw
Quoted 10 lines · David Miller

From: "Antonino A. Daplas" <[email protected]>
Date: Sat, 02 Jun 2007 17:57:36 +0800

Quoted 3 lines

The pseudo_palette is only 16 elements long.

Antonio, if you don't mind I'll merge the ffb, xvr2500, and xvr500 pseudo palette fixes in via my Sparc tree.

No problem.

Tony

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/