Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64 Add a static EDID entry for the Mesostation...



details:   https://anonhg.NetBSD.org/src/rev/8380c6c4fe58
branches:  trunk
changeset: 955790:8380c6c4fe58
user:      jdc <jdc%NetBSD.org@localhost>
date:      Sun Oct 11 19:39:22 2020 +0000

description:
Add a static EDID entry for the Mesostation-999.
Use the same logic as macppc for adding the entry.

diffstat:

 sys/arch/sparc64/conf/files.sparc64    |   3 +-
 sys/arch/sparc64/sparc64/autoconf.c    |  23 ++++++++++++-
 sys/arch/sparc64/sparc64/static_edid.c |  58 ++++++++++++++++++++++++++++++++++
 sys/arch/sparc64/sparc64/static_edid.h |  36 +++++++++++++++++++++
 4 files changed, 117 insertions(+), 3 deletions(-)

diffs (178 lines):

diff -r 8d215f757d0f -r 8380c6c4fe58 sys/arch/sparc64/conf/files.sparc64
--- a/sys/arch/sparc64/conf/files.sparc64       Sun Oct 11 18:48:20 2020 +0000
+++ b/sys/arch/sparc64/conf/files.sparc64       Sun Oct 11 19:39:22 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.sparc64,v 1.159 2020/05/11 15:56:15 jdc Exp $
+#      $NetBSD: files.sparc64,v 1.160 2020/10/11 19:39:22 jdc Exp $
 
 # @(#)files.sparc64    8.1 (Berkeley) 7/19/93
 # sparc64-specific configuration info
@@ -257,6 +257,7 @@
 file   arch/sparc64/sparc64/machdep.c
 file   arch/sparc64/sparc64/process_machdep.c
 file   arch/sparc64/sparc64/procfs_machdep.c   procfs
+file   arch/sparc64/sparc64/static_edid.c
 file   arch/sparc/sparc/openprom.c
 file   arch/sparc/sparc/openfirm.c
 file   arch/sparc64/sparc64/ofw_machdep.c
diff -r 8d215f757d0f -r 8380c6c4fe58 sys/arch/sparc64/sparc64/autoconf.c
--- a/sys/arch/sparc64/sparc64/autoconf.c       Sun Oct 11 18:48:20 2020 +0000
+++ b/sys/arch/sparc64/sparc64/autoconf.c       Sun Oct 11 19:39:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.222 2020/07/23 16:08:02 jdc Exp $ */
+/*     $NetBSD: autoconf.c,v 1.223 2020/10/11 19:39:22 jdc Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.222 2020/07/23 16:08:02 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.223 2020/10/11 19:39:22 jdc Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -92,6 +92,7 @@
 #include <machine/pmap.h>
 #include <machine/bootinfo.h>
 #include <sparc64/sparc64/cache.h>
+#include <sparc64/sparc64/static_edid.h>
 #include <sparc64/sparc64/timerreg.h>
 #include <sparc64/dev/cbusvar.h>
 
@@ -1205,6 +1206,21 @@
        }
 }
 
+/* Static EDID definitions */
+static void
+set_static_edid(prop_dictionary_t dict)
+{
+       if (!strcmp(machine_model, "NATE,Meso-999")) {
+               prop_data_t edid;
+
+               DPRINTF(ACDB_PROBE, ("\nAdding EDID for Meso-999 "));
+               edid = prop_data_create_copy(edid_meso999,
+                   sizeof(edid_meso999));
+               prop_dictionary_set(dict, "EDID:1", edid);
+               prop_object_release(edid);
+       }
+}
+
 /*
  * Called back during autoconfiguration for each device found
  */
@@ -1508,7 +1524,10 @@
                        if (OF_getprop(node, "width", &width, sizeof(width))
                            != 4) {
                                instance = OF_open(name);
+                       }
+               }
 #endif
+               set_static_edid(dict);
        }
 
        set_hw_props(dev);
diff -r 8d215f757d0f -r 8380c6c4fe58 sys/arch/sparc64/sparc64/static_edid.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sparc64/sparc64/static_edid.c    Sun Oct 11 19:39:22 2020 +0000
@@ -0,0 +1,58 @@
+/*     $NetBSD: static_edid.c,v 1.1 2020/10/11 19:39:22 jdc Exp $ */
+
+/*-
+ * Copyright (c) 2020 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Julian Coleman.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: static_edid.c,v 1.1 2020/10/11 19:39:22 jdc Exp $");
+#include <sys/param.h>
+
+/* EDID blocks for some known hardware that doesn't provide its own */
+
+/*
+ * Naturetech Mesostation 999
+ * Based on VESA DMT 1E, but with slight adjustment to the horizontal timing
+ */
+uint8_t edid_meso999[128] = {
+/* 00 */       0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
+/* 08 */       0x38, 0x34, 0x99, 0x09, 0x00, 0x00, 0x00, 0x00,
+/* 10 */       0xff, 0x0f, 0x01, 0x03, 0x68, 0x25, 0x17, 0x78,
+/* 18 */       0x2a, 0x3c, 0x40, 0x9c, 0x56, 0x4d, 0x98, 0x26,
+/* 20 */       0x16, 0x50, 0x54, 0xa5, 0x4a, 0x80, 0x81, 0x40,
+/* 28 */       0x81, 0x80, 0x81, 0x8f, 0x95, 0x00, 0x01, 0x01,
+/* 30 */       0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xab, 0x22,
+/* 38 */       0xa0, 0xa0, 0x50, 0x84, 0x1a, 0x30, 0x38, 0x20,
+/* 40 */       0x36, 0x00, 0x9a, 0x01, 0x11, 0x00, 0x00, 0x1a,
+/* 48 */       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 50 */       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+/* 58 */       0x00, 0x01, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x4e,
+/* 60 */       0x41, 0x74, 0x75, 0x72, 0x65, 0x74, 0x65, 0x63,
+/* 68 */       0x68, 0x0a, 0x20, 0x20, 0x00, 0x00, 0x00, 0xfe,
+/* 70 */       0x00, 0x4d, 0x65, 0x73, 0x6f, 0x20, 0x39, 0x39,
+/* 78 */       0x39, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x00, 0xed
+};
diff -r 8d215f757d0f -r 8380c6c4fe58 sys/arch/sparc64/sparc64/static_edid.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sparc64/sparc64/static_edid.h    Sun Oct 11 19:39:22 2020 +0000
@@ -0,0 +1,36 @@
+/*     $NetBSD: static_edid.h,v 1.1 2020/10/11 19:39:22 jdc Exp $ */
+
+/*-
+ * Copyright (c) 2020 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Julian Coleman.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef STATIC_EDID_H
+#define STATIC_EDID_H
+
+extern uint8_t edid_meso999[128];
+
+#endif /* STATIC_EDID_H */



Home | Main Index | Thread Index | Old Index