How to use 2nd IPU unit on imx6

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

How to use 2nd IPU unit on imx6

跳至解决方案
2,521 次查看
DraganOstojic
Contributor V

I'm aware that there are 2 IPU units on imx6. How can I use 2nd IPU unit?

This is in general how I currently use IPU:

// open IPU

int fd_ipu = open("/dev/mxc_ipu", O_RDWR, 0);


// use IPU


...

ioctl(fd_ipu, ..., ...);


// close IPU

close(fd_ipu);


Can this code be extended to differentiate between accessing 1st or 2nd IPU unit?

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

Hi Dragan,

Using the Linux IPU driver, it's not possible to specify what IPU will be used. The driver handles it automatically and assigns each task for the available IPU.

If you want to use both IPUs at the same time (e.g. to process a specific task faster using 2 IPUs), you can open /dev/mxc_ipu once, create 2 threads and call the iotcl to perform the operation you want inside each thread.

I tried this approach and it works.

Rgds

Rogerio

在原帖中查看解决方案

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

Hi Dragan,

Using the Linux IPU driver, it's not possible to specify what IPU will be used. The driver handles it automatically and assigns each task for the available IPU.

If you want to use both IPUs at the same time (e.g. to process a specific task faster using 2 IPUs), you can open /dev/mxc_ipu once, create 2 threads and call the iotcl to perform the operation you want inside each thread.

I tried this approach and it works.

Rgds

Rogerio

0 项奖励
回复
1,656 次查看
DraganOstojic
Contributor V

Hi Rogerio, that is a neat trick. I'll give it a try.

Thanks.

0 项奖励
回复