This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DMA operation of PCI-Express causes a problem when I install the ti81xxvo.ko

Other Parts Discussed in Thread: TVP5158

I'm testing the DMA transfer of PCI-Express.

In a state in which I have installed only the driver of the PCI first, DMA test app works fine.

Will fail to DMA test of PCIExpress Then, when you install the driver of the capture relationship.

I have installed the drivers in the following order, and the DMA test every time I install the drivers for each, the operation of the DMA will be abnormal when you installed the ti81xxvin.ko.

# install PCI-Express
insmod driver/altera_pci.ko debug=1
major=`grep altera_pci/proc/devices | cut -f1 -d" "`
mknod /dev/altera_pci c $major 0
chmod 666 /dev/altera_pci

# install PCI-Express
insmod driver/syslink.ko
./slaveloader_release startup VPSS-M3 dm816x_hdvpss_v4l2.xem3
insmod driver/vpss.ko
insmod driver/ti81xxfb.ko vram=0:30M,1:1M,2:10M
insmod driver/ti81xxvo.ko debug=1
insmod driver/tvp5158.ko
insmod driver/ti81xxvin.ko debug=1   <- It is abnormal here
insmod driver/ti81xxhdmi.ko

So what is happening?


<Normal test operation>
    DMA from 0x20000000 to 0xa6c00000(0xffd00000) size=0x00080000
    [Read Data]
             00 01 02 03 04 05 06 07  08 09 0A 0B 0C 0D 0E 0F
    20000000 00 00 02 00 04 00 06 00  08 00 0A 00 0C 00 0E 00
    
    [Before]
             00 01 02 03 04 05 06 07  08 09 0A 0B 0C 0D 0E 0F
    FFD00000 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
    
    [After]
             00 01 02 03 04 05 06 07  08 09 0A 0B 0C 0D 0E 0F
    FFD00000 00 00 02 00 04 00 06 00  08 00 0A 00 0C 00 0E 00
    
    
<Abnormal test operation>

    DMA from 0x20000000 to 0xa6c00000(0xffd00000) size=0x00080000
    [Read Data]
             00 01 02 03 04 05 06 07  08 09 0A 0B 0C 0D 0E 0F
    20000000 00 00 02 00 04 00 06 00  08 00 0A 00 0C 00 0E 00
    
    [Before]
             00 01 02 03 04 05 06 07  08 09 0A 0B 0C 0D 0E 0F
    FFD00000 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
    
    [After]
             00 01 02 03 04 05 06 07  08 09 0A 0B 0C 0D 0E 0F
    FFD00000 0F 00 02 0D 00 00 00 0F  00 0A 0A 0A 0A 0A 0A 0A
   

  • Hi Shinji,

    Are you aligned with the below wiki pages?

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_PCI_Express_Root_Complex_Driver_User_Guide

    CAUTION: When changing inbound window/size, ensure that it covers valid RAM range as seen by the kernel else the EP devices may not be able to do DMA.

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_PCI_Express_Endpoint_Driver_User_Guide

    • EDMA sample driver for TI81XX EP side is provided as patch file here to be applied to kernel snapshot from ti81xx-master branch
    • Sample driver for TI81XX RC side is provide as a patch on the same kernel snapshot (after applying EDMA patch).

    NOTE2: The EP driver doesn't require any memory to be reserved for its own functionality, but this memory is required to provide mmap regions mapping to PCIe BARs (inbound transfers) and/or EDMA regions (outbound transfers) to allow application to perform PCIe communication and transfers.

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_PCI_Express_Endpoint_Driver_User_Guide#EDMA_Kernel_Module

    BR
    Pavel