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.
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" ?
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
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.
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.
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.
https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m imx-5.4.24-2.1.0.xml
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