parrallel ipu handling

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

parrallel ipu handling

跳至解决方案
1,489 次查看
smspatrick
Contributor III

For a videofilter I use two ipu instances, both with its own handle, refering to IPUV3 Library. In OP_NORMAL_MODE it's too slow, so i set up streaming mode according to the User's Guide. Both for themself are working fine, but together they nagging around:

mxc_ipu_hl_lib.c:947 ipu is busy
mxc_ipu mxc_ipu: handler already installed on irq 0

mxc_ipu_hl_lib.c:2779 Ioctl IPU_REGISTER_GENERIC_ISR 0 failed!

So i checked the mxc_ipu_hl_lib.c and every call of mxc_ipu_lib_task_init() refers to the same irq channel.

So: How I work around that and why use handle ipu instances when they in the end are referring to the same processes?

It's urgent, so a simple and cheap solution would be appreciate.

Here are some of the inits:

...

filter->ipu1->mode = OP_STREAM_MODE;

...

init_return = mxc_ipu_lib_task_init(  filter->ipu1->input,           //input parameter

                                                           NULL,                            //overlay parameter

                                                           filter->ipu1->output,       //output parameter

                                                           filter->ipu1->mode,         //ipu mode refer to header file

                                                           filter->ipu1->handle);      //allocate for init, provide some info after task init function

for the second ipu all the same.


标签 (4)
标记 (2)
0 项奖励
回复
1 解答
1,050 次查看
rogerio_silva
NXP Employee
NXP Employee

Hi Patrick,

According to the ipu_lib user guide, there are 3 time-sharing tasks in the IPU hardware; they are ENC, VF and PP. You can't process 2 same tasks at the same time (e.g. 2 ENC, 2VF or 2 PP).

You can use the gstreamer ipu color space conversion plugin (mfw_gst_ipu_csc.c) as example of ipu usage on video applications.

Rgds

Rogerio

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,051 次查看
rogerio_silva
NXP Employee
NXP Employee

Hi Patrick,

According to the ipu_lib user guide, there are 3 time-sharing tasks in the IPU hardware; they are ENC, VF and PP. You can't process 2 same tasks at the same time (e.g. 2 ENC, 2VF or 2 PP).

You can use the gstreamer ipu color space conversion plugin (mfw_gst_ipu_csc.c) as example of ipu usage on video applications.

Rgds

Rogerio

0 项奖励
回复
1,050 次查看
smspatrick
Contributor III

Hi Rogerio,

the Plugin only handles one ipu-instance and even this not very well, when it won't get conformant gstreamer buffers, since then it use a memcpy on both sides.

The soultion is the triplet of [ 1. task_init() 2. task_update()  3.task_uninit() ] two times in a parallel process, so that the interrupt works on that process and use a flag or semaphore for the main-thread to see when its done. This works very well.

0 项奖励
回复