Load EDID file on custom build (IOT-GATE-IMX8PLUS)

I’m making a custom build of balenaOS because I need to use a screen with a 1280x800 resolution which needs a custom EDID file.
I tried this using Compulab’s Yocto image, and I successfully loaded the EDID file to get the 1280x800 resolution. To achieve this I had to change some boot parameters in GRUB, and I would like to do something similar using u-boot.
I created a recipe to add the EDID binary to /lib/firmware/edid, and also re-enabled the SAVEENV command on U-Boot to change the variables.
I’ve tried changing different variables (without saving) to load the edid file, but I get the following errors:
platform HDMI-A-1: Direct firmware load for edid/edid.bin failed with error -2
[drm:edid_load] *ERROR* Requesting EDID firmware "edid/edid.bin" failed (err=-2)

I believe this error indicates that the file could not be found.
I checked the HostOS and I can see the file in lib/firmware/edid, but I think the boot process is trying to load the file before the rootfs has been loaded.
I also enabled the kernel configuration CONFIG_DRM_LOAD_EDID_FIRMWARE=y.

Could you give me some advice on which boot variables I need to change to successfully load the EDID file?
Or maybe you could tell me where I need to add the file so it is available on boot?

Hi @niuslar ,

You are right, looking at the iot-gate-imx8plus’s defconfig I see:
CONFIG_DRM_KMS_HELPER=y

so this driver is built-in, and therefore tries to load the custom edid firmware from the kernel initramfs image instead of the rootfs, like you said. Can you please try switch to CONFIG_DRM_KMS_HELPER=m using this example so that both the driver and the edid binary are located in the rootfs? That should allow the custom edid binary to be loaded.

I tried changing CONFIG_DRM_KMS_HELPER from [=y] to [=m], but the changes didn’t work.
When I try to load the EDID binary I keep getting the same error and when I check the kernel configuration, CONFIG_DRM_KMS_HELPER is set to [=y].
It looks like it is selected by other kernel config options and is being set to yes.

I managed to fix most of the issues by adding rootwait rw to U-Boot.
The only issue is that the EDID binary is still loaded after the splash screen, which is causing the balena logo to look very stretched.

1 Like