Current-Users archive

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

Re: HEADS UP: riastradh-drm2 branch merged



Hi,

2014-03-25 1:08 GMT+09:00 NONAKA Kimihiro <nonakap%gmail.com@localhost>:

> I wrote a small patch to be i915drmkms as a console.

I've update patch.
My ThinkPad E430 with1600x900 Dual-Link LVDS panel works fine.

Index: sys/external/bsd/drm2/dist/drm/i915/intel_bios.c
===================================================================
RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/i915/intel_bios.c,v
retrieving revision 1.2
diff -u -r1.2 intel_bios.c
--- sys/external/bsd/drm2/dist/drm/i915/intel_bios.c    18 Mar 2014
18:20:42 -0000    1.2
+++ sys/external/bsd/drm2/dist/drm/i915/intel_bios.c    25 Mar 2014
13:19:56 -0000
@@ -30,6 +30,13 @@
 #include <drm/i915_drm.h>
 #include "i915_drv.h"
 #include "intel_bios.h"
+#if defined(__i386__) || defined(__x86_64__)
+#include <dev/isa/isareg.h>
+#include <dev/isa/isavar.h>
+
+#define VGA_BIOS_ADDR    0xc0000
+#define VGA_BIOS_SIZE    0x10000
+#endif

 #define    SLAVE_ADDR1    0x70
 #define    SLAVE_ADDR2    0x72
@@ -719,6 +726,34 @@
     }
 #endif

+#if defined(__i386__) || defined(__x86_64__)
+    /* from OpenBSD */
+    if (bdb == NULL) {
+        struct vbt_header *vbt = NULL;
+        u8 __iomem *vgabios;
+        size_t size;
+        int i;
+
+        vgabios = (u8 *)ISA_HOLE_VADDR(VGA_BIOS_ADDR);
+        size = VGA_BIOS_SIZE;
+
+        /* Scour memory looking for the VBT signature */
+        for (i = 0; i + 4 < size; i++) {
+            if (!memcmp(vgabios + i, "$VBT", 4)) {
+                vbt = (struct vbt_header *)(vgabios + i);
+                break;
+            }
+        }
+
+        if (vbt != NULL) {
+            DRM_DEBUG_KMS("Using VBT from VGA BIOS: %20s\n",
+                vbt->signature);
+            bdb = (struct bdb_header *)
+                (vgabios + i + vbt->bdb_offset);
+        }
+    }
+#endif
+
     if (bdb == NULL) {
         struct vbt_header *vbt = NULL;
         size_t size;
Index: sys/external/bsd/drm2/i915drm/i915_pci.c
===================================================================
RCS file: /cvsroot/src/sys/external/bsd/drm2/i915drm/i915_pci.c,v
retrieving revision 1.2
diff -u -r1.2 i915_pci.c
--- sys/external/bsd/drm2/i915drm/i915_pci.c    18 Mar 2014 18:20:42
-0000    1.2
+++ sys/external/bsd/drm2/i915drm/i915_pci.c    25 Mar 2014 13:19:56 -0000
@@ -167,6 +167,12 @@
         i915_drm_driver->driver_features &=~ DRIVER_USE_AGP;
     }

+#if 1 /* XXX NONAKA */
+    wsdisplay_cndetach();
+    extern int vga_cndetach(void);
+    vga_cndetach();
+#endif /* XXX NONAKA */
+
     /* Initialize the drm pci driver state.  */
     sc->sc_drm_dev.driver = i915_drm_driver;
     drm_pci_attach(self, pa, &sc->sc_pci_dev, &sc->sc_drm_dev);
@@ -416,7 +422,7 @@
         goto fail3;
     }

-    prop_dictionary_set_bool(dict, "is_console", 0); /* XXX */
+    prop_dictionary_set_bool(dict, "is_console", true /*0*/); /* XXX
*/ /*NONAKA*/
     prop_dictionary_set_uint32(dict, "width", mode_cmd.width);
     prop_dictionary_set_uint32(dict, "height", mode_cmd.height);
     prop_dictionary_set_uint8(dict, "depth", sizes->surface_bpp);
Index: sys/dev/pci/hdaudio/hdafg.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/hdaudio/hdafg.c,v
retrieving revision 1.18
diff -u -r1.18 hdafg.c
--- sys/dev/pci/hdaudio/hdafg.c    16 Oct 2013 18:13:00 -0000    1.18
+++ sys/dev/pci/hdaudio/hdafg.c    25 Mar 2014 13:19:56 -0000
@@ -4263,7 +4263,9 @@
             for (j = 0; j < HDAUDIO_MAXPINS; j++) {
                 if (as[i].as_pins[j] == 0)
                     continue;
+#if 0    /* XXX */
                 hdafg_assoc_dump_dd(sc, &as[i], j);
+#endif
             }
         }
         break;

Regards
-- 
NONAKA Kimihiro


Home | Main Index | Thread Index | Old Index