Module Name:    src
Committed By:   rin
Date:           Tue Dec  1 04:17:10 UTC 2020

Modified Files:
        src/sys/arch/arm/broadcom: bcm2835_genfb.c

Log Message:
bcm2835-fb seems byte-swapped to CPU when running in big-endian mode.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/broadcom/bcm2835_genfb.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/arm/broadcom/bcm2835_genfb.c
diff -u src/sys/arch/arm/broadcom/bcm2835_genfb.c:1.10 src/sys/arch/arm/broadcom/bcm2835_genfb.c:1.11
--- src/sys/arch/arm/broadcom/bcm2835_genfb.c:1.10	Mon Nov 23 06:46:38 2020
+++ src/sys/arch/arm/broadcom/bcm2835_genfb.c	Tue Dec  1 04:17:10 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_genfb.c,v 1.10 2020/11/23 06:46:38 rin Exp $ */
+/* $NetBSD: bcm2835_genfb.c,v 1.11 2020/12/01 04:17:10 rin Exp $ */
 
 /*-
  * Copyright (c) 2013 Jared D. McNeill <[email protected]>
@@ -31,13 +31,14 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_genfb.c,v 1.10 2020/11/23 06:46:38 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_genfb.c,v 1.11 2020/12/01 04:17:10 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
 #include <sys/bus.h>
 #include <sys/conf.h>
 #include <sys/device.h>
+#include <sys/endian.h>
 #include <sys/kmem.h>
 #include <sys/systm.h>
 
@@ -96,6 +97,9 @@ bcmgenfb_attach(device_t parent, device_
 	sc->sc_wstype = WSDISPLAY_TYPE_VC4;
 	prop_dictionary_get_uint32(dict, "wsdisplay_type", &sc->sc_wstype);
 	prop_dictionary_get_bool(dict, "is_console", &is_console);
+#if BYTE_ORDER == BIG_ENDIAN
+	prop_dictionary_set_bool(dict, "is_swapped", true);
+#endif
 
 	genfb_init(&sc->sc_gen);
 

Reply via email to