Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jan 2015 04:41:54 +0100
From:      Michael Gmelin <freebsd@grem.de>
To:        freebsd-x11@freebsd.org
Cc:        Konstantin Belousov <kib@FreeBSD.org>
Subject:   Testing i915kms/Haswell on Intel 4th generation grpahics
Message-ID:  <20150106044154.50171e38@bsd64.grem.de>

next in thread | raw e-mail | index | archive | help
Hi,

I took kib's patches from https://www.kib.kiev.ua/kib/drm/ and merged
them into CURRENT (a couple of changes in vm). I also added my chipset
id to pciids, i915 and agp.

The merged/updated patch can be found here:

http://blog.grem.de/bits/haswellgfx_20150106.patch

I tested on amd64 on an Acer C720 Chromebook, tests were done using
drm.debug=2.

pciconf -lv
vgapci0@pci0:0:2:0:     class=0x030000 card=0x0a111025 chip=0x0a068086
rev=0x09 hdr=0x00 vendor     = 'Intel Corporation'
    device     = 'Haswell-ULT Integrated Graphics Controller'
    class      = display
    subclass   = VGA

After loading the i915kms the screen goes blank, this is due to not
detecting the LCD panel. If I connect a screen to HDMI out, the output
is actually shown on the laptop's panel. It comes up in the wrong
resolution, but can be corrected using xrandr (I had various results,
but at some point after booting with HDMI connected I got the panel's
physical resolution). Obviously vt is still garbled.

I had some artefacts after starting X, those went away after launching
Chrome (which got stuck for a few seconds after launch, then caused an
error message on the console). After that I could play full screen
video just fine. Hot-plug support seems to work in general.

Trying to suspend the machine using acpiconf didn' work:

[drm:KMS:pid11280:i915_suspend] starting suspend
drmn0: GEM idle failed, resume might fail
acpi0: device_suspend failed

Power management doesn't work (the machine is running pretty hot),
consumption is much higher than would you would normally see on this
laptop:

[root@flimsy /usr/src/sys/dev]# acpiconf -i batt
Design capacity:        4030 mAh
Last full capacity:     3877 mAh
...
State:                  discharging 
Remaining capacity:     20%
Remaining time:         0:35
Present rate:           1382 mA (15084 mW)
Present voltage:        10915 mV

Command line interaction (please remember that all of this was with a
TV connected to HDMI out, otherwise both detected outputs [VGA1 and
HDMI1 wouldn't show any modes):

$ startx
X.Org X Server 1.14.7
Release Date: 2014-06-05
X Protocol Version 11, Revision 0
Build Operating System: FreeBSD 11.0-CURRENT amd64 
Current Operating System: FreeBSD flimsy 11.0-CURRENT FreeBSD
11.0-CURRENT #11 8163e55(master): Tue Jan  6 02:08:40 CET 2015
root@flimsy:/usr/obj/usr/src/sys/MINIMAL amd64 Build Date: 26 December
2014  03:23:26PM Current version of pixman: 0.32.4
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
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/Xorg.0.log", Time: Tue Jan  6 03:20:03 2015
(==) Using default built-in configuration (30 lines)
Initializing built-in extension Generic Event Extension
Initializing built-in extension SHAPE
Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension
Initializing built-in extension XTEST
Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC
Initializing built-in extension XKEYBOARD
Initializing built-in extension XC-MISC
Initializing built-in extension XINERAMA
Initializing built-in extension XFIXES
Initializing built-in extension RENDER
Initializing built-in extension RANDR
Initializing built-in extension COMPOSITE
Initializing built-in extension DAMAGE
Initializing built-in extension MIT-SCREEN-SAVER
Initializing built-in extension DOUBLE-BUFFER
Initializing built-in extension RECORD
Initializing built-in extension DPMS
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension XFree86-VidModeExtension
Initializing built-in extension XFree86-DGA
Initializing built-in extension XFree86-DRI
Initializing built-in extension DRI2
Loading extension GLX
warning: output default not found; ignoring

^Z[1] + Suspended               startx
$ bg 
[1] startx
$ export DISPLAY=:0
$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1920x1080+0+0 (normal left inverted right x axis y
axis) 820mm x 460mm 1920x1080     50.00*+  60.00  
   1920x1200     59.95  
   1920x1080i    50.00  
   1600x1200     60.00  
   1680x1050     59.95    59.88  
   1680x945      60.02  
   1400x1050     59.98    59.95  
   1600x900      59.98  
   1280x1024     60.02  
   1440x900      74.98    59.89    59.90  
   1280x960      60.00  
   1366x768      60.02  
   1360x768      60.02  
   1280x800      74.93    59.81    59.91  
   1152x864      75.00  
   1280x768      74.89    59.87    59.99  
   1024x768      75.08    75.03    70.07    60.00  
   1024x576      59.97  
   800x600       72.19    75.00    60.32    56.25  
   848x480       60.00  
   640x480       72.81    72.81    75.00    60.00    59.94  
   720x400       70.08  
$ xrandr --output HDMI1 --mode 1366x768
$ ATTENTION: default value of option force_s3tc_enable overridden by
environment. [1351:343958528:0106/032119:ERROR:texture_manager.cc(1561)]
[.Compositor-0x8149eac00]GL ERROR :GL_INVALID_OPERATION : glTexImage2D:
<- error from previous GL command intel_do_flush_locked failed:
Input/output error ATTENTION: default value of option force_s3tc_enable
overridden by environment. intel_do_flush_locked failed: Input/output
error
[1347:343958528:0106/032126:ERROR:gpu_process_transport_factory.cc(402)]
Failed to establish GPU channel.

Debug output is here:

http://blog.grem.de/bits/haswellgfx_syslog_debug.txt
http://blog.grem.de/bits/haswellgfx_i915_error_state.txt

Cheers,
Michael

p.s. With debug mode disabled I got a kernel panic on loading the
driver, I didn't verify yet if this was due to an unclean build and if
it is reproducible.

-- 
Michael Gmelin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150106044154.50171e38>