cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
darthsimpson
Observer
Observer
1,428 Views
Registered: ‎10-05-2018

MPSoC live input using Ultra96 & Pynq

Hi all,

My setup:
Pynq 2.4
Ultra96V1 (Ultrascale Zynq)

Im basically trying to use the xilinx test pattern generator and timing controller to show color bars on the displayport output of the device.

I following Adam Taylors recipe to do this with some additions (like an adder HLS block just to test axi read/writes).

https://www.hackster.io/news/microzed-chronicles-displayport-controller-part-one-25734db13fad

I then followed the recipe to for poking the tgp and vtc blocks according to:

https://forums.xilinx.com/t5/Design-and-Debug-Techniques-Blog/Video-Series-23-Generate-a-video-output-on-Pynq-Z2-HDMI-out/ba-p/932553#feedback-success

tpg = overlay.v_tpg_0
vtc = overlay.v_tc_0
tpg.write(0x10,720)
tpg.write(0x18,1280)
tpg.write(0x40,0)
tpg.write(0x20,9)
tpg.write(0x00,0x81)
vtc.write(0x00,0x01) <- this is the go signal

I set the tpg output to be the same as that dervived by the tpg & vtc, i.e. 1280x720. Theres a 74.25MHz pixel clock in the FPGA fabric to do this.

Heres what i have checked:

  • blocks are bound in correctly
  • i can peek and poke the blocks (proving memory mapping is correct)
  • double checked registers for setting vtc and tpg against drivers and xilinx documentation.

I also rebuilt the Linux kernel to allow kernel access via command line for setting live feeds according to the following, and with the intention of calling this via a putty ssh terminal.

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842105/ZynqMP+DisplayPort+Linux+driver#ZynqMPDisplayPortLinuxdriver-LiveInput

echo "set_input 1280 720 0x100e" > /sys/kernel/debug/xlnx-bridge/xlnx_bridge-vid-layer
echo "enable" > /sys/kernel/debug/xlnx-bridge/xlnx_bridge-vid-layer

Issue is that the desktop has remained and there are no colour bars

Has anyone trying to use the PL fabric to control the hard displayport section of the Ultrascale ZYnq part?

I have tinkered, double checked kernel settings / configuration and rebuilt soo many times now.

Ive posted on Pynq site as well, but no feedback.

Much appreciated if anyone can help! I cant loose anymore hair :)

Darth

 

0 Kudos
17 Replies
florentw
Moderator
Moderator
1,313 Views
Registered: ‎11-09-2015

HI @darthsimpson 

Let's start from the beginning:

  • You started with the design from Adam Taylor. Was it working with the baremetal drivers?
  • Is it still working when you add your custom IPs?

If you have the desktop, it is also a good point. It means that the monitor is working. But this might also mean the Xorg is controlling the display. Maybe you should try to kill Xorg


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
darthsimpson
Observer
Observer
1,299 Views
Registered: ‎10-05-2018

Hi Florent,

Thanks for getting back.

Answering your questions,

(1) Yes i started with AT project and it worked with baremetal drivers.

(2) Yes it is still working with custom IP using baremetal drivers.

In summary i am confident the vivado part of the project is fine.

I tried your suggestion. I kill xorg and the monitor lost the desktop and went blank. I ran dmesg , please see attached screenshot

TPG is set to create pattern with a 1280 x720 output; axi clock is set to 74.25Mhz

Any help greatly received and appreciated.

Thanks

Darth

 

 

 

Capture.JPG
0 Kudos
darthsimpson
Observer
Observer
1,295 Views
Registered: ‎10-05-2018

maybe quality graphic...
Capture.PNG
0 Kudos
florentw
Moderator
Moderator
1,246 Views
Registered: ‎11-09-2015

HI @darthsimpson 

Can you try to run a modetest command to set the correct output resolution:

modetest -M xlnx -s 38:1280x720@RG16

Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
darthsimpson
Observer
Observer
1,238 Views
Registered: ‎10-05-2018

For some stange reason i dont have modetest installed.

Do you know which package i need to add to the petalinux build to include it?

 

Thanks

 

0 Kudos
mohamadoussayran
Adventurer
Adventurer
1,235 Views
Registered: ‎06-05-2018

hello @darthsimpson,

this link would help you, just look for modetest command (you have to enable DRM/KMS package in petalinux)

https://wiki.st.com/stm32mpu/wiki/DRM_KMS_overview

Thanks,

Mohamad

0 Kudos
florentw
Moderator
Moderator
1,172 Views
Registered: ‎11-09-2015

Hi @darthsimpson 

Did you find how to enable modetest?


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
darthsimpson
Observer
Observer
1,166 Views
Registered: ‎10-05-2018

Still trying to work out how to get modetest installed.

I know i have a DRM KMS framework installed, and am getting debug messages from the kernel.

Do you know the path / location of modetest on the petalinux system.

Sorry for not being very profficent with petalinux... still learning

Darth

 

0 Kudos
florentw
Moderator
Moderator
1,150 Views
Registered: ‎11-09-2015

Hi @darthsimpson 

I think you need to enable the libdrm in your file system.

So:

petalinux-config -c rootfs

File Systems Packages > X11 > base > libdrm


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
darthsimpson
Observer
Observer
1,151 Views
Registered: ‎10-05-2018

ok, will try and let you know

0 Kudos
darthsimpson
Observer
Observer
1,087 Views
Registered: ‎10-05-2018

Hi all,

Another frustrating weekend tryring to get this working... but no joy

Please see attached..

image 1: showing i had the config rootfs set accordingly

image 2: showing i had libdrm-tests included in bb and configs

image 3: showing contens of the bb file

image 4: showing contents of build/config.log

I still can not find any trace of modetest.

Boo hoo

 

Capture5.PNG
0 Kudos
darthsimpson
Observer
Observer
1,085 Views
Registered: ‎10-05-2018

and these files

Capture.PNG
Capture2.PNG
Capture3.PNG
Capture4.PNG
Capture5.PNG
0 Kudos
mohamadoussayran
Adventurer
Adventurer
1,075 Views
Registered: ‎06-05-2018

HDMI-Tx can be manually configured to generate the required mode. An open source utility like modetest can be used to configure the display pipeline.

  • DDR ==> FB_Rd (DMA) ==> HDMI_Tx


Note: Since 2018.1 introduces a new Xilinx drm driver, below test procedure will cover details for 2018.1 and later versions.
2018.1 and onwards: xlnx

 

 

 

Look for "xlnx" in petalinux kernel and rootfs to add the modetest tool. 

0 Kudos
darthsimpson
Observer
Observer
1,027 Views
Registered: ‎10-05-2018

Hi there,

Im trying to use displayport interface. I believe modetest is compatible with it and other display adapters.

Do you have any screen shots or descrption of where those settings are in the menu. Im pretty convinced that ive have the right kernel settings... but ill check again.

Thanks

 

 

 

0 Kudos
florentw
Moderator
Moderator
975 Views
Registered: ‎11-09-2015

Hi @darthsimpson 

Do you have any update on this?

One other option might be to start back from the Ultra96 BSP. I would guess modetest is enabled in it


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
darthsimpson
Observer
Observer
971 Views
Registered: ‎10-05-2018

Still working on it... apologies for being very slow to pick things up. I am hardware engineer trying to learn Petalinux etc.

I have been working on this in a separate thread on Pynqs website.

https://discuss.pynq.io/t/adding-to-rootfs/895

I didn't appreciate fully the architecture of pynq. Petalinux is used for the boot systems and Ubuntu for the rootfs. When i modified the petalinx rootfs to include libdrm-tests (which contains modetest) nothing got picked in the Pynq build. 

Painfully trying to understand how to do this... so still work in progress.

Really appreciate you continued support :)

 

 

 

 

 

 

0 Kudos
florentw
Moderator
Moderator
957 Views
Registered: ‎11-09-2015

Hi @darthsimpson 

Yeah i can't help you too much on this. I haven't done much on PYNQ


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos