How to use 2nd IPU unit on imx6

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use 2nd IPU unit on imx6

Jump to solution
1,679 Views
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?

Labels (2)
Tags (3)
0 Kudos
1 Solution
814 Views
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

View solution in original post

0 Kudos
2 Replies
815 Views
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 Kudos
814 Views
DraganOstojic
Contributor V

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

Thanks.

0 Kudos