Re: linux-imx-headers and ioctl mismatches
Carlos Rafael Giani
This issue came up when I noticed that the ION and DWL allocators in libimxdmabuffer failed. (DWL is an API from the Hantro VPU libraries, and it fails, because internally it itself uses ION.) This is the relevant code: https://github.com/Freescale/libimxdmabuffer/blob/master/imxdmabuffer/imxdmabuffer_ion_allocator.c#L428 I am now wondering if I can add some workaround to also support older kernels that are subject to such a header mismatch. An ugly workaround would be to manually define the IOCTL, like this: #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) And then use the CUSTOM_DMA_BUF_IOCTL_PHYS instead of the regular DMA_BUF_IOCTL_PHYS in the code. Pro: This would make libimxdmabuffer work with existing setups, and could even be backported to zeus and warrior. Con: Defining IOCTLs in userspace like this is usually not a good idea. Comments?
On 10.04.20 16:22, Otavio Salvador
wrote:
On Fri, Apr 10, 2020 at 11:20 AM Carlos Rafael Giani <crg7475@...> wrote:Hm I thought there was some sort of imx-kernel base class. Apparently there isn't. If there were, it could then be merged with the linux-imx-headers recipe, and perhaps create something like a -dev package. But then again, a -dev package from a kernel recipe ...? Kind of weird.The problem is that you cannot mix packages / apps with different versions of this. This ends being part of the binary ABI. |
|