Problem getting Linaro to configure the HDMI on OlinuXino A20 and LIME 2

Started by lnmendes, August 17, 2016, 01:42:09 PM

Previous topic - Next topic

lnmendes

Hi,



I'm trying to get Linaro to run on OlinuXino A20 and Lime 2 boards, but I'm having some trouble with HDMI configuration on boot, no image is displayed, monitor shows "no signal" message.



With the Olimex official images with Debian 8 Jessie I get the following text on the serial terminal and the HDMI works:

<6>sunxi disp driver loaded (/dev/disp api 1.0)                     
<6>I2C: i2c-3: HDMI I2C adapter                                         
<6>ParseEDID                                                                                                   
<6>EDID version: 1.3                                               
<6>PCLK=74250000 X 1280 1390 1430 1650 Y 720 725 730 750 fr 60 PP 
<6>Using above mode as preferred EDID mode                           
<6>PCLK=74250000 X 1280 1720 1760 1980 Y 720 725 730 750 fr 50 PP 
<4>disp_clk: Could not find a matching pll-freq for 53900000 pclk   
<4>disp_clk: Could not find a matching pll-freq for 53900000 pclk   
<4>disp_clk: Could not find a matching pll-freq for 108100000 pclk   
<4>disp_clk: Could not find a matching pll-freq for 74200000 pclk   
<6>Parse_VideoData_Block: VIC 4 (native) support                       
<6>Parse_VideoData_Block: VIC 19 support                               
<6>Parse_VideoData_Block: VIC 5 support                                 
<6>Parse_VideoData_Block: VIC 20 support                               
<6>Parse_VideoData_Block: VIC 3 support                                 
<6>Parse_VideoData_Block: VIC 18 support                               
<6>Parse_AudioData_Block: max channel=2                                   
<6>Parse_AudioData_Block: SampleRate code=7                           
<6>Parse_AudioData_Block: WordLen code=7                               
<6>Find HDMI Vendor Specific DataBlock                                   
<6>PCLK=74250000 X 1920 2008 2052 2200 Y 540 542 547 562 fr 60 PP 
<6>PCLK=74250000 X 1920 2448 2492 2640 Y 540 542 547 562 fr 50 PP 
<6>PCLK=27000000 X 720 736 798 858 Y 480 489 495 525 fr 59 NN     
<6>PCLK=27000000 X 720 732 796 864 Y 576 581 586 625 fr 50 NN     
<6>asoc: sndhdmi <-> sunxi-hdmiaudio.0 mapping ok                 
<6>disp clks: lcd 74250000 pre_scale 1 hdmi 74250000 pll 297000000 2x 0
...
Mali driver is loaded next.


However with my Linaro configuration which runs the same kernel, same modules, same kernel configuration and same /etc/modules, HDMI connection doesn't work (no image appears), and the serial terminal only shows this:

<6>sunxi disp driver loaded (/dev/disp api 1.0)                     
<30>systemd[1]: Started Journal Service.                                 
<5>type=1130 audit(1262304008.170:2): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-journald comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? ter'
<6>EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro                           
Mali: permit MALI_IOC_MEM_MAP_EXT ioctl for framebuffer (paddr=0x4A000000, size=33554432)
<6>mali: use config clk_div 1                                     
<6>mali: clk_div 1                                               
Mali: mali clock set completed, clock is  312000000 Hz             
<6>mali: use config clk_div 1                                     
<6>mali: clk_div 1                                               
Mali: mali clock set completed, clock is  312000000 Hz             
Mali: Mali device driver loaded



I deduce my /etc configuration files are missing some essential configuration, since the kernel is the same. What can I be missing?



Thanks & Best regards,

Luís Mendes

JohnS

Are you using the same bootstrap (I guess U-boot) & boot args?

You can interrupt u-boot and look what settings etc it has.

John

lnmendes

Yes, the U-Boot and kernel parameters are the same.

I have installed both distributions on the same hard disk at different partitions and then I use the same uEnv.txt from the uSD boot card, just replacing the root parameter from /dev/sda1 to /dev/sda6 and vice-versa.

The uEnv.txt is as follows:
Quoteroot=/dev/sda6
video=HDMI-9-1:1280x720MR@60m
rootfstype=ext4
console=fb
fb.margin=25
rootwait

JohnS

I guess more debug messages / checking everything for the 10th time / etc.

John

lnmendes

Hi John,

I've already spent sometime trying to find what could be the difference and I will try some more times, but right now I ran out of ideas of what could be the cause.

Since the u-boot, boot configurations, kernel and modules are the same, I guess it has got be some configuration in the Linux distribution itself.

My idea when posting to this forum is that since you prepared the Debian Jessie 8 at Olimex, that maybe you could point some file or related configuration that may be needed for the disp driver to work and read the EDID. I already had a look at the sunxi video modules code and I found that linux-sunxi/drivers/video/sunxi/hdmi file hdmi_i2c.c, function hdmi_i2c_sunxi_probe isn't called at all in Linaro, otherwise I should either see the messages "I2C: Failed to add bus" or "I2C: %s: HDMI I2C adapter".

The function hdmi_i2c_sunxi_probe is called from the hdmi driver Hdmi_init(...) function which is called from hdmi_probe.

I know the hdmi module is to be loaded because it is in /etc/modules, but I don't get why I don't see any of the messages "I2C: Failed to add bus" or "I2C: %s: HDMI I2C adapter".

Maybe I should insert some printk messages... in such functions to get some call traces.

Luís

JohnS

I'm not developing Linaro in any way.  Maybe ask where people do.

John

lnmendes

Thanks for the suggestions. I have solved the problem.

I recompiled the kernel and re-installed it. I also included printk messages in the hdmi kernel module.

I found one issue when installing the modules since I was doing:
Quotesudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4 INSTALL_MOD_PATH=/media/lpnm/1a51b45d-e884-4b75-b8b2-47b05e343e10/ modules_install

Which was outputting a small almost unnoticeable message saying that arm-linux.gnueabihf-gcc wasn't found just before showing the scrolling list of the installed modules.
This was caused by running as super user, which would loose the PATH for the Linaro GCC tools.

I fixed it by forcing the PATH configuration just before doing the modules install.
Quotesudo sh -c "export PATH=$PATH:~/Documents/Olimex/gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf/bin && make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4 INSTALL_MOD_PATH=/media/lpnm/1a51b45d-e884-4b75-b8b2-47b05e343e10/ modules_install"

Apparently this fixed it. I'm now able to run both Olimex Jessie 8 image as well as the Linaro distribution on HDMI, both with the same kernel.

JohnS


lnmendes

I do it as root because I'm using an ext4 partition for the root filesystem and the /lib folder requires root permissions to write to it.

Luís