Subject: xsrc/20921: XFree86 4.3.0 with siliconmotion driver doesn't start on NetBSD/i386
To: None <gnats-bugs@gnats.netbsd.org>
From: Lubomir Sedlacik <salo@Xtrmntr.org>
List: netbsd-bugs
Date: 03/28/2003 15:44:23
>Number:         20921
>Category:       xsrc
>Synopsis:       XFree86 4.3.0 with siliconmotion driver doesn't start on NetBSD/i386
>Confidential:   yes
>Severity:       critical
>Priority:       medium
>Responsible:    xsrc-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 28 06:45:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Lubomir Sedlacik
>Release:        NetBSD 1.6P
>Organization:
>Environment:
System: NetBSD 1.6P Tue Mar 18 22:07:17 CET 2003 
Architecture: i386
Machine: i386
XFree86: 4.3.0 from xsrc
>Description:

i upgraded from XFree86 4.2.1 to 4.3.0 on a laptop running NetBSD/i386
-current (ASUS L7300-E, Silicon Motion, Inc.  LynxEM) but the X server refuses
to start (session log attached) and ends in an infinite loop. i can't even
cleanly switch to another virtual console because the screen is pitch black, i
had to reboot blindly from kernel debugger.

i had issues with the siliconmotion driver in previous version (4.2.1) on the
same hardware running NetBSD/i386 as well:

- 'Option "NoUseBIOS"' had to be specified in the configuration file
  otherwise the server didn't start. this seems to be working now,
  since i don't see any indication of the errors seen before in the
  session log file but i tried both, Use and NoUseBIOS to no avail,

- the driver didn't restore VGA palette correctly on exit or switching
  to another virtual console, leaving black screen.  i found a patch on
  a japanese mailing-list (attached) which fixed this problem for me.
  i tried building 4.3.0 with and without this patch but apparently it
  doesn't reach the state where it would take effect so i can't say if
  it's still needed.

i tried disabling acceleration and various PCI options in the configuration
file (attached) but the result was the same as with acceleration enabled.

i submitted similar bug report to devel@XFree86.org and bugs.xfree86.org (bug
id #50) but i've received no reply since.


XFree86.log.0:

XFree86 Version 4.3.0
Release Date: 27 February 2003
X Protocol Version 11, Revision 0, Release 6.6
Build Operating System: NetBSD/i386 1.6P [ELF] The NetBSD Foundation, Inc.
Build Date: 19 March 2003
	Before reporting problems, check http://www.XFree86.Org/
	to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
         (++) from command line, (!!) notice, (II) informational,
         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/XFree86.0.log", Time: Wed Mar 19 13:55:45 2003
(==) Using config file: "/etc/X11/XF86Config-4"
(==) ServerLayout "XFree86 Configured"
(**) |-->Screen "Screen0" (0)
(**) |   |-->Monitor "Monitor0"
(**) |   |-->Device "Card0"
(**) |-->Input Device "Mouse0"
(**) |-->Input Device "Keyboard0"
(**) Option "AutoRepeat" "500 30"
(**) Option "XkbCompat" "group_led"
(**) XKB: compat: "group_led"
(**) Option "XkbLayout" "czsk(us_sk_qwerty)"
(**) XKB: layout: "czsk(us_sk_qwerty)"
(==) Keyboard: CustomKeycode disabled
(WW) The directory "/usr/X11R6/lib/X11/fonts/intlfonts/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/X11R6/lib/X11/fonts/Mozilla/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/X11R6/lib/X11/fonts/biznet/75dpi/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/X11R6/lib/X11/fonts/biznet/100dpi/" does not exist.
	Entry deleted from font path.
(WW) The directory "/usr/X11R6/lib/X11/fonts/biznet/misc/" does not exist.
	Entry deleted from font path.
(**) FontPath set to "/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/Speedo/,/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/CID/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/,/usr/X11R6/lib/X11/fonts/cyrillic/,unix/:7101"
(**) RgbPath set to "/usr/X11R6/lib/X11/rgb"
(**) ModulePath set to "/usr/X11R6/lib/modules"
(--) Using wscons driver in pcvt compatibility mode (version 3.32)
(II) Module ABI versions:
	XFree86 ANSI C Emulation: 0.2
	XFree86 Video Driver: 0.6
	XFree86 XInput driver : 0.4
	XFree86 Server Extension : 0.2
	XFree86 Font Renderer : 0.4
(II) Loader running on netbsd
(II) LoadModule: "bitmap"
(II) Loading /usr/X11R6/lib/modules/fonts/libbitmap.a
(II) Module bitmap: vendor="The XFree86 Project"
	compiled for 4.3.0, module version = 1.0.0
	Module class: XFree86 Font Renderer
	ABI class: XFree86 Font Renderer, version 0.4
(II) Loading font Bitmap
(II) LoadModule: "pcidata"
(II) Loading /usr/X11R6/lib/modules/libpcidata.a
(II) Module pcidata: vendor="The XFree86 Project"
	compiled for 4.3.0, module version = 1.0.0
	ABI class: XFree86 Video Driver, version 0.6
(II) PCI: Probing config type using method 1
(II) PCI: Config type is 1
(II) PCI: stages = 0x03, oldVal1 = 0x00000000, mode1Res1 = 0x80000000
(II) PCI: PCI scan (all values are in hex)
(II) PCI: 00:00:0: chip 8086,7194 card 0000,0000 rev 01 class 06,00,00 hdr 80
(II) PCI: 00:00:1: chip 8086,7195 card 1043,1063 rev 00 class 04,01,00 hdr 00
(II) PCI: 00:02:0: chip 126f,0710 card 126f,0710 rev a3 class 03,00,00 hdr 00
(II) PCI: 00:07:0: chip 8086,7198 card 0000,0000 rev 01 class 06,01,00 hdr 80
(II) PCI: 00:07:1: chip 8086,7199 card 0000,0000 rev 00 class 01,01,80 hdr 00
(II) PCI: 00:07:2: chip 8086,719a card 0000,0000 rev 00 class 0c,03,00 hdr 00
(II) PCI: 00:07:3: chip 8086,719b card 0000,0000 rev 00 class 06,80,00 hdr 00
(II) PCI: 00:0a:0: chip 1180,0476 card fffc,ffff rev 80 class 06,07,00 hdr 82
(II) PCI: 00:0a:1: chip 1180,0476 card fffc,ffff rev 80 class 06,07,00 hdr 82
(II) PCI: End of PCI scan
(II) Host-to-PCI bridge:
(II) Bus 0: bridge is at (0:0:0), (0,0,0), BCTRL: 0x0008 (VGA_EN is set)
(II) Bus 0 I/O range:
	[0] -1	0	0x00000000 - 0x0000ffff (0x10000) IX[B]
(II) Bus 0 non-prefetchable memory range:
	[0] -1	0	0x00000000 - 0xffffffff (0x0) MX[B]
(II) Bus 0 prefetchable memory range:
	[0] -1	0	0x00000000 - 0xffffffff (0x0) MX[B]
(II) PCI-to-ISA bridge:
(II) Bus -1: bridge is at (0:7:0), (0,-1,-1), BCTRL: 0x0008 (VGA_EN is set)
(--) PCI:*(0:2:0) Silicon Motion, Inc. SM710 LynxEM rev 163, Mem @ 0xfd000000/24
(II) Addressable bus resource ranges are
	[0] -1	0	0x00000000 - 0xffffffff (0x0) MX[B]
	[1] -1	0	0x00000000 - 0x0000ffff (0x10000) IX[B]
(II) OS-reported resource ranges:
	[0] -1	0	0xffe00000 - 0xffffffff (0x200000) MX[B](B)
	[1] -1	0	0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B)
	[2] -1	0	0x000f0000 - 0x000fffff (0x10000) MX[B]
	[3] -1	0	0x000c0000 - 0x000effff (0x30000) MX[B]
	[4] -1	0	0x00000000 - 0x0009ffff (0xa0000) MX[B]
	[5] -1	0	0x0000ffff - 0x0000ffff (0x1) IX[B]
	[6] -1	0	0x00000000 - 0x000000ff (0x100) IX[B]
(II) Active PCI resource ranges:
	[0] -1	0	0xfd000000 - 0xfdffffff (0x1000000) MX[B](B)
	[1] -1	0	0x00001c00 - 0x00001cff (0x100) IX[B]E
	[2] -1	0	0x00001800 - 0x000018ff (0x100) IX[B]E
	[3] -1	0	0x00001000 - 0x000010ff (0x100) IX[B]E
	[4] -1	0	0x00001400 - 0x000014ff (0x100) IX[B]E
(II) Active PCI resource ranges after removing overlaps:
	[0] -1	0	0xfd000000 - 0xfdffffff (0x1000000) MX[B](B)
	[1] -1	0	0x00001c00 - 0x00001cff (0x100) IX[B]E
	[2] -1	0	0x00001800 - 0x000018ff (0x100) IX[B]E
	[3] -1	0	0x00001000 - 0x000010ff (0x100) IX[B]E
	[4] -1	0	0x00001400 - 0x000014ff (0x100) IX[B]E
(II) OS-reported resource ranges after removing overlaps with PCI:
	[0] -1	0	0xffe00000 - 0xffffffff (0x200000) MX[B](B)
	[1] -1	0	0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B)
	[2] -1	0	0x000f0000 - 0x000fffff (0x10000) MX[B]
	[3] -1	0	0x000c0000 - 0x000effff (0x30000) MX[B]
	[4] -1	0	0x00000000 - 0x0009ffff (0xa0000) MX[B]
	[5] -1	0	0x0000ffff - 0x0000ffff (0x1) IX[B]
	[6] -1	0	0x00000000 - 0x000000ff (0x100) IX[B]
(II) All system resource ranges:
	[0] -1	0	0xffe00000 - 0xffffffff (0x200000) MX[B](B)
	[1] -1	0	0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B)
	[2] -1	0	0x000f0000 - 0x000fffff (0x10000) MX[B]
	[3] -1	0	0x000c0000 - 0x000effff (0x30000) MX[B]
	[4] -1	0	0x00000000 - 0x0009ffff (0xa0000) MX[B]
	[5] -1	0	0xfd000000 - 0xfdffffff (0x1000000) MX[B](B)
	[6] -1	0	0x0000ffff - 0x0000ffff (0x1) IX[B]
	[7] -1	0	0x00000000 - 0x000000ff (0x100) IX[B]
	[8] -1	0	0x00001c00 - 0x00001cff (0x100) IX[B]E
	[9] -1	0	0x00001800 - 0x000018ff (0x100) IX[B]E
	[10] -1	0	0x00001000 - 0x000010ff (0x100) IX[B]E
	[11] -1	0	0x00001400 - 0x000014ff (0x100) IX[B]E
(II) LoadModule: "dbe"
(II) Loading /usr/X11R6/lib/modules/extensions/libdbe.a
(II) Module dbe: vendor="The XFree86 Project"
	compiled for 4.3.0, module version = 1.0.0
	Module class: XFree86 Server Extension
	ABI class: XFree86 Server Extension, version 0.2
(II) Loading extension DOUBLE-BUFFER
(II) LoadModule: "extmod"
(II) Loading /usr/X11R6/lib/modules/extensions/libextmod.a
(II) Module extmod: vendor="The XFree86 Project"
	compiled for 4.3.0, module version = 1.0.0
	Module class: XFree86 Server Extension
	ABI class: XFree86 Server Extension, version 0.2
(II) Loading extension SHAPE
(II) Loading extension MIT-SUNDRY-NONSTANDARD
(II) Loading extension BIG-REQUESTS
(II) Loading extension SYNC
(II) Loading extension MIT-SCREEN-SAVER
(II) Loading extension XC-MISC
(II) Loading extension XFree86-VidModeExtension
(II) Loading extension XFree86-Misc
(II) Loading extension DPMS
(II) Loading extension FontCache
(II) Loading extension TOG-CUP
(II) Loading extension Extended-Visual-Information
(II) Loading extension XVideo
(II) Loading extension XVideo-MotionCompensation
(II) Loading extension X-Resource
(II) LoadModule: "type1"
(II) Loading /usr/X11R6/lib/modules/fonts/libtype1.a
(II) Module type1: vendor="The XFree86 Project"
	compiled for 4.3.0, module version = 1.0.2
	Module class: XFree86 Font Renderer
	ABI class: XFree86 Font Renderer, version 0.4
(II) Loading font Type1
(II) Loading font CID
(II) LoadModule: "speedo"
(II) Loading /usr/X11R6/lib/modules/fonts/libspeedo.a
(II) Module speedo: vendor="The XFree86 Project"
	compiled for 4.3.0, module version = 1.0.1
	Module class: XFree86 Font Renderer
	ABI class: XFree86 Font Renderer, version 0.4
(II) Loading font Speedo
(II) LoadModule: "glx"
(II) Loading /usr/X11R6/lib/modules/extensions/libglx.a
(II) Module glx: vendor="The XFree86 Project"
	compiled for 4.3.0, module version = 1.0.0
	ABI class: XFree86 Server Extension, version 0.2
(II) Loading sub module "GLcore"
(II) LoadModule: "GLcore"
(II) Loading /usr/X11R6/lib/modules/extensions/libGLcore.a
(II) Module GLcore: vendor="The XFree86 Project"
	compiled for 4.3.0, module version = 1.0.0
	ABI class: XFree86 Server Extension, version 0.2
(II) Loading extension GLX
(II) LoadModule: "siliconmotion"
(II) Loading /usr/X11R6/lib/modules/drivers/siliconmotion_drv.o
(II) Module siliconmotion: vendor="The XFree86 Project"
	compiled for 4.3.0, module version = 1.3.1
	Module class: XFree86 Video Driver
	ABI class: XFree86 Video Driver, version 0.6
(II) LoadModule: "mouse"
(II) Loading /usr/X11R6/lib/modules/input/mouse_drv.o
(II) Module mouse: vendor="The XFree86 Project"
	compiled for 4.3.0, module version = 1.0.0
	Module class: XFree86 XInput Driver
	ABI class: XFree86 XInput driver, version 0.4
(II) Silicon Motion: driver (version 1.3.1) for Silicon Motion Lynx chipsets:
	Lynx, LynxE, Lynx3D, LynxEM, LynxEM+, Lynx3DM
(II) Primary Device is: PCI 00:02:0
(**) Chipset override: lynxem
(**) Chipset LynxEM found
(II) resource ranges after xf86ClaimFixedResources() call:
	[0] -1	0	0xffe00000 - 0xffffffff (0x200000) MX[B](B)
	[1] -1	0	0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B)
	[2] -1	0	0x000f0000 - 0x000fffff (0x10000) MX[B]
	[3] -1	0	0x000c0000 - 0x000effff (0x30000) MX[B]
	[4] -1	0	0x00000000 - 0x0009ffff (0xa0000) MX[B]
	[5] -1	0	0xfd000000 - 0xfdffffff (0x1000000) MX[B](B)
	[6] -1	0	0x0000ffff - 0x0000ffff (0x1) IX[B]
	[7] -1	0	0x00000000 - 0x000000ff (0x100) IX[B]
	[8] -1	0	0x00001c00 - 0x00001cff (0x100) IX[B]E
	[9] -1	0	0x00001800 - 0x000018ff (0x100) IX[B]E
	[10] -1	0	0x00001000 - 0x000010ff (0x100) IX[B]E
	[11] -1	0	0x00001400 - 0x000014ff (0x100) IX[B]E
(II) resource ranges after probing:
	[0] -1	0	0xffe00000 - 0xffffffff (0x200000) MX[B](B)
	[1] -1	0	0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B)
	[2] -1	0	0x000f0000 - 0x000fffff (0x10000) MX[B]
	[3] -1	0	0x000c0000 - 0x000effff (0x30000) MX[B]
	[4] -1	0	0x00000000 - 0x0009ffff (0xa0000) MX[B]
	[5] -1	0	0xfd000000 - 0xfdffffff (0x1000000) MX[B](B)
	[6] 0	0	0x000a0000 - 0x000affff (0x10000) MS[B]
	[7] 0	0	0x000b0000 - 0x000b7fff (0x8000) MS[B]
	[8] 0	0	0x000b8000 - 0x000bffff (0x8000) MS[B]
	[9] -1	0	0x0000ffff - 0x0000ffff (0x1) IX[B]
	[10] -1	0	0x00000000 - 0x000000ff (0x100) IX[B]
	[11] -1	0	0x00001c00 - 0x00001cff (0x100) IX[B]E
	[12] -1	0	0x00001800 - 0x000018ff (0x100) IX[B]E
	[13] -1	0	0x00001000 - 0x000010ff (0x100) IX[B]E
	[14] -1	0	0x00001400 - 0x000014ff (0x100) IX[B]E
	[15] 0	0	0x000003b0 - 0x000003bb (0xc) IS[B]
	[16] 0	0	0x000003c0 - 0x000003df (0x20) IS[B]
(II) Setting vga for screen 0.
(II) Loading sub module "vgahw"
(II) LoadModule: "vgahw"
(II) Loading /usr/X11R6/lib/modules/libvgahw.a
(II) Module vgahw: vendor="The XFree86 Project"
	compiled for 4.3.0, module version = 0.1.0
	ABI class: XFree86 Video Driver, version 0.6
(**) Silicon Motion(0): Depth 16, (--) framebuffer bpp 16
(==) Silicon Motion(0): RGB weight 565
(==) Silicon Motion(0): Default visual is TrueColor
(**) Silicon Motion(0): Option "pci_retry"
(**) Silicon Motion(0): Option "NoAccel"
(**) Silicon Motion(0): Option "ZoomOnLCD"
(**) Silicon Motion(0): "pci_retry" option requires "pci_burst".
(**) Silicon Motion(0): Option: NoAccel - Acceleration disabled
(==) Silicon Motion(0): Using Hardware Cursor
(**) Silicon Motion(0): Option: ZoomOnLCD enabled.
(II) Loading sub module "int10"
(II) LoadModule: "int10"
(II) Loading /usr/X11R6/lib/modules/libint10.a
(II) Module int10: vendor="The XFree86 Project"
	compiled for 4.3.0, module version = 1.0.0
	ABI class: XFree86 Video Driver, version 0.6
(WW) Silicon Motion(0): remove MTRR a0000 - c0000
(WW) Silicon Motion(0): set MTRR c0000 - 100000
(II) Silicon Motion(0): Primary V_BIOS segment is: 0xc000
(WW) Silicon Motion(0): remove MTRR 0 - 1000
(II) Loading sub module "vbe"
(II) LoadModule: "vbe"
(II) Loading /usr/X11R6/lib/modules/libvbe.a
(II) Module vbe: vendor="The XFree86 Project"
	compiled for 4.3.0, module version = 1.1.0
	ABI class: XFree86 Video Driver, version 0.6
(II) Silicon Motion(0): VESA BIOS not detected
(**) Silicon Motion(0): Chipset: "lynxem"
(WW) Silicon Motion(0): remove MTRR fd400000 - fd800000
(II) Silicon Motion(0): Cursor Offset: FFFFFC00 Reserved: FFFFF800
(II) Silicon Motion(0): TFT Panel Size = 1024x768
(II) Silicon Motion(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is 0x0000
(WW) Silicon Motion(0): remove MTRR a0000 - b0000
(II) Loading sub module "i2c"
(II) LoadModule: "i2c"
(II) Loading /usr/X11R6/lib/modules/libi2c.a
(II) Module i2c: vendor="The XFree86 Project"
	compiled for 4.3.0, module version = 1.2.0
	ABI class: XFree86 Video Driver, version 0.6
(II) Silicon Motion(0): I2C bus "I2C bus" initialized.
(II) Loading sub module "ddc"
(II) LoadModule: "ddc"
(II) Loading /usr/X11R6/lib/modules/libddc.a
(II) Module ddc: vendor="The XFree86 Project"
	compiled for 4.3.0, module version = 1.0.0
	ABI class: XFree86 Video Driver, version 0.6
(--) Silicon Motion(0): No DDC signal
(II) Silicon Motion(0): I2C device "I2C bus:ddc2" registered at address 0xA0.
(II) Silicon Motion(0): I2C device "I2C bus:ddc2" removed.
(WW) Silicon Motion(0): remove MTRR 0 - 1000
(==) Silicon Motion(0): Using gamma correction (1.0, 1.0, 1.0)
(--) Silicon Motion(0): videoram: 4096kB
(--) Silicon Motion(0): Detected current MCLK value of 85.909 MHz
(II) Silicon Motion(0): Monitor0: Using hsync range of 31.50-57.50 kHz
(II) Silicon Motion(0): Monitor0: Using vrefresh range of 40.00-80.00 Hz
(II) Silicon Motion(0): Clock range:  20.00 to 135.00 MHz
(II) Silicon Motion(0): Mode: 640x350 16-bpp, 85.079948Hz
...
(II) Silicon Motion(0): Mode: 1024x768 16-bpp, 70.069359Hz
(II) Silicon Motion(0): Mode: 1024x768 16-bpp, 60.003841Hz
(II) Silicon Motion(0): Mode: 832x624 16-bpp, 74.551270Hz
(II) Silicon Motion(0): Mode: 800x600 16-bpp, 75.000000Hz
(II) Silicon Motion(0): Mode: 800x600 16-bpp, 72.187569Hz
(II) Silicon Motion(0): Mode: 800x600 16-bpp, 60.316540Hz
(II) Silicon Motion(0): Mode: 800x600 16-bpp, 56.250000Hz
(II) Silicon Motion(0): Mode: 640x480 16-bpp, 75.000000Hz
(II) Silicon Motion(0): Mode: 640x480 16-bpp, 72.808800Hz
(II) Silicon Motion(0): Mode: 640x480 16-bpp, 60.000000Hz
(--) Silicon Motion(0): Virtual size is 1024x768 (pitch 1024)
(**) Silicon Motion(0): *Default mode "1024x768": 75.0 MHz, 56.5 kHz, 70.1 Hz
(II) Silicon Motion(0): Modeline "1024x768"   75.00  1024 1048 1184 1328  768 771 777 806 -hsync -vsync
(**) Silicon Motion(0):  Default mode "1024x768": 65.0 MHz, 48.4 kHz, 60.0 Hz
(II) Silicon Motion(0): Modeline "1024x768"   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync
(**) Silicon Motion(0):  Default mode "832x624": 57.3 MHz, 49.7 kHz, 74.6 Hz
(II) Silicon Motion(0): Modeline "832x624"   57.28  832 864 928 1152  624 625 628 667 -hsync -vsync
(**) Silicon Motion(0):  Default mode "800x600": 49.5 MHz, 46.9 kHz, 75.0 Hz
(II) Silicon Motion(0): Modeline "800x600"   49.50  800 816 896 1056  600 601 604 625 +hsync +vsync
(**) Silicon Motion(0):  Default mode "800x600": 50.0 MHz, 48.1 kHz, 72.2 Hz
(II) Silicon Motion(0): Modeline "800x600"   50.00  800 856 976 1040  600 637 643 666 +hsync +vsync
(**) Silicon Motion(0):  Default mode "800x600": 40.0 MHz, 37.9 kHz, 60.3 Hz
(II) Silicon Motion(0): Modeline "800x600"   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync
(**) Silicon Motion(0):  Default mode "800x600": 36.0 MHz, 35.2 kHz, 56.2 Hz
(II) Silicon Motion(0): Modeline "800x600"   36.00  800 824 896 1024  600 601 603 625 +hsync +vsync
(**) Silicon Motion(0):  Default mode "640x480": 31.5 MHz, 37.5 kHz, 75.0 Hz
(II) Silicon Motion(0): Modeline "640x480"   31.50  640 656 720 840  480 481 484 500 -hsync -vsync
(**) Silicon Motion(0):  Default mode "640x480": 31.5 MHz, 37.9 kHz, 72.8 Hz
(II) Silicon Motion(0): Modeline "640x480"   31.50  640 664 704 832  480 489 491 520 -hsync -vsync
(**) Silicon Motion(0):  Default mode "640x480": 25.2 MHz, 31.5 kHz, 60.0 Hz
(II) Silicon Motion(0): Modeline "640x480"   25.20  640 656 752 800  480 490 492 525 -hsync -vsync
(==) Silicon Motion(0): DPI set to (75, 75)
(II) Loading sub module "fb"
(II) LoadModule: "fb"
(II) Loading /usr/X11R6/lib/modules/libfb.a
(II) Module fb: vendor="The XFree86 Project"
	compiled for 4.3.0, module version = 1.0.0
	ABI class: XFree86 ANSI C Emulation, version 0.2
(II) Loading sub module "xaa"
(II) LoadModule: "xaa"
(II) Loading /usr/X11R6/lib/modules/libxaa.a
(II) Module xaa: vendor="The XFree86 Project"
	compiled for 4.3.0, module version = 1.1.0
	ABI class: XFree86 Video Driver, version 0.6
(II) Loading sub module "ramdac"
(II) LoadModule: "ramdac"
(II) Loading /usr/X11R6/lib/modules/libramdac.a
(II) Module ramdac: vendor="The XFree86 Project"
	compiled for 4.3.0, module version = 0.1.0
	ABI class: XFree86 Video Driver, version 0.6
(II) do I need RAC?  No, I don't.
(II) resource ranges after preInit:
	[0] 0	0	0xfd000000 - 0xfdffffff (0x1000000) MX[B]
	[1] -1	0	0xffe00000 - 0xffffffff (0x200000) MX[B](B)
	[2] -1	0	0x00100000 - 0x3fffffff (0x3ff00000) MX[B]E(B)
	[3] -1	0	0x000f0000 - 0x000fffff (0x10000) MX[B]
	[4] -1	0	0x000c0000 - 0x000effff (0x30000) MX[B]
	[5] -1	0	0x00000000 - 0x0009ffff (0xa0000) MX[B]
	[6] -1	0	0xfd000000 - 0xfdffffff (0x1000000) MX[B](B)
	[7] 0	0	0x000a0000 - 0x000affff (0x10000) MS[B]
	[8] 0	0	0x000b0000 - 0x000b7fff (0x8000) MS[B]
	[9] 0	0	0x000b8000 - 0x000bffff (0x8000) MS[B]
	[10] -1	0	0x0000ffff - 0x0000ffff (0x1) IX[B]
	[11] -1	0	0x00000000 - 0x000000ff (0x100) IX[B]
	[12] -1	0	0x00001c00 - 0x00001cff (0x100) IX[B]E
	[13] -1	0	0x00001800 - 0x000018ff (0x100) IX[B]E
	[14] -1	0	0x00001000 - 0x000010ff (0x100) IX[B]E
	[15] -1	0	0x00001400 - 0x000014ff (0x100) IX[B]E
	[16] 0	0	0x000003b0 - 0x000003bb (0xc) IS[B]
	[17] 0	0	0x000003c0 - 0x000003df (0x20) IS[B]
(WW) Silicon Motion(0): remove MTRR fd400000 - fd800000
(WW) Silicon Motion(0): set MTRR fd000000 - fd400000
(II) Silicon Motion(0): Cursor Offset: 003FFC00 Reserved: 003FF800
(II) Silicon Motion(0): TFT Panel Size = 1024x768
(II) Silicon Motion(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is 0x0000
(WW) Silicon Motion(0): remove MTRR a0000 - b0000
(WW) Silicon Motion(0): remove MTRR a0000 - c0000
(II) Silicon Motion(0): Primary V_BIOS segment is: 0xc000
(WW) Silicon Motion(0): remove MTRR 0 - 1000
(II) Silicon Motion(0): Current mode 0x00.
(II) Silicon Motion(0): 	SMI_GEReset called from smi_driver.c line 1559
(II) Silicon Motion(0): 	SMI_GEReset called from smi_accel.c line 263
(II) Silicon Motion(0): 	SMI_GEReset called from smi_accel.c line 263
(II) Silicon Motion(0): 	SMI_GEReset called from smi_accel.c line 263
(II) Silicon Motion(0): 	SMI_GEReset called from smi_accel.c line 263
(II) Silicon Motion(0): 	SMI_GEReset called from smi_accel.c line 263
(II) Silicon Motion(0): 	SMI_GEReset called from smi_accel.c line 263
(II) Silicon Motion(0): 	SMI_GEReset called from smi_accel.c line 263
(II) Silicon Motion(0): 	SMI_GEReset called from smi_accel.c line 263
(II) Silicon Motion(0): 	SMI_GEReset called from smi_accel.c line 263
(II) Silicon Motion(0): 	SMI_GEReset called from smi_accel.c line 263
(II) Silicon Motion(0): 	SMI_GEReset called from smi_accel.c line 263
(II) Silicon Motion(0): 	SMI_GEReset called from smi_accel.c line 263
(II) Silicon Motion(0): 	SMI_GEReset called from smi_accel.c line 263
(II) Silicon Motion(0): 	SMI_GEReset called from smi_accel.c line 263
...


XF86Config-4:

Section "ServerLayout"
	Identifier     "XFree86 Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	RgbPath      "/usr/X11R6/lib/X11/rgb"
	ModulePath   "/usr/X11R6/lib/modules"
	FontPath     "/usr/X11R6/lib/X11/fonts/misc/"
	FontPath     "/usr/X11R6/lib/X11/fonts/intlfonts/"
	FontPath     "/usr/X11R6/lib/X11/fonts/Mozilla/"
	FontPath     "/usr/X11R6/lib/X11/fonts/Speedo/"
	FontPath     "/usr/X11R6/lib/X11/fonts/Type1/"
	FontPath     "/usr/X11R6/lib/X11/fonts/CID/"
	FontPath     "/usr/X11R6/lib/X11/fonts/75dpi/"
	FontPath     "/usr/X11R6/lib/X11/fonts/100dpi/"
	FontPath     "/usr/X11R6/lib/X11/fonts/cyrillic/"
	FontPath     "/usr/X11R6/lib/X11/fonts/biznet/75dpi/"
	FontPath     "/usr/X11R6/lib/X11/fonts/biznet/100dpi/"
	FontPath     "/usr/X11R6/lib/X11/fonts/biznet/misc/"
	FontPath     "unix/:7101"
EndSection

Section "Module"
	Load  "dbe"
	SubSection "extmod"
		Option	    "omit xfree86-dga"
	EndSubSection
	Load  "type1"
	Load  "speedo"
	Load  "glx"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "keyboard"
	Option	    "AutoRepeat" "500 30"
	Option	    "XkbLayout" "czsk(us_sk_qwerty)"
	Option	    "XkbCompat" "group_led"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "wsmouse"
	Option	    "Device" "/dev/wsmouse"
	Option	    "Emulate3Buttons"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "ASUS"
	ModelName    "LCD 1024x768"
	HorizSync    31.5 - 57.5
	VertRefresh  40.0 - 80.0
	Option       "Nodpms"
EndSection

Section "Device"
	Identifier  "Card0"
	Driver      "siliconmotion"
	VendorName  "Silicon Motion Inc."
	BoardName   "LynxEM"
	ChipSet     "lynxem"
	Option      "NoAccel"
#	Option	    "NoUseBIOS"
        Option      "ZoomOnLCD"
	Option	    "fifo_aggressive"
	Option	    "pci_burst"
	Option	    "pci_retry"
	BusID       "PCI:0:2:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	DefaultDepth     16
	SubSection "Display"
		Depth     16
		Modes    "1024x768"
	EndSubSection
	SubSection "Display"
		Depth     24
		Modes    "1024x768"
	EndSubSection
EndSection

Section "DRI"
	Group        0
EndSection

>How-To-Repeat:

- get a machine with graphics card supported by siliconmotion driver (i am using
  ASUS L7300-E laptop)
- install NetBSD/i386 system (i am using 1.6P -current)
- install XFree86 4.3.0 either from xsrc or vanilla sources from xfree86.org
- try to run X, see it looping on unrecoverable error, leaving black screen

>Fix:

this is not really a fix for the problem i am seeing but it might be necessary
for correct function of the X server after this problem is resolved.

--- smi_driver.c.orig	2002-01-19 16:10:32.000000000 +0100
+++ smi_driver.c	2003-03-11 18:20:25.000000000 +0100
@@ -1406,7 +1406,7 @@
 	ENTER_PROC("SMI_Save");
 
 	/* Save the standard VGA registers */
-	vgaHWSave(pScrn, vgaSavePtr, VGA_SR_MODE);
+	vgaHWSave(pScrn, vgaSavePtr, VGA_SR_ALL);
 	save->smiDACMask = VGAIN8(pSmi, VGA_DAC_MASK);
 	VGAOUT8(pSmi, VGA_DAC_READ_ADDR, 0);
 	for (i = 0; i < 256; i++)
@@ -1597,7 +1597,7 @@
 		VGAOUT8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0xA0, restore->SRA0);
 
 		/* Restore the standard VGA registers */
-		vgaHWRestore(pScrn, vgaSavePtr, VGA_SR_MODE);
+		vgaHWRestore(pScrn, vgaSavePtr, VGA_SR_ALL);
 		if (restore->smiDACMask)
 		{
 			VGAOUT8(pSmi, VGA_DAC_MASK, restore->smiDACMask);
@@ -1668,7 +1668,7 @@
 		}
 		else
 		{
-			vgaHWRestore(pScrn, vgaSavePtr, VGA_SR_MODE);
+			vgaHWRestore(pScrn, vgaSavePtr, VGA_SR_ALL);
 		}
 
 		if (!SMI_LYNXM_SERIES(pSmi->Chipset))
>Release-Note:
>Audit-Trail:
>Unformatted: