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.

DM8148-MUSB: USB performance comparison between DMA and PIO mode

Hi, All,


With Ti81xx EZSDK, the USB is working at DMA mode by default. The mode can be changed to PIO mode by the following change in default config file:

CONFIG_MUSB_PIO_ONLY=y
# CONFIG_USB_TI_CPPI41_DMA_HW is not set
# CONFIG_USB_TI_CPPI41_DMA is not set

After change, the new mode is verified by the following console messages. Also, the usb driver works per normal.

musb-hdrc: version 6.0, host, debug=0
musb-hdrc musb-hdrc.0:
 dma type: pio
MUSB controller-0 revision 4ea20800
musb-hdrc musb-hdrc.0: MUSB HDRC host driver
musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: MUSB HDRC host driver
usb usb1: Manufacturer: Linux 2.6.37 musb-hcd
usb usb1: SerialNumber: musb-hdrc.0
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
musb-hdrc musb-hdrc.0:
USB Host mode controller at d701e000 using PIO, IRQ 18

However, I have one Q: is there any impact on the performance after disabling the DMA and using PIO mode? Does TI or anyone have the test data on performance comparison between usb DMA and PIO mode on DM8148 platform?

BTW, some info on our application: we are configuring both usb0 and usb1 as host mode. The usb0 port is connected to one camera and usb1 port to one 2-port hub which is designed to support the mass storage devices and others. In our application, we need fast data transfer due to image data from camera. We encountered some issue on using DMA mode, it seems that occurrence of the issue with using PIO mode is much lower. This is why we are thinking if the PIO mode is suitable for our application and what is performance impact.

Thanks in advance for your information and suggestion.

Best Regards,

Shunnian

 

 

  • Hi Shunnian,

    Shunnian Zhai said:

    With Ti81xx EZSDK, the USB is working at DMA mode by default. The mode can be changed to PIO mode by the following change in default config file:

    CONFIG_MUSB_PIO_ONLY=y
    # CONFIG_USB_TI_CPPI41_DMA_HW is not set
    # CONFIG_USB_TI_CPPI41_DMA is not set

    The recommended approach to change from DMA to PIO mode is not direct change of the .config file, but changing it through the menuconfig:

    We have only performance data regarding USB DMA mode (see wiki page below), we have no performance data for USB PIO mode. You can try to run the same tests in USB PIO mode and compare the numbers. I expect when using PIO mode, to have significant increase in the CPU load during USB PIO data transfer.

    I have found some performance numbers for USB PIO for similar AM335x device:

    The difference between DM814x/AM387x USB and AM335x USB are listed below:

    Regards,
    Pavel

  • Hi, Pavel,

    Thanks for your good support. These information are a good reference and  very helpful.

    Regards,

    Shunnian