NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/48708: i915drmkms(4): Can't probe dual-link LVDS setting.
>Number: 48708
>Category: kern
>Synopsis: i915drmkms(4): Can't probe dual-link LVDS setting.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Apr 04 14:10:00 +0000 2014
>Originator: NONAKA Kimihiro
>Release: 6.99.39
>Organization:
>Environment:
NetBSD koharu.myhome.local 6.99.39 NetBSD 6.99.39 (KOHARU) #2230: Fri Apr 4
21:13:54 JST 2014
nonaka@koharu.myhome.local:/usr/obj.amd64/sys/arch/amd64/compile/KOHARU amd64
>Description:
My ThinkPad E430 boot with DRMKMS kernel did not display correctly.
My notebook have 1600x900 LCD with dual-link LVDS. I think i915drmkms(4) can't
probe dual-link LVDS setting.
>How-To-Repeat:
Boot with DRMKMS kernel on dual-link LVDS machine.
>Fix:
Apply following patch. code from OpenBSD.
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 4 Apr 2014 12:11:20
-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,32 @@
}
#endif
+#if defined(__i386__) || defined(__x86_64__)
+ if (bdb == NULL) {
+ struct vbt_header *vbt = NULL;
+ size_t size;
+ int i;
+
+ bios = (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(bios + i, "$VBT", 4)) {
+ vbt = (struct vbt_header *)(bios + i);
+ break;
+ }
+ }
+
+ if (vbt != NULL) {
+ DRM_DEBUG_KMS("Using VBT from VGA BIOS: %20s\n",
+ vbt->signature);
+ bdb = (struct bdb_header *)(bios + i + vbt->bdb_offset);
+ }
+ bios = NULL;
+ }
+#endif
+
if (bdb == NULL) {
struct vbt_header *vbt = NULL;
size_t size;
Home |
Main Index |
Thread Index |
Old Index