Module Name: src
Committed By: jmcneill
Date: Wed Jan 9 22:36:07 UTC 2013
Modified Files:
src/sys/arch/evbarm/rpi: rpi_machdep.c
Log Message:
framebuffer only seems to support BGR mode, so request it and set is_bgr
property on device when in BGR mode
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/evbarm/rpi/rpi_machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/evbarm/rpi/rpi_machdep.c
diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.23 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.24
--- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.23 Wed Jan 9 22:23:44 2013
+++ src/sys/arch/evbarm/rpi/rpi_machdep.c Wed Jan 9 22:36:07 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: rpi_machdep.c,v 1.23 2013/01/09 22:23:44 skrll Exp $ */
+/* $NetBSD: rpi_machdep.c,v 1.24 2013/01/09 22:36:07 jmcneill Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.23 2013/01/09 22:23:44 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rpi_machdep.c,v 1.24 2013/01/09 22:36:07 jmcneill Exp $");
#include "opt_evbarm_boardtype.h"
@@ -300,7 +300,7 @@ static struct {
.vpt_len = VCPROPTAG_LEN(vb_setfb.vbt_pixelorder),
.vpt_rcode = VCPROPTAG_REQUEST,
},
- .state = VCPROP_PIXEL_RGB,
+ .state = VCPROP_PIXEL_BGR,
},
.vbt_alpha = {
.tag = {
@@ -690,6 +690,8 @@ rpi_fb_init(prop_dictionary_t dict)
vb_setfb.vbt_res.width, vb_setfb.vbt_res.height);
printf("%s: vwidth = %d vheight = %d\n", __func__,
vb_setfb.vbt_vres.width, vb_setfb.vbt_vres.height);
+ printf("%s: pixelorder = %d\n", __func__,
+ vb_setfb.vbt_pixelorder.state);
#endif
if (vb_setfb.vbt_allocbuf.address == 0 ||
@@ -711,6 +713,8 @@ rpi_fb_init(prop_dictionary_t dict)
vb_setfb.vbt_pitch.linebytes);
prop_dictionary_set_uint32(dict, "address",
vb_setfb.vbt_allocbuf.address);
+ if (vb_setfb.vbt_pixelorder.state == VCPROP_PIXEL_BGR)
+ prop_dictionary_set_bool(dict, "is_bgr", true);
return true;
}