How do I get DVI output working

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

How do I get DVI output working

921 Views
michaelworster
Contributor IV

I have a custom board with a DVI port on it. The board has a i.MX6DL and is loosely based on the SABRE SDB. I have read in the reference manual that the HDMI PHY of the i.MX6DL is HDMI/DVI compliant and that the HDMI/DVI electrical signals are the same, so I attempted to enable "hdmi" expecting this would work for my DVI.

I have added video parameters into my boot command line as follows:

video=mxcfb0:dev=hdmi,1920x1080M@60,bpp=32

In my device tree I've added support for the framebuffer 0 device as done in the SABRESDB  device trees as well:

    mxcfb1: fb@0 {
        compatible = "fsl,mxc_sdc_fb";
        disp_dev = "hdmi";
        interface_pix_fmt = "RGB24";
        mode_str ="1920x1080M@60";
        default_bpp = <24>;
        int_clk = <0>;
        late_init = <0>;
        status = "okay";
    };

    aliases {
        mxcfb0 = &mxcfb1;
    };

Once these changes were in place I booted up the board, however the log was showing that the fb wasn't being created:

Error opening /dev/fb0: No such file or directory

I added in a bit more debug and found that during the probe of mxcfb0 it correctly pulls the options from the bootloader's command line, but in the "mxc_dispdrv_gethandle" function is appears to never enter the "list_for_each_entry(entry, &dispdrv_list, list)" and thus returns found=0 and the mxc display driver isn't loaded:

[    0.234994] MIPI DSI driver module loaded
[    0.235609] mxc_sdc_fb fb.15: mxcfb_probe enter
[    0.235624] mxcfb_get_of_property
[    0.235638] mxc_sdc_fb fb.15: get of property mode_str fail
[    0.235678] fb_get_options start, : mxcfb0
[    0.235686] fb_get_options end 0
[    0.235704] mxcfb_option_setup end
[    0.235711] calling mxcfb_dispdrv_init
[    0.235716] mxcfb_dispdrv_init start
[    0.235724] mxcfb_dispdrv_init - disp_dev: hdmi
[    0.235733] mxcfb_dispdrv_init - mxc_dispdrv_setting - if_fmt: 910313298
[    0.235740] mxcfb_dispdrv_init - mxc_dispdrv_setting - default_bpp: 32
[    0.235748] mxcfb_dispdrv_init - mxc_dispdrv_setting - dft_mode_str: 1920x1080M@60
[    0.235755] mxc_dispdrv_gethandle start
[    0.235762] mxc_dispdrv_gethandle locked
[    0.235781] mxc_dispdrv_gethandle unlock
[    0.235787] mxc_dispdrv_gethandle end, found: 0
[    0.235796] mxc_sdc_fb fb.15: NO mxc display driver found!

I checked my .config file and it appears I have framebuffer support included:

CONFIG_FB=y

Any thoughts on why this failing to enable the display driver?

Labels (3)
0 Kudos
3 Replies

592 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Michael,

   Check if hdmi driver(mxc_hdmi.c) has been selected when you run "make menufig", please!

Regards,

weidong

0 Kudos

592 Views
michaelworster
Contributor IV

Weidong,

    Thanks for your input, the hdmi driver was being built it, but nothing was being registered because I was missing some elements in my device tree. I have figured that part out now, but I still have some outstanding questions if you have any input on those:

1) why is edid address 50? I pulled that from the SABRE SDB device tree but can't find any information on it

2) Where is the information about hdmi_core and hdmi_video

3) it seems that without hdmi_video installed the kernel hangs on boot up. Why is this? The other elements being removed allow it to boot correctly but /dev/fb0 simply doesn't exist, but without the video node the whole kernel fails to launch

-Mike

0 Kudos

592 Views
michaelworster
Contributor IV

It turns out the mxc_dispdrv_gethandle function bombs out early because there are no drivers registered in the list, that is to say no drivers ever called mxc_dispdrv_register. The reason for *that* is because there were a few elements missing in the devicetree. In addition to the support for framebuffer0 I had to add:

&hdmi_core {
    ipu_id = <0>;
    disp_id = <0>;
    status = "okay";
};

&hdmi_video {
    fsl,phy_reg_vlev = <0x0294>;
    fsl,phy_reg_cksymtx = <0x800d>;
    status = "okay";
};

And also an entry in my I2C-2 bus:

    hdmi: edid@50 {
        compatible = "fsl,imx6-hdmi-i2c";
        reg = <0x50>;
    };

with all that in place I now see FB0 working. I still have some outstanding questions however about the necessity of these items.

1) why is edid address 50? I pulled that from the SABRE SDB device tree but can't find any information on it

2) Where is the information about hdmi_core and hdmi_video

3) it seems that without hdmi_video installed the kernel hangs on boot up. Why is this? The other elements being removed allow it to boot correctly but /dev/fb0 simply doesn't exist, but without the video node the whole kernel fails to launch

0 Kudos