Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System Freezing When Running More Than 3 RGA Threads on Orange Pi 5 (RK3588S) #86

Open
thuongton999 opened this issue Sep 5, 2024 · 2 comments

Comments

@thuongton999
Copy link

I am developing a GStreamer-based application on the Orange Pi 5 (RK3588) that runs multiple GStreamer pipelines in parallel, each on a different thread. The pipelines are designed to handle video streams from different RTSP sources, utilizing the Rockchip RGA for hardware-accelerated video processing.

When running up to 3 threads, the system functions as expected. However, when I attempt to run more than 3 threads, the system begins to log repeated RGA_BLIT failure messages and eventually freezes, requiring a hard reset. Below is the error message encountered:

RgaBlit(1485) RGA_BLIT fail: Invalid argument
RgaBlit(1486) RGA_BLIT fail: Invalid argument
handl-fd-vir-phy-hnd-format[0, 209, (nil), (nil), 0, 0]
rect[0, 0, 1920, 1080, 1920, 1088, 2560, 0]
f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
handl-fd-vir-phy-hnd-format[0, 0, 0xfffef00ee9f0, (nil), 0, 0]
rect[0, 0, 640, 480, 640, 480, 512, 0]
f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]

Here is my sample GStreamer pipeline:

gst-launch-1.0 rtspsrc location=rtsp://<URI> ! queue ! rtph264depay ! h264parse ! mppvideodec ! rgaconvert ! videorate ! video/x-raw,format=RGB,width=640,height=480,framerate=15/1 ! fakesink

Expected Behavior: The system should be able to handle multiple threads utilizing the RGA without freezing or logging continuous errors.

Actual Behavior: When more than 3 threads are run, the system logs repeated RGA_BLIT errors and eventually freezes.

Environment:

  • Board: Orange Pi 5 (RK3588S)
  • OS: Ubuntu Rockchip 22.04
@Czhazha
Copy link

Czhazha commented Nov 26, 2024

Did you manage to solve this issue? I have encountered the same problem.

@thuongton999
Copy link
Author

I have temporarily solved it by using atomic operations while multi-threading. However, technically, it only accesses the RGA one at a time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants