Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbmips/loongson make sure device properties for ge...



details:   https://anonhg.NetBSD.org/src/rev/7c3b7267a3b8
branches:  trunk
changeset: 785437:7c3b7267a3b8
user:      macallan <macallan%NetBSD.org@localhost>
date:      Wed Mar 13 21:18:35 2013 +0000

description:
make sure device properties for genfb or voyagerfb actually get set

diffstat:

 sys/arch/evbmips/loongson/gdium_machdep.c |  29 ++++++++++++++---------------
 1 files changed, 14 insertions(+), 15 deletions(-)

diffs (46 lines):

diff -r 2fb9fbe164b4 -r 7c3b7267a3b8 sys/arch/evbmips/loongson/gdium_machdep.c
--- a/sys/arch/evbmips/loongson/gdium_machdep.c Wed Mar 13 21:17:43 2013 +0000
+++ b/sys/arch/evbmips/loongson/gdium_machdep.c Wed Mar 13 21:18:35 2013 +0000
@@ -240,6 +240,20 @@
        static int gkey_chain_pos = 0;
        static device_t lastparent = NULL;
 
+       if (device_is_a(dev, "genfb") || device_is_a(dev, "voyagerfb")) {
+               dict = device_properties(dev);
+               /*
+                * this is a hack
+                * is_console needs to be checked against reality
+                */
+               prop_dictionary_set_bool(dict, "is_console", 1);
+               prop_dictionary_set_uint32(dict, "width", 1024);
+               prop_dictionary_set_uint32(dict, "height", 600);
+               prop_dictionary_set_uint32(dict, "depth", 16);
+               prop_dictionary_set_uint32(dict, "linebytes", 2048);
+               if (fb_addr != 0)
+                       prop_dictionary_set_uint32(dict, "address", fb_addr);
+       }
        if (device_parent(dev) != lastparent && gkey_chain_pos != 0)
                return;
 
@@ -284,21 +298,6 @@
                break;
        }
 
-       if (device_is_a(dev, "genfb") || device_is_a(dev, "voyagerfb")) {
-               dict = device_properties(dev);
-               /*
-                * this is a hack
-                * is_console needs to be checked against reality
-                */
-               prop_dictionary_set_bool(dict, "is_console", 1);
-               prop_dictionary_set_uint32(dict, "width", 1024);
-               prop_dictionary_set_uint32(dict, "height", 600);
-               prop_dictionary_set_uint32(dict, "depth", 16);
-               prop_dictionary_set_uint32(dict, "linebytes", 2048);
-               if (fb_addr != 0)
-                       prop_dictionary_set_uint32(dict, "address", fb_addr);
-       }
-
        return;
 
 advance:



Home | Main Index | Thread Index | Old Index