Hi,
I've been trying to debug an issue with HDMI output on Tinyrex Ultra (+ Baseboard) using the mainline Linux Kernel (4.12, but version doesn't seem to matter). Officially, all the required drivers are in the kernel and it should just work, but it doesn't. The monitor doesn't get a signal and the DRM page_flip mechanism times out after 10 seconds for yet unknown reasons (I believe VBlank interrupts are never fired, but I also don't understand where they should be coming from).
HDMI output works fine with linux-fslc-4.1-rex kernel (it's just linux-fslc-4.1 with the correct DTS files) on the same board and the same linux filesystem (debian bootstrapped).
My goal is to find the missing pieces that will make the HDMI output work with a mainline 4.12+ Kernel. I've collected a lot of information and traced register writes of both HDMI driver implementations and compared them, but I have some fundamental questions before I can make any progress:
Any pointers in the right direction or a bullet list of mandatory checks for HDMI TX would be greatly appreciated.
PS: HDMI Hotplug detection does work; EDID works when the correct I2C channel is selected in the DTS.
PPS: I attached the DTS/DTSI files that I ported and use, maybe they contain an obvious error?
Cheers
Lukas F. Hartmann / mntmn
Original Attachment has been moved to: imx6qdl.dtsi.zip
Original Attachment has been moved to: imx6qp.dtsi.zip
Original Attachment has been moved to: imx6q.dtsi.zip
Original Attachment has been moved to: imx6-tinyrexultra.dts.zip
Original Attachment has been moved to: imx6qdl-tinyrex.dtsi.zip
Fabio, Igor, thanks for the suggestions. I have carefully rebuilt the DTS from scratch based on the imx6qdl-sabresd files and I'm pretty sure that it is not the problem. The kernel boots like before and most features of the board work fine, like Ethernet, SATA, USB. I can see in dmesg that the HDMI TX gets configured and the IPUs are found and get configured. The Problem lies somewhere deeper. I suspect it has to do with IRQs but I don't know exactly what to look for. Rarely, the HDMI display gets a hint of a signal and then immediately turns off again without any graphics visible.
When DRM tries to set up IPU&HDMI, I get this in the log every 10 seconds:
[ 127.831760] [drm:drm_atomic_helper_commit_cleanup_done] *ERROR* [CRTC:27:crtc-0] flip_done timed out [ 138.711740] [drm:drm_atomic_helper_commit_cleanup_done] *ERROR* [CRTC:27:crtc-0] flip_done timed out [ 148.951738] [drm:drm_atomic_helper_commit_cleanup_done] *ERROR* [CRTC:27:crtc-0] flip_done timed out
This comes from gpu/drm/drm_atomic_helper.c:
/* We must wait for the vblank event to signal our completion * before releasing our reference, since the vblank work does * not hold a reference of its own. */ ret = wait_for_completion_interruptible_timeout(&stall_commit->flip_done, 10*HZ);
So the kernel/DRM is waiting for vblank events that never arrive.
In gpu/drm/imx/ipuv3-crtc.c there is a function ipu_irq_handler(int irq, void *dev_id). Putting a printk statement there reveals that this is never called. This IRQ is setup during ipu_crtc_init:
ipu_crtc->irq = ipu_plane_irq(ipu_crtc->plane[0]);
Which is internally:
return ipu_idmac_channel_irq(ipu_plane->ipu, ipu_plane->ipu_ch, IPU_IRQ_EOF);
This comes from gpu/ipu-v3/ipu-common.c:
return ipu_map_irq(ipu, irq_type + channel->num);
Which then calls irq_linear_revmap(ipu->domain, irq) or irq_create_mapping(ipu->domain, irq).
Do you have any idea what could cause this IRQ (IPU_IRQ_EOF) to not fire?
Best Regards and thanks,
Lukas
Lukas,
It is really hard to review the dts changes you made as you attached lots of dts files in the thread.
It would be better if you could:
- Send one patch against 4.12 kernel that introduces the dts for the tinyrex ultra board. Send it to the linux-arm-kernel list for review as well.
Regards,
Fabio Estevam
Hi Fabio,
thanks for the hint about 6qp instead of 6q in compatible=, it doesn't make any difference though. I have cleaned up and attached here the only 2 files I added to the kernel (1 DTS and 1 DTSI). The DTSI is based on imx6qdl-sabresd.dtsi. I removed all the devices that don't exist in TinyRex and copied over all the pinctrl changes that are from the original tinyrex dtsi. Most pinctrls use different pads than in sabresd. There is a section &clks that assigns a different parent to the LDB_DI0_SEL and LDB_DI1_SEL clks, which is commented out. I don't believe that these are relevant as they seem to be about LDB which I'm not using.
I couldn't figure out how to attach files to a reply, so here are the two files:
http://dump.mntmn.com/imx6-tinyrexultra.dts
http://dump.mntmn.com/imx6qdl-tinyrex2.dtsi
Thanks for your patience, cheers,
Lukas
Your compatible entries looks incorrect:
compatible = "fsl,imx6q-tinyrex", "fsl,imx6q";
This tells the board is based on mx6q, instead of imx6qp.
It should be:
compatible = "rex,imx6qp-tinyrex", "fsl,imx6qp";
Also, all the pre nodes should not be in the board file, as they belong to the imx6qp.dtsi.
Take a look at arch/arm/boot/dts/imx6qp-sabresd.dts for a reference of a imx6qp based board.
Hi Lukas
for operation of HDMI TX controller it is necessary also to configure IPU and CCM.
HDMI TX can not produce an output without IPU.
>Is it mandatory to configure the Audio Interface or should it work without it?
no
>Is it mandatory to configure the HDCP Encryptor or can this be skipped?
no
for hdmi dts one can look at imx6qdl-sabresd.dtsi
http://git.freescale.com/git/cgit.cgi/imx/linux-imx.git/tree/arch/arm/boot/dts/imx6qdl-sabresd.dtsi?...
and use nxp bsps described on
http://www.nxp.com/products/software-and-tools/software-development-tools/i.mx-software-and-tools/i....
Best regards
igor
It seems your dts files are from NXP 4.1 kernel. They do not work with mainline.
I suggest you to rework the dts files for this board using other mx6 dts files from 4.12 as reference, such as imx6qdl-sabresd, imx6qdl-cubox-i.dtsi, etc