drm: Implement simple broken EDID override by loading firmware (v16)
authorzrj <rimvydas.jasinskas@gmail.com>
Fri, 20 Nov 2015 11:59:41 +0000 (13:59 +0200)
committerFran├žois Tigeot <ftigeot@wolfpond.org>
Thu, 26 Nov 2015 08:35:19 +0000 (09:35 +0100)
commit819060d54b19321f7f9f213e90c1b8d3dc87a45e
tree6655d21241890ebe558d338b52a0594c3698e0d3
parent67ab61326d8e4f50344b8d9e4e9c5cc48f363836
drm: Implement simple broken EDID override by loading firmware (v16)

Main differences between this variant and its gpl analogue:
  * permissive license;
  * no builtin generic EDID data blocks;

Generic EDID firmware can be used from new dports/sysutils/devedid-data port.
Still it is better to use monitor specific EDID block, either by modifying
generic variants or repairing dumped one or even better extracting from
working identical monitor if it is available (look for hex dump in Xorg.0.log).

Make sure that used fw.bin at least has correct resolutions and valid checksum.
This can be done with sysutils/edid-decode utility.

Tested with broken lcd panel returning corrupted EDID block on dvi port:
  * radeonkms R7 240, dvi and dvi2hdmi cable adapter
    echo 'drm.edid_firmware="DVI-D-1:edidfw_repaired"' >> /boot/loader.conf

  * i915 Haswell i7-4712MQ laptop, dvi2hdmi cable adapter
    echo 'drm.edid_firmware="HDMI-A-1:edidfw_1920x1080"' >> /boot/loader.conf
    echo 'drm.video.hdmia1="e"  # force enable on i915' >> /boot/loader.conf

While here, document tunables: drm.video.<connector> and new drm.edid_firmware.
share/man/man4/drm.4
sys/conf/files
sys/dev/drm/drm/Makefile
sys/dev/drm/drm_edid_load.c [new file with mode: 0644]
sys/dev/drm/include/drm/drm_os_linux.h