Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/broadcom bcm2835-fb seems byte-swapped to CPU w...



details:   https://anonhg.NetBSD.org/src/rev/8a2c153890f2
branches:  trunk
changeset: 946557:8a2c153890f2
user:      rin <rin%NetBSD.org@localhost>
date:      Tue Dec 01 04:17:10 2020 +0000

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

diffstat:

 sys/arch/arm/broadcom/bcm2835_genfb.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 3a97458b7cdd -r 8a2c153890f2 sys/arch/arm/broadcom/bcm2835_genfb.c
--- a/sys/arch/arm/broadcom/bcm2835_genfb.c     Tue Dec 01 04:16:18 2020 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_genfb.c     Tue Dec 01 04:17:10 2020 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 @@
        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);
 



Home | Main Index | Thread Index | Old Index