Apalis IMX8QM 4GB WB IT V1.1C
Ixora V1.2A
Custom linux based on tdx-reference-multimedia-image, without wayland and with Qt5 EGLFS + gstreamer 1.18
Hello,
I want to know if it is possible to :
read EDID from HDMI ( with DRM interface )
force a resoluton with DRM interface.
if I plug the ixora board + apalis IMX8QM:
on a 4K samsung TV 40’’ UE40MU9106K , the output is 3840x2160@60 and kernel says :
[ 6.084313] [drm] Mode: 3840x2160p594000
[ 6.112738] [drm] Pixel clock: 594000 KHz, character clock: 594000, bpc is 8-bit.
[ 6.112747] [drm] VCO frequency is 5940000 KHz
[ 6.448372] imx-drm display-subsystem: fb0: imx-drmdrmfb frame buffer device
on a 4K samsung TV 49’’ QE49Q7, the output is 3840x2160@30 and kernel says :
[ 6.625556] [drm] Mode: 3840x2160p297000
[ 6.652563] [drm] Pixel clock: 297000 KHz, character clock: 297000, bpc is 8-bit.
[ 6.652571] [drm] VCO frequency is 2970000 KHz
Both TV supports 4K@60 , so I don’t know why on one TV , only 4K@30 is activated. I have tested with 2 different cards , and 3 HDMI cable ( 4K certified ) , nothing changes.
To investigate this, I need to be able to read the EDID , and/or force a specific resolution. But I don’t use wayland, it is a drm ( fb ) configuration.
Is it possible to do this ?
It seems that the screen should not support 2160p60 ?
“93” is 2160p24, “94” is 2160p25, “95” is 2160p30 ( for 16/9 - 1/1 ) , there is not “97” which should be 2160p60. I am surprised that the monitor doesn’t support 2160p60. I will try another device on it to be sure of this.
One another question. How should I force 2160p24 here ? ( which is better than 2160p60 for me ) just suppress all the display modes except “93” ( 2160p24 ) inside edid file, and inject it with the “inject binary edid blob” procedure ?
I will catch the edid from the other monitor ( the 40’’ which works ) to compare…
One another question. How should I force 2160p24 here ? ( which is better than 2160p60 for me ) just suppress all the display modes except “93” ( 2160p24 ) inside edid file, and inject it with the “inject binary edid blob” procedure ?
I think you could do exactly that, just create a binary EDID file with just the mode you want the monitor to work on, and then inject it using the command line as described in the article.
unfortunately, it doesn’t work. I have generated a 256byte edid file based on the original edid from the monitor, and I remove all the modes except 2160p24 ( 93 ).
I tried your link :
echo edid.bin > /sys/module/drm/parameters/edid_firmware → do nothing ( monitor plugged, unplugged and plugged again, nothing change )
cat edid.bin > /sys/kernel/debug/dri/0/HDMI-A-2/edid_override , for me it is : cat correct-edid.bin > /sys/kernel/debug/dri/1/HDMI-A-1/edid_override → it do nothing ( monitor plugged, unplugged, and plugged again , nothing change )
For the kernel command line, I don’t know where to edit it : drm.edid_firmware=edid/your_edid.bin
maybe uboot + setenv ? other thing ?
Every time I plug again the HDMI cable from the monitor, the /sys/class/drm/card1-HDMI-A-1/edid has the initial value ( all the modes without 2160p60 , including 2160p30 )
Maybe it is not possible to force the mode on this particular setup ?
That’s unfortunate. I looked it up a little bit more and it seems that it’s not just a matter of binary editing the EDID file and removing entries. EDID files contain at least a CRC, which would need to be recalculated correctly for it to work.
If you look inside the kernel sources, you’ll find this directory:
Documentation/EDID/
Inside it you will find several files that generate some monitor modes, together with a makefile to create the binaries. With that, I think you would need to have the proper data of your monitor for the correct mode you need and input it in a new file, and then generate a new EDID file.
Please see this answer for more info:
To check if the EDID you generated is indeed broken, I would suggest you to install the read-edid package on your linux distribution and then use something like:
cat edid.bin|parse-edid
You can also compile read-edid for the target and use it to parse the edid directly from the sysfs:
I up this topic again after one month ( sorry , I was working on another subject ) , and I am working again on the edid issue and how to force a display mode.
I try another way and I have some questions. I ve tried the “modetest” binary and I was able to change the mode with this tools , but only as test purpose.
For example :
modetest -s 148:#7 , it changes the crtc 148 with the mode #7 ( the one I want) and it works. But it displays a test pattern, and then when I quit the software, It returns to the previous mode.
The card boots with the “preferred” mode , and I am not able nor to change the preferred mode neither to fix a specific mode.
Is there a tool ( with libdrm library and tool suite ) that allow to change dynamically the mode.
For example “modeset” or something else ? ( I ve tried fbset, but it doesn’t anything )
Another question : is it possible to configure the uboot, with a setenv command to set the default mode at start ?
I precise that we run our software in drmkms mode ( qt software -platform eglfs ) , there is no wayland/weston and no xorg server.