blob: 835db332289b35aa0d126dc7065572dfd82e801e [file] [log] [blame]
Carsten Emdeda0df922012-03-18 22:37:33 +01001In the good old days when graphics parameters were configured explicitly
2in a file called xorg.conf, even broken hardware could be managed.
3
4Today, with the advent of Kernel Mode Setting, a graphics board is
5either correctly working because all components follow the standards -
6or the computer is unusable, because the screen remains dark after
7booting or it displays the wrong area. Cases when this happens are:
8- The graphics board does not recognize the monitor.
9- The graphics board is unable to detect any EDID data.
10- The graphics board incorrectly forwards EDID data to the driver.
11- The monitor sends no or bogus EDID data.
12- A KVM sends its own EDID data instead of querying the connected monitor.
13Adding the kernel parameter "nomodeset" helps in most cases, but causes
14restrictions later on.
15
16As a remedy for such situations, the kernel configuration item
17CONFIG_DRM_LOAD_EDID_FIRMWARE was introduced. It allows to provide an
18individually prepared or corrected EDID data set in the /lib/firmware
19directory from where it is loaded via the firmware interface. The code
20(see drivers/gpu/drm/drm_edid_load.c) contains built-in data sets for
Daniel Thompson4cbe1bfa2014-05-23 16:01:43 +010021commonly used screen resolutions (800x600, 1024x768, 1280x1024, 1600x1200,
Carsten Emde8091ee52013-04-06 16:01:34 +0000221680x1050, 1920x1080) as binary blobs, but the kernel source tree does
23not contain code to create these data. In order to elucidate the origin
24of the built-in binary EDID blobs and to facilitate the creation of
25individual data for a specific misbehaving monitor, commented sources
26and a Makefile environment are given here.
Carsten Emdeda0df922012-03-18 22:37:33 +010027
28To create binary EDID and C source code files from the existing data
29material, simply type "make".
30
Carsten Emdebac4b7c2012-07-19 15:54:25 +000031If you want to create your own EDID file, copy the file 1024x768.S,
32replace the settings with your own data and add a new target to the
33Makefile. Please note that the EDID data structure expects the timing
34values in a different way as compared to the standard X11 format.
35
36X11:
37HTimings: hdisp hsyncstart hsyncend htotal
38VTimings: vdisp vsyncstart vsyncend vtotal
39
40EDID:
41#define XPIX hdisp
42#define XBLANK htotal-hdisp
43#define XOFFSET hsyncstart-hdisp
44#define XPULSE hsyncend-hsyncstart
45
46#define YPIX vdisp
47#define YBLANK vtotal-vdisp
48#define YOFFSET (63+(vsyncstart-vdisp))
49#define YPULSE (63+(vsyncend-vsyncstart))
50
51The CRC value in the last line
Carsten Emdeda0df922012-03-18 22:37:33 +010052 #define CRC 0x55
Carsten Emdebac4b7c2012-07-19 15:54:25 +000053also is a bit tricky. After a first version of the binary data set is
54created, it must be checked with the "edid-decode" utility which will
Carsten Emdeda0df922012-03-18 22:37:33 +010055most probably complain about a wrong CRC. Fortunately, the utility also
56displays the correct CRC which must then be inserted into the source
57file. After the make procedure is repeated, the EDID data set is ready
58to be used.