cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
1,167 Views
Registered: ‎10-19-2017

2017.4 TRD Kernel boot fails without HDMI + CSI defined in device tree

Hi all,

 

I am having a problem with the 2017.4 TRD. My interest is only in the TPG to DisplayPort aspect of the demo. So after getting the full TRD running on my ZCU102, I decided to rebuild the device tree and exclude the HDMI and CSI portions. I could not find any inter-dependencies in the hardware for these, so I simply undefined them and rebuilt the DT:

 

 

#undef CONFIG_USE_HDMI_RX
#undef CONFIG_USE_CSI
#define CONFIG_USE_TPG
#undef CONFIG_USE_HDMI_TX
#define CONFIG_USE_SDSOC

 

This successfully produces a DT. If I compare to the baseline TRD DTS, this new DT includes everything but the contents of the vcap-hdmi.dtsi and vcap-csi.dtsi files (see attached DTS files). Precisely what I'm looking for.

 

I attempted to boot my board with this stripped down DT. The TRD bitstream is loaded from u-boot before the kernel is launched. The kernel boot hangs at the following line:

 

 

[ 1.473629] 9pnet: Installing 9P2000 support
[ 1.473653] Key type dns_resolver registered
[ 1.474057] registered taskstats version 1
[ 1.475821] Btrfs loaded, crc32c=crc32c-generic
[ 1.480980] ff000000.serial: ttyPS0 at MMIO 0xff000000 (irq = 42, base_baud = 6249375) is a xuarts
[ 1.522127] mmc0: new high speed SDHC card at address aaaa
[ 1.522409] mmcblk0: mmc0:aaaa SL16G 14.8 GiB 
[ 1.524400] mmcblk0: p1 p2
[ 3.167815] console [ttyPS0] enabled

 

After a little isolation, I discovered that the hang is occurring in drivers/dma/xilinx/xlinx_frmbuf.c in the xilinx_frmbuf_chan_probe() function. If the HDMI and CSI nodes are not defined in the device tree, the kernel hangs on the call to dev_m_request_irq():

 

 

spin_lock_init(&chan->lock);
INIT_LIST_HEAD(&chan->pending_list);
INIT_LIST_HEAD(&chan->done_list);

chan->irq = irq_of_parse_and_map(node, 0);

err = devm_request_irq(xdev->dev, chan->irq, xilinx_frmbuf_irq_handler, IRQF_SHARED, "xilinx_framebuffer", chan);
if (err) {
dev_err(xdev->dev, "unable to request IRQ %d\n", chan->irq);
return err;
}

 

 

This doesn't make a lot of sense to me. I have attached both the TRD and stripped DTS files that were reverse compiled from the DTB. So they contain every node. You'll see in a diff there are no changes to the interrupt controller or any of the TPG related nodes (outside of phandles obviously).

 

Finally, in the TRD there are 3 framebuffers, one for the HDMI (0xb0070000), one for the CSI (0xb0020000), and one for the TPG (0xb0050000). During my troubleshooting I actually discovered that this framebuffer driver is being called twice during kernel startup for these nodes. The initial entry into entry into xilinx_frmbuf_probe() bails out saying the initialization is being "deferred" due to a reset GPIO not being set appropriately.

 

Here is kernel startup with the full TRD DTS:

 

 

[1.351585] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
[1.351946] Write failed gate address:1000f02 [1.352038] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success [1.352203] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success [1.352351] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success [1.352499] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success [1.352646] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success [1.352801] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success [1.352948] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success [1.353096] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success [1.353315] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success [1.353468] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success [1.353614] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success [1.353763] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success [1.353911] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success [1.354062] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success [1.354209] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success [1.354358] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success [1.354511] xilinx-frmbuf b0070000.fb_wr: Probe deferred due to GPIO reset defer [1.354565] xilinx-frmbuf b0020000.fb_wr: Probe deferred due to GPIO reset defer [1.354611] xilinx-frmbuf b0050000.fb_wr: Probe deferred due to GPIO reset defer
...
[ 1.543830] ff000000.serial: ttyPS0 at MMIO 0xff000000 (irq = 42, base_baud = 6249375) is a xuarts
[ 3.326335] console [ttyPS0] enabled
[ 3.334234] xilinx-frmbuf b0070000.fb_wr: Xilinx AXI frmbuf DMA_DEV_TO_MEM
[ 3.341109] xilinx-frmbuf b0070000.fb_wr: Xilinx AXI FrameBuffer Engine Driver Probed!!
[ 3.349135] xilinx-frmbuf b0020000.fb_wr: Xilinx AXI frmbuf DMA_DEV_TO_MEM
[ 3.355990] xilinx-frmbuf b0020000.fb_wr: Xilinx AXI FrameBuffer Engine Driver Probed!!
[ 3.364012] xilinx-frmbuf b0050000.fb_wr: Xilinx AXI frmbuf DMA_DEV_TO_MEM
[ 3.370866] xilinx-frmbuf b0050000.fb_wr: Xilinx AXI FrameBuffer Engine Driver Probed!!

 

 

Here is kernel startup with the stripped DTS:

 

 

[1.345926] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
[1.346251] Write failed gate address:1000f02
[1.346342] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success
[1.346485] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success
[1.346625] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success
[1.346764] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success
[1.346904] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success
[1.347044] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success
[1.347184] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success
[1.347324] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success
[1.347537] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success
[1.347679] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success
[1.347823] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success
[1.347963] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success
[1.348121] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success
[1.348264] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success
[1.348404] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success
[1.348546] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success
[1.348683] xilinx-frmbuf b0050000.fb_wr: Probe deferred due to GPIO reset defer
...
[1.480980] ff000000.serial: ttyPS0 at MMIO 0xff000000 (irq = 42, base_baud = 6249375) is a xuarts
[1.522127] mmc0: new high speed SDHC card at address aaaa
[1.522409] mmcblk0: mmc0:aaaa SL16G 14.8 GiB 
[1.524400]  mmcblk0: p1 p2
[ 3.167815] console [ttyPS0] enabled
(hang)

 

 

This deference is unusual behavior, but the bottom line is if the framebuffer hangs in the call to xilinx_frmbuf_chan_probe() that means the second iteration through the driver passed the check on the reset GPIO, which means things should be out of reset at that point

 

I'm interested in any insight anyone can provide into this DMA and framebuffer setup. I cannot seem to find the inter-dependency between the TPG and HDMI/CSI that's causing this failure.

 

Thanks,

Nate

 

 

 

3 Replies
Highlighted
Mentor
Mentor
1,153 Views
Registered: ‎02-24-2014

I gave you a kudo, because your problem is excellently and clearly described..   I unfortunately have no clue where the dependency might be located, but I am curious to know where it is, because I am working on a similar video processing system.   I hope that a Xilinx linux video expert will be able to explain this behavior.

Don't forget to close a thread when possible by accepting a post as a solution.
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
934 Views
Registered: ‎05-07-2015

HI @njozwiak

 

Can you please send me with  the modified/stripped  ZCu102 design HDF (with bit stream included).

We will try build things at our end and check.

 

 

Thanks
Bharath

Thanks
Bharath
--------------------------------------------------​--------------------------------------------
Please mark the Answer as "Accept as solution" if information provided addresses your query/concern.
Give Kudos to a post which you think is helpful.
--------------------------------------------------​-------------------------------------------
0 Kudos
Highlighted
Adventurer
Adventurer
916 Views
Registered: ‎10-19-2017

Hi Bharath,

 

The handoffs are attached and labeled accordingly. Please let me know if I can provide any more information.

 

Thanks

0 Kudos