| commit | 8540805c2900f3f7b40dfc2c520d66c96368e0f7 | [log] [tgz] |
|---|---|---|
| author | Nico Huber <nico.huber@secunet.com> | Wed Jul 19 14:14:34 2017 +0200 |
| committer | Nico Huber <nico.h@gmx.de> | Wed Aug 30 15:14:01 2017 +0000 |
| tree | 882c8116647ed9d43aef29f20bb76a66a08b2c96 | |
| parent | 234e772f4266412a56266067a40163f4dea7a2db [diff] |
gma skl: Prevent race by late timeout check We initialize the timeout variable before the first event on the other side (i.e. us sending a request to PCODE). With very slow debug output sending the request itself might take longer than the timeout period. Reorder the code to check the timeout condition only after the first try and thereby make sure that we always try at least twice. Also issue a debug message in case we timed out. Change-Id: I8cdeb3e36d7eafbef8a1a8e13670f3f9838a2f38 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/20647 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
libgfxinit is a graphics initialization (aka modesetting) library for embedded environments. It currently supports only Intel hardware, more specifically the Intel Core processor line.
It can query and set up most kinds of displays based on their EDID information. You can, however, also specify particular mode lines.
libgfxinit is written in SPARK, an Ada subset with formal verifica- tion aspects. Absence of runtime errors can be proved automatically with SPARK GPL 2016.
For compilation, the GNAT Ada compiler is required. Usual package names in Linux distributions are gcc-ada and gnat.
You'll need libhwbase and libgfxinit. Best is to clone the reposi- tories into a common parent directory (this way libgfxinit will know where to find libhwbase).
$ mkdir gfxfun && cd gfxfun $ git clone https://review.coreboot.org/p/libhwbase.git $ git clone https://review.coreboot.org/p/libgfxinit.git
Both libraries are currently configured by hand-written config files. You can either write your own .config, link one of the shipped files in configs/, e.g.:
$ ln -s configs/linux libhwbase/.config
or overwrite the config filename by specifying cnf=<configfile> on the make command line.
Let's install libhwbase. We'll need configs/linux to build regular Linux executables:
$ cd libhwbase $ make cnf=configs/linux install
By default this installs into a new subdirectory dest. You can however overwrite this decision by specifying DESTDIR=.
gfx_testlibgfxinit is configured and installed in the same manner as de- scribed above. You will have to select a configuration matching your hardware.
The makefile knows an additional target gfx_test to build a small Linux test application:
$ cd ../libgfxinit $ make cnf=configs/sandybridge gfx_test
The resulting binary is build/gfx_test.
In its current state gfx_test doesn't know how to set up a frame- buffer. It just assumes that enough memory is mapped. This is known to work well, after running the VBIOS but before the Linux driver i915 took over (e.g. when booting with nomodeset in the kernel command line or with i915 blacklisted). After running i915 it only works by chance.
When running gfx_test (as root), it will access the graphics hard- ware through the sysfs PCI interface. The path is
/sys/devices/pci0000:00/0000:00:02.0/
for all supported platforms.
If you chose the right config above, you should be presented with a nice test image. However, gfx_test is one-way only: The graphics hardware will stay in this state, until another driver takes over.