I encountered very weird issue (also easy repeatable on demo SAMA5D3x-MB board, ATSAMA5D31 SoC):
Writing some patterns in "video" memory (and having LCDC enabled) causes packet errors (CRC, bad signals) on USB on our custom board, but when tried on demo board, they cause packet stalls?? on ethernet.
These errors do not occur when pixels only have 1 bit per RGB component changing or all pixels are of the same color.
e.g.:
BGR = 0x808080, 0x020202, ... pattern does not produce errors, neither does 0xFFFFFF, 0xFFFFFF, ...
however BGR = 0xFFFFFF, 0x000000, ... produces errors
I tried different kernel versions (mainline 4.4, mainline 4.9, Linux4SAM 3.10, Linux4SAM 3.18, Linux4SAM 4.4) and also "reference" image from http://www.at91.com/linux4sam/bin/view/ ... ekMainPage to make sure it is not our customized firmware or board that is a problem.
Disconnecting LCD from board does not help either (those signals are all just outputs, but still). Severely reducing dotclock frequency (to unusable levels) does however reduce number of errors (but not eliminate??). Using dri/drm instead of fbdev does not help.
Anyone has any idea what might be the problem as the whole thing just doesn't make any sense ? DMA arbitration problem in SoC ? Linux kernel problem ? Something else ?
Can anyone confirm and check on their board with this simple quick&dirty test:
1.connect to your board over ethernet using ssh and do continuous listings:
Code: Select all
while true; do dmesg; done
Close any application that might be writing to fb.
3.fill video memory with random pixels
Code: Select all
cat /dev/urandom > /dev/fb0
5.fill video memory with black pixels
Code: Select all
cat /dev/zero > /dev/fb0
Currently we use quick and dirty patch in user application to only use colors that have only one bit enabled per RGB component to avoid severe problems on field, but that heavily restricts application (reduces number of colors from 2^18 to 8^3).
Thanks to anyone spending time to at least try the test (please report findings: if the communication does not get stuck, which kernel are you using?)
Best regards