Missing ioctl in ipu.h

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

Missing ioctl in ipu.h

Jump to solution
1,022 Views
christophe
Contributor V

Hi all,

I use the following linux version for imx6: https://github.com/boundarydevices/linux-imx6/tree/boundary-imx_4.1.15_1.0.0_ga

In kernel include/linux, there's a ipu.h file, almost empty but that includes uapi/ipu.h. This last file contains at the end 4 ioctl commands, used by ipu drivers and the user:

/* IOCTL commands */
#define IPU_CHECK_TASK        _IOWR('I', 0x1, struct ipu_task)
#define IPU_QUEUE_TASK        _IOW('I', 0x2, struct ipu_task)
#define IPU_ALLOC        _IOWR('I', 0x3, int)
#define IPU_FREE        _IOW('I', 0x4, int)

Then sdk is obtained by: bitbake fsl-image-multimedia.bb -c populate_sdk

And surprise ! In the sdk, /usr/include/linux directory, a file named ipu.h can be found, but it doesn't include the 4 ioctl. Actually, it contains 2 dozens of another ioctl, also dedicated to ipu, but for kernel internal use only, not for user.


#define IPU_INIT_CHANNEL              _IOW('I', 0x1, ipu_channel_parm)
#define IPU_UNINIT_CHANNEL            _IOW('I', 0x2, ipu_channel_t)
#define IPU_INIT_CHANNEL_BUFFER       _IOW('I', 0x3, ipu_channel_buf_parm)

#define IPU_UPDATE_CHANNEL_BUFFER     _IOW('I', 0x4, ipu_channel_buf_parm)
#define IPU_SELECT_CHANNEL_BUFFER     _IOW('I', 0x5, ipu_channel_buf_parm)

..........................................................................

Obviously, if i force the 4 ioctl in the ipu.h file and call for instance IPU_QUEUE_TASK in the appli, nothing happens because ioctl id are not the same in appli and kernel.

I wonder how such a thing could happen, and how to do to have my 4 ioctl in the sdk ipu.h file ?

Rgds,

Christophe

Labels (4)
0 Kudos
1 Solution
841 Views
christophe
Contributor V

Solved.

mismatch in .h files.

View solution in original post

0 Kudos
2 Replies
842 Views
christophe
Contributor V

Solved.

mismatch in .h files.

0 Kudos
841 Views
JeremyWood
Contributor II

I'm trying to do a similar thing (in my case set /dev/fb1 overlay behavior) and running into the same kind of problem: How to get my application to have the correct ioctl defines available to it. 

How did you end up resolving this exactly?

0 Kudos