Mauro Carvalho Chehab | baa293e | 2019-06-27 15:39:22 -0300 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0 |
Mauro Carvalho Chehab | a2f405a | 2019-06-12 14:53:04 -0300 | [diff] [blame] | 2 | |
| 3 | ==== |
| 4 | EDID |
| 5 | ==== |
| 6 | |
Carsten Emde | da0df92 | 2012-03-18 22:37:33 +0100 | [diff] [blame] | 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: |
Jonathan Neuschäfer | 1733ec7 | 2020-02-14 18:41:32 +0100 | [diff] [blame] | 14 | |
Carsten Emde | da0df92 | 2012-03-18 22:37:33 +0100 | [diff] [blame] | 15 | - 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äfer | 1733ec7 | 2020-02-14 18:41:32 +0100 | [diff] [blame] | 20 | |
Carsten Emde | da0df92 | 2012-03-18 22:37:33 +0100 | [diff] [blame] | 21 | Adding the kernel parameter "nomodeset" helps in most cases, but causes |
| 22 | restrictions later on. |
| 23 | |
| 24 | As a remedy for such situations, the kernel configuration item |
| 25 | CONFIG_DRM_LOAD_EDID_FIRMWARE was introduced. It allows to provide an |
| 26 | individually prepared or corrected EDID data set in the /lib/firmware |
| 27 | directory 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 Thompson | 4cbe1bfa | 2014-05-23 16:01:43 +0100 | [diff] [blame] | 29 | commonly used screen resolutions (800x600, 1024x768, 1280x1024, 1600x1200, |
Carsten Emde | 8091ee5 | 2013-04-06 16:01:34 +0000 | [diff] [blame] | 30 | 1680x1050, 1920x1080) as binary blobs, but the kernel source tree does |
| 31 | not contain code to create these data. In order to elucidate the origin |
| 32 | of the built-in binary EDID blobs and to facilitate the creation of |
| 33 | individual data for a specific misbehaving monitor, commented sources |
| 34 | and a Makefile environment are given here. |
Carsten Emde | da0df92 | 2012-03-18 22:37:33 +0100 | [diff] [blame] | 35 | |
| 36 | To create binary EDID and C source code files from the existing data |
Jonathan Neuschäfer | b4ce545 | 2020-02-14 18:41:35 +0100 | [diff] [blame] | 37 | material, simply type "make" in tools/edid/. |
Carsten Emde | da0df92 | 2012-03-18 22:37:33 +0100 | [diff] [blame] | 38 | |
Carsten Emde | bac4b7c | 2012-07-19 15:54:25 +0000 | [diff] [blame] | 39 | If you want to create your own EDID file, copy the file 1024x768.S, |
| 40 | replace the settings with your own data and add a new target to the |
| 41 | Makefile. Please note that the EDID data structure expects the timing |
| 42 | values in a different way as compared to the standard X11 format. |
| 43 | |
| 44 | X11: |
Mauro Carvalho Chehab | a2f405a | 2019-06-12 14:53:04 -0300 | [diff] [blame] | 45 | HTimings: |
| 46 | hdisp hsyncstart hsyncend htotal |
| 47 | VTimings: |
| 48 | vdisp vsyncstart vsyncend vtotal |
Carsten Emde | bac4b7c | 2012-07-19 15:54:25 +0000 | [diff] [blame] | 49 | |
Mauro Carvalho Chehab | a2f405a | 2019-06-12 14:53:04 -0300 | [diff] [blame] | 50 | EDID:: |
Carsten Emde | bac4b7c | 2012-07-19 15:54:25 +0000 | [diff] [blame] | 51 | |
Mauro Carvalho Chehab | a2f405a | 2019-06-12 14:53:04 -0300 | [diff] [blame] | 52 | #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 |