Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/wsfb support 24bpp framebuffers
details: https://anonhg.NetBSD.org/src/rev/46f05f2e9ef0
branches: trunk
changeset: 336806:46f05f2e9ef0
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri Mar 20 21:55:46 2015 +0000
description:
support 24bpp framebuffers
diffstat:
sys/dev/wsfb/genfb.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (42 lines):
diff -r ed7093e56db4 -r 46f05f2e9ef0 sys/dev/wsfb/genfb.c
--- a/sys/dev/wsfb/genfb.c Fri Mar 20 21:42:31 2015 +0000
+++ b/sys/dev/wsfb/genfb.c Fri Mar 20 21:55:46 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: genfb.c,v 1.56 2014/09/10 07:40:52 macallan Exp $ */
+/* $NetBSD: genfb.c,v 1.57 2015/03/20 21:55:46 jmcneill Exp $ */
/*-
* Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.56 2014/09/10 07:40:52 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.57 2015/03/20 21:55:46 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -545,10 +545,12 @@
ri->ri_flg |= RI_CLEAR;
}
- if (ri->ri_depth == 32) {
+ if (ri->ri_depth == 32 || ri->ri_depth == 24) {
bool is_bgr = false;
- ri->ri_flg |= RI_ENABLE_ALPHA;
+ if (ri->ri_depth == 32) {
+ ri->ri_flg |= RI_ENABLE_ALPHA;
+ }
prop_dictionary_get_bool(device_properties(sc->sc_dev),
"is_bgr", &is_bgr);
if (is_bgr) {
@@ -568,7 +570,7 @@
ri->ri_gpos = 8;
ri->ri_bpos = 0;
}
- }
+ }
if (ri->ri_depth == 8 && sc->sc_cmcb != NULL)
ri->ri_flg |= RI_ENABLE_ALPHA | RI_8BIT_IS_RGB;
Home |
Main Index |
Thread Index |
Old Index