edid.rst 2.3 KB

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