linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Resend2 [GIT PATCH 1/1] support 24bpp (32bpp minus alpha) in radeonfb driver
@ 2006-10-17 14:55 Kimball Murray
  0 siblings, 0 replies; only message in thread
From: Kimball Murray @ 2006-10-17 14:55 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: benh, Kimball Murray

Trying yet again with a new list address.  Sorry Ben, you'll see this 3 times
now :)

This simple patch allows unpacked, 24bpp mode to work in the radeonfb driver.

The patch is against the mainline (Linus) git tree.  I am submitting this on
behalf of Charlotte Richardson at Stratus Technologies, to support one of the
Stratus hardware platforms.

Signed-off-by: Charlotte Richardson (charlotte.richardson@stratus.com)

--------------------------- snip -----------------------
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index 0ed577e..aef12f5 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -719,11 +719,8 @@ static int radeonfb_check_var (struct fb
 			v.bits_per_pixel = 16;
 			break;
 		case 17 ... 24:
-#if 0 /* Doesn't seem to work */
 			v.bits_per_pixel = 24;
 			break;
-#endif			
-			return -EINVAL;
 		case 25 ... 32:
 			v.bits_per_pixel = 32;
 			break;
diff --git a/drivers/video/aty/radeonfb.h b/drivers/video/aty/radeonfb.h
index d5ff224..989f468 100644
--- a/drivers/video/aty/radeonfb.h
+++ b/drivers/video/aty/radeonfb.h
@@ -517,6 +517,8 @@ static inline int round_div(int num, int
 
 static inline int var_to_depth(const struct fb_var_screeninfo *var)
 {
+	if (var->bits_per_pixel == 32)
+	       return (var->transp.length == 8) ? 32 : 24;
 	if (var->bits_per_pixel != 16)
 		return var->bits_per_pixel;
 	return (var->green.length == 5) ? 15 : 16;
@@ -531,7 +533,9 @@ static inline u32 radeon_get_dstbpp(u16 
        		return DST_15BPP;
        	case 16:
        		return DST_16BPP;
-       	case 32:
+	case 24:
+       		return DST_24BPP;
+	case 32:
        		return DST_32BPP;
        	default:
        		return 0;

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-10-17 14:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-17 14:55 Resend2 [GIT PATCH 1/1] support 24bpp (32bpp minus alpha) in radeonfb driver Kimball Murray

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).