Can not get the maximum frame rate on IMX8mp evk device

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can not get the maximum frame rate on IMX8mp evk device

3,186 Views
jeffson
Contributor I

Hi,I have a USB capture device which can ouput 640*480 30fps video, but after I connect the usb device to IMX8MP evk, I can only get 9 fps when the output is 640*480.do you guys know why this is happening.

and I can see this error is being outputed on console.

[ 1632.270018] xhci-hcd xhci-hcd.2.auto: ERROR unknown event type 37

when the ouput is 640*360.video quality is ok,fps is 30.

when the output is 720*360, video ouput is also ok, fps is 30.

ony if the frame height is above 400, the video quality will become very bad and fps is only about 10.

looks wired.

 

Thanks.

0 Kudos
Reply
12 Replies

3,166 Views
joanxie
NXP TechSupport
NXP TechSupport

what bsp version do you use? pls share your test commands and logfile with me

0 Kudos
Reply

3,075 Views
jeffson
Contributor I

any idea on this?

 

before we applied this patch, we could not see the video on 640*480.

so this might be a clue.

0 Kudos
Reply

3,058 Views
joanxie
NXP TechSupport
NXP TechSupport
0 Kudos
Reply

3,011 Views
jeffson
Contributor I

Hello

 

does NXP provide a kernel 5.5 bsp?

can you tell me how to modify the code to use 5.5 kernel source, now I am using 5.4.24

0 Kudos
Reply

3,038 Views
jeffson
Contributor I

Hi,

I do saw this link and applied the patchs, but our USb device is not the same,it is not cdc-acm device.

I shared the device info with you earlier.

 

0 Kudos
Reply

2,999 Views
joanxie
NXP TechSupport
NXP TechSupport

it seems this related to the usb performance issue, but I couldn't reproduce this on my side, could you test your side about usb performance drop? and you couldn't get any video before you apply the patch, what error do you get when you didn't apply the patch? is it the same error about " ERROR unknown event type 37" ?

0 Kudos
Reply

2,965 Views
jeffson
Contributor I

I am talking with the xhci driver kernel developer, and they suggest me to try these

Trace shows there are a lot of isoc TRBs with BEI (Block Event Interrupt) flag queued.

These will fill the event ring with transfer events without issuing interrupts.

 Did setting the XHCI_AVOID_BEI flag for this host help?

 An more reasonable interrupt rate can be achieved by setting both XHCI_AVOID_BEI flag, and adding:

"edc649a82341 xhci: Tune interrupt blocking for isochronous transfers"

from 5.10 kernel.

 

This in addition to "36dc01657b49 usb: host: xhci: Support running urb giveback in tasklet context"

and the patch by Peter Chen mentioned earlier

0 Kudos
Reply

2,953 Views
joanxie
NXP TechSupport
NXP TechSupport

could you tell me who is your support FAE?  let me discuss with him or her to know more detailed information about your issue since you already share the debug information before, we can save time here

0 Kudos
Reply

2,920 Views
jeffson
Contributor I

Hi,joanxie

Can NXP make some time to help me deal with this?it is a problem that we have tried to solve for long time, and we tried a lot and we are very confidient that there are bugs on nxp xhci host controller device driver.

0 Kudos
Reply

2,950 Views
jeffson
Contributor I

I did not talk with NXP FAE,I talked with the xhci original driver developer from intel.

and He suggested me some things to try.But he do mentioned that it is bit difficult for him since NXP customized the xhci driver.The usb device is working pefectly on ubuntu as I mentioned.

 

Thanks. 

0 Kudos
Reply

2,973 Views
jeffson
Contributor I

yes, same error happened before we applying the patch from Peter Chen.

it is USB performance issue caused by interrupt rate, I think the NXP USB3.0 host controller driver have some bugs, I am not sure exactly which USB host controller IMx8mp evk is using.But we tested the ubuntu kernel 5.4 and 5.15, there is nothing problem displaying 640*480 resolution with our USB conveter device. 

0 Kudos
Reply

3,158 Views
jeffson
Contributor I

Hi,joanxie

bsp version:

https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m imx-5.4.24-2.1.0.xml

test command:

v4l2-ctl --set-input 0 -d /dev/video1
v4l2-ctl -s NTSC -d /dev/video1
v4l2-ctl --set-fmt-video=width=640,height=360 -d /dev/video1
qv4l2 -d /dev/video1

the usb device I am using is a anolog to usb converter

https://www.theimagingsource.com/products/converters-grabbers/video-to-usb-2.0-converters/dfgusb2pro...

Thanks

0 Kudos
Reply