Merge tag '9p-for-5.3' of git://github.com/martinetd/linux
[sfrench/cifs-2.6.git] / Documentation / EDID / howto.rst
1 :orphan:
2
3 ====
4 EDID
5 ====
6
7 In the good old days when graphics parameters were configured explicitly
8 in a file called xorg.conf, even broken hardware could be managed.
9
10 Today, with the advent of Kernel Mode Setting, a graphics board is
11 either correctly working because all components follow the standards -
12 or the computer is unusable, because the screen remains dark after
13 booting or it displays the wrong area. Cases when this happens are:
14 - The graphics board does not recognize the monitor.
15 - The graphics board is unable to detect any EDID data.
16 - The graphics board incorrectly forwards EDID data to the driver.
17 - The monitor sends no or bogus EDID data.
18 - A KVM sends its own EDID data instead of querying the connected monitor.
19 Adding the kernel parameter "nomodeset" helps in most cases, but causes
20 restrictions later on.
21
22 As a remedy for such situations, the kernel configuration item
23 CONFIG_DRM_LOAD_EDID_FIRMWARE was introduced. It allows to provide an
24 individually prepared or corrected EDID data set in the /lib/firmware
25 directory from where it is loaded via the firmware interface. The code
26 (see drivers/gpu/drm/drm_edid_load.c) contains built-in data sets for
27 commonly used screen resolutions (800x600, 1024x768, 1280x1024, 1600x1200,
28 1680x1050, 1920x1080) as binary blobs, but the kernel source tree does
29 not contain code to create these data. In order to elucidate the origin
30 of the built-in binary EDID blobs and to facilitate the creation of
31 individual data for a specific misbehaving monitor, commented sources
32 and a Makefile environment are given here.
33
34 To create binary EDID and C source code files from the existing data
35 material, simply type "make".
36
37 If you want to create your own EDID file, copy the file 1024x768.S,
38 replace the settings with your own data and add a new target to the
39 Makefile. Please note that the EDID data structure expects the timing
40 values in a different way as compared to the standard X11 format.
41
42 X11:
43   HTimings:
44     hdisp hsyncstart hsyncend htotal
45   VTimings:
46     vdisp vsyncstart vsyncend vtotal
47
48 EDID::
49
50   #define XPIX hdisp
51   #define XBLANK htotal-hdisp
52   #define XOFFSET hsyncstart-hdisp
53   #define XPULSE hsyncend-hsyncstart
54
55   #define YPIX vdisp
56   #define YBLANK vtotal-vdisp
57   #define YOFFSET vsyncstart-vdisp
58   #define YPULSE vsyncend-vsyncstart