How to enable HDMI video output

  • Hello,


    how do I set video output to HDMI with the standard linux kernel / rootfs?


    I tried to add following to the bootargs:

    Code
    1. video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24


    but the efus is always booting with a standard set 800x480 LCD display. So how can I change display settings?


    Here's my Kernel Command Line:

    Code
    1. Kernel command line: console=ttymxc3,115200 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 fec_mac=00:05:51:08:ED:CE mtdparts=gpmi-nand:512k(NBoot)ro,2m(UBoot)ro,256k(UBootEnv),256k(UserDef),6m(Kernel)ro,-(TargetFS) gpmi_debug_init enable_wait_mode=off ubi.mtd=TargetFS root=ubi0:rootfs rootfstype=ubifs rootwait rw


    Here's my fbset --info:


    I tried to find out some more. Here is what the kernel log is displaying:

    Code
    1. mxc_sdc_fb mxc_sdc_fb.0: register mxc display driver hdmi
    2. mxc_sdc_fb mxc_sdc_fb.0: NO mxc display driver found!
    3. mxc_sdc_fb mxc_sdc_fb.1: register mxc display driver lcd


    I guess HDMI is enabled in kernel. These related files are compiled:


    drivers/video/mxc_hdmi.c
    drivers/video/mxc\ldb.c
    drivers/video/mxc\mxc_dispdrv.c
    drivers/video/mxc\mxc_dvi.c
    drivers/video/mxc\mxc_edid.c
    drivers/video/mxc\mxc_ipuv3_fb.c
    drivers/video/mxc\mxc_lcdif.c


    Any suggestions what's wrong? Help is needed please.


    Thanks for answers.

  • OK, I'll try to explain what happens. The board support file has an internal list of activated displays. On the Quad and Dual versions of the CPU we have two IPUs which are each capable of driving up to two displays. So we can have up to four displays (1x RGB-LCD, 1x HDMI, 2x Single-Channel-LVDS or 1x Dual-Channel-LVDS). Each display gets an internal display instance called mxcfb and a framebuffer in the /dev directory, numbered starting with zero and increasing in the order of appearance. In addition the first display instance on each IPU also automatically gets a video overlay added that adds an additional framebuffer. So in fact our current release does activate three displays on armStoneA9 and QBlissA9: display instance mxcfb0 as HDMI on /dev/fb0 (with video overlay on /dev/fb1), display instance mxcfb1 as LVDS on /dev/fb2 and display instance mxcfb2 as RGB-LCD on /dev/fb3 (with video overlay on /dev/fb4).


    On the DualLite and Solo versions of the i.MX6 CPU we only have one IPU. So we can activate at most two displays at the same time. So in the default board configuration file of efusA9 and PicoMODA9 we have decided for LVDS and LDB: display instance mxcfb0 as LVDS on /dev/fb0 (with overlay on /dev/fb1) and display instance mxcfb1 as RGB-LCD on /dev/fb2. There is a compile time option "HDMI_ON" in the board support file (see arch/arm/mach-mx6/board-mx6q_<boardname>.c) to activate HDMI instead of one of the other two displays.


    OK, what happens if you give the video= setting on the command line? This setting will override the setting for the appropriate mxcfb display instance. Because you have given mxcfb0, your setting will override the first entry of the internal table, that is the LVDS setting (in i.MX6 terms called LDB). So actually the LVDS display is deactivated and the driver tries to activate HDMI. But because of the HDMI_ON macro being zero in the board support file, some necessary structures of the HDMI driver are not registered at start-up and therefore activating the HDMI display will fail. So you will not have HDMI output, in fact you will not have any output for this display instance.


    But where does the 800x480 display come from that you actually see instead? Well, as I said, there are two active entries in the internal display table. So the second entry is still active, and this is the RGB-LCD entry. So you now have display instance mxcfb1 as RGB-LCD on /dev/fb0 (with video overlay on /dev/fb1).


    So what can you do to get HDMI running? I assume you will have to recompile the kernel with the HDMI_ON macro set to 1 in the board support file. Then on the efusA9, HDMI should be active as display instance mxcfb0 on /dev/fb0 by default (with video overlay on /dev/fb1). And of course RGB-LCD is active as mxcfb1 on /dev/fb2.


    This need for recompilation is a little bit unfortunate and we try to get this better in the next release. Most probably we will only have one display instance active there by default. Because most people don't know about the additional displays anyway and do not deactivate them (by removing them from the internal table) if they don't need them. And then they have unnecessary system bus load and power consumption for the (up to two) additional displays.


    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

    Edited once, last by fs-support_HK ().

  • Please, I would be grateful if you can explain how did you enable the HDMI_ON from the board support files?


    I have efusA9 board and I want to compile the build "buildroot-2016.05-fsimx6-V3.1" but when I do "make menuconfig" I can not find in the list the option to activate the HDMI driver.


    Thanks,
    kind regards

  • Activating HDMI is already pre-configured in the device tree. You only need to set the framebuffer macro (CONFIG_EFUSA9_MXCFB0) accordingly. Let's assume that you only want to have HDMI output, no LCD (RGB) output and no LVDS output. So you only need one framebuffer for HDMI. Depending on whether you have a Solo/DualLite or a Quad efusA9, you need to change the file efusa9dl.dts or efusa9q.dts. This file is located in the Linux source tree under arch/arm/boot/dts. If you have already built Buildroot, then you can find this in


    output/build/linux-custom/arch/arm/boot/dts/efusa9dl.dts


    Look for the lines


    Code
    1. #define CONFIG_EFUSA9_MXCFB0 DISPLAY_LCD
    2. #define CONFIG_EFUSA9_MXCFB1 DISPLAY_NONE


    Change the first of the two lines to:


    Code
    1. #define CONFIG_EFUSA9_MXCFB0 DISPLAY_HDMI


    Then rebuild the Linux kernel


    Code
    1. make linux-rebuild


    Now you have a new device tree in


    output/images/efusa9dl.dtb (or efusa9q.dtb on the Quad version)


    If you call make menuconfig in Buildroot, you will only get the configuration for Buildroot. If you want to change the kernel settings, you have to call make linux-menuconfig. Similarly, if you want to change the busybox settings, you need to call make busybox-menuconfig.


    Remark


    Changes to the kernel that are done in output/build/linux-custom are only temporary changes. Please note that they are completely lost if you ever do a make clean or other cleaning command. So the best way is to sync your changes from time to time to the linux-fsimx6 directory next to your buildroot directory. This is also the directory that you should use if you put the source code under version control.


    When buildroot is built for the very first time, it copies the Linux directory (next to buildroot) to output/build/linux-custom by using rsync. From then on, this build directory is used, unless you trigger the rsync process again.


    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,


    I know this Topic is a little old, but it fits my problem and I do not think things changed.


    The solution is given for Buildroot, is it possible to list the changes between Buildroot and Yocto?


    Thank you in andvance!

  • The changes are in the efusA9 device tree only, so they work for both, Buildroot and Yocto.


    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Thank you for the fast reply,


    I managed to rebuild the device tree with these changes, but the display does not get recognized.

    Hopefully I can get some suggestions to understand what I am missing here.


    Here is my fb0 --info :


    The xrandr outcome :

    The kernel messages (grep mxc) :

    The kernel :

    Code
    1. root@econo206:~# uname -a
    2. Linux econo206 4.1.15-rt18-F+S #2 SMP PREEMPT RT Mon Aug 17 06:29:55 UTC 2020 armv7l GNU/Linux


    I use a DELL P2417H connected via HDMI.


    EDID Data :


    Any kind of help is highly appreciated!

    Best regards.



    Edit:

    If i unplug the monitor the following output comes up :

    Code
    1. mxc_hdmi 20e0000.hdmi_video: Read EDID again
    2. mxc_hdmi 20e0000.hdmi_video: create default modelist
  • I'm a little bit confused by the mode list from the xrand output. This seems to be a rather generic list, not a list that is assembled from the EDID data of this specific display. So my guess would point to a problem when reading the EDID data. Unfortunately I do not have the full boot messages, so I can not tell if there is something going wrong.


    How did you get the EDID specificiations that you listed above? Was this some output of a Linux command on our board?


    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello and thank you for your post!


    I am in direct contact with one of your developers at the moment and will get a starter kit soon to try the software on the baseboard. I did not mention that we use a custom board from F&S.


    Quote

    How did you get the EDID specificiations that you listed above? Was this some output of a Linux command on our board?

    I used a program called EDIDViewer on my windows desktop.


    The full dmsg :

    dmesg_boot.txt


    The complete serial output while booting :

    serial_boot_output.txt


    Best regards.



    Edit 1:

    Quote

    So my guess would point to a problem when reading the EDID data.


    I read the EDID data in /sys/devices/soc0/soc/20e0000.hdmi_video/edid (on the board):


    Those raw data is the same as the output of the EDID Viewer (windows desktop) when compared with a web based EDID viewer.


    Output of the EDID Viewer (windows desktop):

    Code
    1. 0x00 00 FF FF FF FF FF FF 00 10 AC DB A0 42 36 47 30
    2. 0x10 20 1B 01 04 A5 35 1E 78 3A 05 65 A7 56 52 9C 27
    3. 0x20 0F 50 54 A5 4B 00 71 4F 81 80 A9 C0 D1 C0 01 01
    4. 0x30 01 01 01 01 01 01 02 3A 80 18 71 38 2D 40 58 2C
    5. 0x40 45 00 0F 28 21 00 00 1E 00 00 00 FF 00 43 57 36
    6. 0x50 59 37 37 38 42 30 47 36 42 0A 00 00 00 FC 00 44
    7. 0x60 45 4C 4C 20 50 32 34 31 37 48 0A 20 00 00 00 FD
    8. 0x70 00 38 4C 1E 53 11 01 0A 20 20 20 20 20 20 00 47


    Edit 2:

    After further investigation i could not reproduce the correct EDID data in /sys/devices/soc0/soc/20e0000.hdmi_video/edid, it stayed empty (0x00).


    Additionally i checked the status of /sys/devices/soc0/soc/20e0000.hdmi_video/cable_state and to my surprise it contains plugin, when no hdmi is connected and plugout, when hdmi is connected. That should probably not happen.


    I build the kernel with debug enabled and the following output comes up when i connect the hdmi monitor to my board:

    Code
    1. mxc_hdmi 20e0000.hdmi_video: Hotplug interrupt received
    2. mxc_hdmi 20e0000.hdmi_video: phy_int_stat=0x3d, phy_int_pol=0x0
    3. mxc_hdmi 20e0000.hdmi_video: EVENT=plugout
    4. mxc_hdmi 20e0000.hdmi_video: mxc_hdmi_cable_disconnected
    5. mxc_hdmi 20e0000.hdmi_video: mxc_hdmi_phy_disable
    6. hdmi_disable_overflow_interrupts
    7. mxc_hdmi 20e0000.hdmi_video: mxc_hdmi_phy_disable - exit
    8. hdmi_disable_overflow_interrupts

    If i unplug hdmi: