I am currently struggeling with changing the default HDMI timing for full HD output. We need to change the Blanking times. Adding an EDID-File into /lib/firmware/edid and trying to force it via setenv "videoconfig=drm_kms_helper.edid_firmware=edid/1920x1080.bin" saveenv
in uboot did not change the blanking times at all. Is there another approach we could try? In the device tree files it seems, that detailed timing setup is only possible for LVDS, or am I missing something there?
Any ideas would be highly appreciated
Thank you very much!
Moritz
Hello @saijanani.tx ,
Thanks for your reply. The kernel is version 4.14 uname output is:
Linux b2qt-apalis-imx8 4.14.170-0+git.62ad468b3107 #1 SMP PREEMPT Fri Nov 26 08:52:59 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
sadly the links you supplied are all targeting the imx6 device, I’d love to take the approach of Link 1 with modifying the driver modes but sadly in the kernel sources of my imx8 there are no modes defined at all within /kernel-source/drivers/video/hdmi.c or any of the other .c files in this directory.
Maybe they are located elsewhere for the IMX8?
thank you very much for your tip. I did try what you suggested, but still the timing is not adjusted. The output of /proc/cmdline looks good as far as I can see:
I did find some timing specifications in the file: /drivers/gpu/drm/imx/hdp/imx-hdp.c Line 50 but I’m unsure, if those are really the parameters that are choosen as default without EDID… So far I had no success.
After some further investigation I am thinking, that I need to specify a new pixel clock setting, as we need a pixel clock of 142.020kHz instead of the normally used 148.500kHz I found various PLL setups for several GPUs but sadly I am not smart enough to
find the corresponding one active with the imx8qm
did not yet find any documentation about the PLLs and their possible configurations.
Could you give me a tip, where these thigs are defined within the kernel, so I could adjust them?
Or am I running down a completely wrong path here?
Thank you for your patience in this regard. It took a while because I had to dig a bit deeper here.
Actually, U-boot doesn’t support EDID altering and that’s only something Linux supports. But because one always has the correct EDID information from the display (except for now, unfortunately), it seems otherwise. So, if one wants to do anything with the HDMI in the U-Boot at all, the way to do it is to manually alter the HDMI driver and force the required timing.
Considering these and also considering the fact that the detection and configuration of the U-Boot HDMI output might take quite some time and by then Linux is already started, I was curious if it was an option for you to move the display stuff completely to Linux?
In our opinion that seems to be the “easy” way as U-Boot and display seems to not be a great match.
In our opinion, it would be better to not turn on the display in U-Boot and deal with the entire display timing in Linux. Then you could refer here
If that’s not the option and you would still like to handle display in U-boot (wouldn’t recommend, harder way), you could check the driver to make preferred changes in U-Boot with driver/video/imx/hdmi .
Thanks for the good hint, although tat was the entry point of my investigation. I now found the following config in my dts files within kernel source, with no documentation of the meaning of any of the timing numbers.
So in \work-shared\apalis-imx8\kernel-source\arch\arm64\boot\dts\freescale\fsl-imx8qm-apalis-v1.1.dtsi there is the following section, that (as i assume) defines the HDMI timings:
and the macros are defined in \work-shared\apalis-imx8\kernel-source\include\dt-bindings\clock\imx8qm-clock.h
#define IMX8QM_HDMI_PXL_SEL 780
And now it would be awesome to know where the information is hidden, what magic number is to be chosen to reach the correct timing for a 1080x1920p50 output.
BTW, is the HDMI display you have, a HDMI monitor or a display? If it was a monitor, then you have fixed resolution EDID files that you may alter based on the information above.
Hello @saijanani.tx ,
we did manage to get the correct resolution. The way to do so, is to modify the default setting chosen when no edid is present. This is located within the file: /drivers/gpu/drm/imx/hdp/imx-hdp.c as assumed previously. This works and now outputs a valid 1920x1080p50 HDMI video signal.
But now there is another Problem: We’re making LVDS out of this HDMI signal to feed the LCD and the HDMI signal does produce a data enable high period within the VSYNC pulse (according to HDMI spec these should be data island, or audio packages). See attached image for Reference (bottom is a zoomed version of the start of the vsync pulse visible also in the top waveforms):
We did disable HDMI sound in the device tree (in both files: fsl-imx8qm-apalis-v1.1.dtsi and fsl-imx8qm-apalis-eval.dtsi) and no hdmi sound device is showing up anymode by alsa/pulseaudio but this data enable period is still present, is there anything we can do to get rid of it?
Thank you very much for your kind help so far!!
Moritz Wagner
We are glad that you are able to solve the resolution issue.
As for the LVDS issue, could I kindly ask you to create a separate thread so that it is easy for us to isolate topics and also make it easy for other people in the community to find what they are looking for.