Imx8qm HDMI blanking time adjustments


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"
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 :slight_smile:
Thank you very much!

Hello @mwagner ,

Welcome to Toradex Community!

Could you please tell us the output of uname -a ?
Meanwhile, I found some discussions in our Community platform that I think might be helpful for you:

Best Regards,

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?

Have a nice Day!

Hi @mwagner !

Could you share your current command line parameters?

You can do it by:

cat /proc/cmdline

Also, could you try to use tdxargs instead of videoconfig?

setenv "videoconfig=drm_kms_helper.edid_firmware=edid/1920x1080.bin"

Let us know the results.

Best regards,

Hello @henrique.tx ,

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.

Thank you very much and have a great Day,

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

  1. find the corresponding one active with the imx8qm
  2. 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?

Any help is highly appreciated :slight_smile:

Another idea from my side:

What is the boot argument for a fixed 1080x1920p50 resolution? I found a lot of valid arguments for the iMX6 but I didn’t find anything for the iMX8.

Thank you very much,

Hello @mwagner ,

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.

Hope this helps !

Best Regards,

Hello @saijanani.tx ,
thanks a lot for the diggin’ effort!
We are open for every solution, how would one achieve the custom timing in Linux?

Thank you very much!

Hello @mwagner ,

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 .


Hello @saijanani.tx

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:

/* Apalis HDMI1 */
&hdmi {
	compatible = "fsl,imx8qm-hdmi";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_hdmi_ctrl>;
	assigned-clocks = <&clk IMX8QM_HDMI_PXL_SEL>,
			  <&clk IMX8QM_HDMI_PXL_MUX_SEL>;
	assigned-clock-parents = <&clk IMX8QM_HDMI_AV_PLL_CLK>,
				 <&clk IMX8QM_HDMI_AV_PLL_CLK>,
				 <&clk IMX8QM_HDMI_AV_PLL_CLK>;
	hdmi-ctrl-gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;

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.

Thanks a lot,

Hello @mwagner ,

Are you looking for something like this?

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.

Best Regards,

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

Hello @mwagner ,

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.

Best regards,