[IMX8MP] How to resolve VCEncStrmEncode: ERROR HW bus access error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Community
I am trying to make an app that performs asynchronous encoding/decoding over multiple threads, using VPU wrapper. Each thread has an infinite loop and within that loop the following is performed:
1. Create VPU encoder/decoder instance via VPU_EncOpen/VPU_DecOpen
2. Perform actual encoding/decoding
3. Close VPU encoder/decoder instance via VPU_EncClose/VPU_DecClose
The app seems to run fine at first, but after few hours (at least 2 hours) VPU_EncEncodeFrame from above #2 returns -1,
and VPU log shows "VCEncStrmEncode: ERROR HW bus access error".
It is safe to assume that this error is due to multiple VPU instances running, but isn't this a supported feature of IMX8MP's VPU? Meaning, the app does not need to handle anything regarding multiple VPU instances running (e.g. checking if VPU is busy) since this would be taken care of by the VPU wrapper, supposedly.
Since there is no VPU manual specifically for IMX8MP, I'm attaching below IMX6's manual. I assume Multi-Instances feature is also supported in IMX8MP.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Multiple instances are supported but in this apparently the vpu is full checking the stream encodes, try to give more latency the vpu just can process one image at the time, so give it more time to complete the action.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Bio_TICFSL , thanks for replying.
Are you suggesting to add intentional delays (e.g. doing std::this_thread::sleep_for(X)); after every encoding/decoding? This doesn't sound optimal especially for real-time systems.
It would have been helpful if VPU wrapper has an API to check VPU status (like the vpu_IsBusy() from i.MX 6 VPU API) so I could encode/decode only when VPU is actually free.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I agree with you this must not happens, I will send a request to developers in order to upgrade the driver for VPU.
Regards
