Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/sunxi sunxi_debe_set_videomode(): As byte-swapp...



details:   https://anonhg.NetBSD.org/src/rev/65b0a78530fe
branches:  trunk
changeset: 956022:65b0a78530fe
user:      rin <rin%NetBSD.org@localhost>
date:      Mon Oct 19 01:13:41 2020 +0000

description:
sunxi_debe_set_videomode(): As byte-swapped framebuffer is now handled by
FDT override, do not configure FB to little-endian format for __ARMEB__.

XXX
This function is not actually called at the moment. IIRC, it worked in
the pre-FDT era. Something went wrong since then...

diffstat:

 sys/arch/arm/sunxi/sunxi_debe.c |  15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (43 lines):

diff -r 7b76c961cccc -r 65b0a78530fe sys/arch/arm/sunxi/sunxi_debe.c
--- a/sys/arch/arm/sunxi/sunxi_debe.c   Mon Oct 19 01:12:14 2020 +0000
+++ b/sys/arch/arm/sunxi/sunxi_debe.c   Mon Oct 19 01:13:41 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_debe.c,v 1.9 2018/06/01 17:18:44 bouyer Exp $ */
+/* $NetBSD: sunxi_debe.c,v 1.10 2020/10/19 01:13:41 rin Exp $ */
 
 /*-
  * Copyright (c) 2018 Manuel Bouyer <bouyer%antioche.eu.org@localhost>
@@ -38,7 +38,7 @@
 #define SUNXI_DEBE_CURMAX      64
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_debe.c,v 1.9 2018/06/01 17:18:44 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_debe.c,v 1.10 2020/10/19 01:13:41 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -560,6 +560,10 @@
        return 0;
 }
 
+/*
+ * FIXME 2020/10/19
+ * This function is not called actually at the moment.
+ */
 void
 sunxi_debe_set_videomode(device_t dev, const struct videomode *mode)
 {
@@ -613,7 +617,12 @@
                                 SUNXI_DEBE_ATTCTL1_LAY_FBFMT);
                val &= ~SUNXI_DEBE_ATTCTL1_LAY_BRSWAPEN;
                val &= ~SUNXI_DEBE_ATTCTL1_LAY_FBPS;
-#if __ARMEB__
+#if 0 /* __ARMEB__ */
+               /*
+                * For big endian, we dynamically override FDT to let
+                * genfb(4) know that framebuffer is byte-swapped.
+                * See fdt_update_fb_format() in fdt_machdep.c.
+                */
                val |= __SHIFTIN(SUNXI_DEBE_ATTCTL1_LAY_FBPS_32BPP_BGRA,
                                 SUNXI_DEBE_ATTCTL1_LAY_FBPS);
 #else



Home | Main Index | Thread Index | Old Index