drm: Allow early kms with monitor EDID override.
authorzrj <rimvydas.jasinskas@gmail.com>
Tue, 29 Mar 2016 16:09:01 +0000 (19:09 +0300)
committerzrj <zrj@dragonflybsd.org>
Tue, 29 Mar 2016 16:44:29 +0000 (19:44 +0300)
commit794ee81f78a2d03df3d64b763788b99d565ab150
tree9591a4f6c9d96ac00040f2c36a336caec17274f9
parent8260ce22ad9c50711878c233095f7f3fb4a82ac2
drm: Allow early kms with monitor EDID override.

While firmware_put(fw, FIRMWARE_UNLOAD) works great when
fw can be loaded multiple times through kernel fw module,
this functionality breaks when loading i915 and radeonkms
together with EDID override module from /boot/loader.conf

Since DRM reads EDID firmware multiple times, it is best
to delay FW_UNLOAD to at least when / is accessable.
Doing that allows to have an early kms with a monitor
reporting bad EDID information at a native resolution.

EDID fw is usually just 128 bytes and still can be unloaded
if it was autoloaded by loader.

Tested-on: early i915 with eDP and broken external LCD panels.
sys/dev/drm/drm_edid_load.c