From: Kimball M. <kim...@gm...> - 2006-10-17 14:55:37
|
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 (cha...@st...) --------------------------- 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; |