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
Solved! Go to Solution.
Solved.
mismatch in .h files.
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?