blob: 80deeb21a265fa8f4df01b71096613ddb6fcb87b [file] [log] [blame]
Mauro Carvalho Chehabbaa293e2019-06-27 15:39:22 -03001.. SPDX-License-Identifier: GPL-2.0
Mauro Carvalho Chehaba2f405a2019-06-12 14:53:04 -03002
3====
4EDID
5====
6
Carsten Emdeda0df922012-03-18 22:37:33 +01007In the good old days when graphics parameters were configured explicitly
8in a file called xorg.conf, even broken hardware could be managed.
9
10Today, with the advent of Kernel Mode Setting, a graphics board is
11either correctly working because all components follow the standards -
12or the computer is unusable, because the screen remains dark after
13booting or it displays the wrong area. Cases when this happens are:
Jonathan Neuschäfer1733ec72020-02-14 18:41:32 +010014
Carsten Emdeda0df922012-03-18 22:37:33 +010015- The graphics board does not recognize the monitor.
16- The graphics board is unable to detect any EDID data.
17- The graphics board incorrectly forwards EDID data to the driver.
18- The monitor sends no or bogus EDID data.
19- A KVM sends its own EDID data instead of querying the connected monitor.
Jonathan Neuschäfer1733ec72020-02-14 18:41:32 +010020
Carsten Emdeda0df922012-03-18 22:37:33 +010021Adding the kernel parameter "nomodeset" helps in most cases, but causes
22restrictions later on.
23
24As a remedy for such situations, the kernel configuration item
25CONFIG_DRM_LOAD_EDID_FIRMWARE was introduced. It allows to provide an
26individually prepared or corrected EDID data set in the /lib/firmware
27directory from where it is loaded via the firmware interface. The code
28(see drivers/gpu/drm/drm_edid_load.c) contains built-in data sets for
Daniel Thompson4cbe1bfa2014-05-23 16:01:43 +010029commonly used screen resolutions (800x600, 1024x768, 1280x1024, 1600x1200,
Carsten Emde8091ee52013-04-06 16:01:34 +0000301680x1050, 1920x1080) as binary blobs, but the kernel source tree does
31not contain code to create these data. In order to elucidate the origin
32of the built-in binary EDID blobs and to facilitate the creation of
33individual data for a specific misbehaving monitor, commented sources
34and a Makefile environment are given here.
Carsten Emdeda0df922012-03-18 22:37:33 +010035
36To create binary EDID and C source code files from the existing data
Jonathan Neuschäferb4ce5452020-02-14 18:41:35 +010037material, simply type "make" in tools/edid/.
Carsten Emdeda0df922012-03-18 22:37:33 +010038
Carsten Emdebac4b7c2012-07-19 15:54:25 +000039If you want to create your own EDID file, copy the file 1024x768.S,
40replace the settings with your own data and add a new target to the
41Makefile. Please note that the EDID data structure expects the timing
42values in a different way as compared to the standard X11 format.
43
44X11:
Mauro Carvalho Chehaba2f405a2019-06-12 14:53:04 -030045 HTimings:
46 hdisp hsyncstart hsyncend htotal
47 VTimings:
48 vdisp vsyncstart vsyncend vtotal
Carsten Emdebac4b7c2012-07-19 15:54:25 +000049
Mauro Carvalho Chehaba2f405a2019-06-12 14:53:04 -030050EDID::
Carsten Emdebac4b7c2012-07-19 15:54:25 +000051
Mauro Carvalho Chehaba2f405a2019-06-12 14:53:04 -030052 #define XPIX hdisp
53 #define XBLANK htotal-hdisp
54 #define XOFFSET hsyncstart-hdisp
55 #define XPULSE hsyncend-hsyncstart
56
57 #define YPIX vdisp
58 #define YBLANK vtotal-vdisp
59 #define YOFFSET vsyncstart-vdisp
60 #define YPULSE vsyncend-vsyncstart