IMX8mp: HDMI resolution restriction

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX8mp: HDMI resolution restriction

2,326 Views
TerryBarnaby1
Contributor IV

We have a custom imx8mp board which has both LVDS LCD and direct HDMI video outputs.

The HDMI video output works fine with FHD 1920x1080@60 monitors but when we try and use a UHD 4k monitor we have issues.

  1. If we plug in the HDMI after the system has booted it displays fine at 3840x2160@30. However the we have a FHD 1920x1080@60 video stream to display so the 30 fps is not useful. We want to restrict the video resolution to 1920x1080p60.
  2. If the 4K HDMI is plugged in at system boot the system hangs during boot, possibly at the pslash-systemd stage. There are no kernel messages and the serial console port is unresponsive etc.

If we add "video=HDMI-A-1:1920x1080-32@60" to the kernel command line, the system boots fine and displays at 1920x1080@60 fine.

However, we cannot guarantee that someone will attach a HDMI monitor that will support 1920x1080@60. So what we would like todo is restrict the HDMI video display to use a maximum resolution of 1920x1080@60 from the monitors determined video modes.

Does anyone know of a way to do this, ideally in the systems DTB ?

0 Kudos
Reply
5 Replies

2,306 Views
TerryBarnaby1
Contributor IV

Thanks for the reply.

Yes, I know I can "hard code" the HDMI display resolution to a particular one as I stated in my original message. But what I need is to just disable resolutions above 1920x1080. We don't know what monitor will be attached to the system. It may only do up to 720p and report that via edid. So we need the IMX8mp to auto select from the monitors edid resolutions and choose one that is not above 1920x1080.

Yes, of course you can playback a 60fps video stream at 30fps but you lose half the frames and you get motion artefacts.

Terry

 

0 Kudos
Reply

2,302 Views
joanxie
NXP TechSupport
NXP TechSupport

i.mx8mp will detect the hdmi display according to your HDMI,  you mean imx8mp couldn't detect the 1080p hdmi display if you connect a 1080p HDMI display? if I misunderstand, pls tell me

0 Kudos
Reply

2,300 Views
TerryBarnaby1
Contributor IV

No the IMX8mp detects the monitors resolutions from the EDID fine.

The 4k monitor returns resolution settings that includes 3840x2610 and 1920x1080 resolutions and others at various frame rates, all as expected and fine.

The IMX8mp's hardware can do 1920x180p60 as well as 3840x2610p30. Unfortunately for us the IMX8mp Yocto Linux chooses to use 3840x2610p30 in preference to 1920x180p60 at boot somewhere. The 4k resolution is definitely not what we want as 1: the frame rate is too slow, 2: there are just to many useless pixels in use.

So we would wish the iMX8mp Yocto to ignore the 4k 3840x2610p30 mode and use the next best mode available, which with this monitor (and most others) would end up being 1920x180p60 but on another monitor could be 1280x720p60.

Apart from our wanting to have 60 fps, the Linux system crashes (complete kernel hang, not console messages, no Ethernet etc.) when psplash runs during the systemd boot sequence when the resolution is set to 3840x2610p30. Because of this we ideally want the lower level Linux to not use the 4k mode rather than do this at the Weston level.

We were hoping that it would be possible in the kernels DTB to effectively disable resolutions above 1920x1080 on the HDMI output. I guess we could modify the HDMI driver to do this somehow but are trying to reduce the changes to an almost production system.

0 Kudos
Reply

2,270 Views
joanxie
NXP TechSupport
NXP TechSupport

you can add

if (mode->hdisplay > 1920 || mode->vdisplay > 1080)
         return MODE_BAD_HVALUE;

in the "imx8mp_hdmi_mode_valid" function

"https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/gpu/drm/imx/dw_hdmi-imx.c?h=lf-5.1..."

2,311 Views
joanxie
NXP TechSupport
NXP TechSupport

you want to set resolution for HDMI display or your video? if video, you don't need set like "video=HDMI-A-1:1920x1080-32@60", which is for display, and imx8mp can detect your display according to the  "samsung_phy_pll_cfg"

"https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/phy/freescale/phy-fsl-samsung-hdmi...

and if your hdmi is 4k@30 display, which should can playback 60fps video, you can try it

 

0 Kudos
Reply