libimxdmabuffer icon indicating copy to clipboard operation
libimxdmabuffer copied to clipboard

support libimxdmabuffer for Linux 6.6.lts

Open carlosgonz0 opened this issue 6 months ago • 2 comments

looks like libimxdmabuffer do not sipport newer Linux versions:

purism@pureos:~/libimxdmabuffer-master$ ./waf build
Waf: Entering directory `/home/purism/libimxdmabuffer-master/build'
[1/7] Compiling imxdmabuffer/imxdmabuffer_dma_heap_allocator.c
[2/7] Compiling imxdmabuffer/imxdmabuffer.c
[3/7] Compiling test/test-alloc.c
[4/7] Compiling libimxdmabuffer.pc.in
../imxdmabuffer/imxdmabuffer_dma_heap_allocator.c: In function ‘imx_dma_buffer_dma_heap_allocator_start_sync_session_impl’:
../imxdmabuffer/imxdmabuffer_dma_heap_allocator.c:295:37: error: storage size of ‘dma_phys’ isn’t known
  295 |                 struct dma_buf_phys dma_phys;
      |                                     ^~~~~~~~
../imxdmabuffer/imxdmabuffer_dma_heap_allocator.c:296:55: error: ‘DMA_BUF_IOCTL_PHYS’ undeclared (first use in this function); did you mean ‘DMA_BUF_IOCTL_SYNC’?
  296 |                 ioctl(imx_dma_heap_buffer->dmabuf_fd, DMA_BUF_IOCTL_PHYS, &dma_phys);
      |                                                       ^~~~~~~~~~~~~~~~~~
      |                                                       DMA_BUF_IOCTL_SYNC
../imxdmabuffer/imxdmabuffer_dma_heap_allocator.c:296:55: note: each undeclared identifier is reported only once for each function it appears in
../imxdmabuffer/imxdmabuffer_dma_heap_allocator.c:295:37: warning: unused variable ‘dma_phys’ [-Wunused-variable]
  295 |                 struct dma_buf_phys dma_phys;
      |                                     ^~~~~~~~
../imxdmabuffer/imxdmabuffer_dma_heap_allocator.c: In function ‘imx_dma_buffer_dma_heap_allocator_stop_sync_session_impl’:
../imxdmabuffer/imxdmabuffer_dma_heap_allocator.c:341:37: error: storage size of ‘dma_phys’ isn’t known
  341 |                 struct dma_buf_phys dma_phys;
      |                                     ^~~~~~~~
../imxdmabuffer/imxdmabuffer_dma_heap_allocator.c:342:55: error: ‘DMA_BUF_IOCTL_PHYS’ undeclared (first use in this function); did you mean ‘DMA_BUF_IOCTL_SYNC’?
  342 |                 ioctl(imx_dma_heap_buffer->dmabuf_fd, DMA_BUF_IOCTL_PHYS, &dma_phys);
      |                                                       ^~~~~~~~~~~~~~~~~~
      |                                                       DMA_BUF_IOCTL_SYNC
../imxdmabuffer/imxdmabuffer_dma_heap_allocator.c:341:37: warning: unused variable ‘dma_phys’ [-Wunused-variable]
  341 |                 struct dma_buf_phys dma_phys;
      |                                     ^~~~~~~~
../imxdmabuffer/imxdmabuffer_dma_heap_allocator.c: In function ‘imx_dma_buffer_dma_heap_get_physical_address_from_dmabuf_fd’:
../imxdmabuffer/imxdmabuffer_dma_heap_allocator.c:532:29: error: storage size of ‘dma_phys’ isn’t known
  532 |         struct dma_buf_phys dma_phys;
      |                             ^~~~~~~~
../imxdmabuffer/imxdmabuffer_dma_heap_allocator.c:536:30: error: ‘DMA_BUF_IOCTL_PHYS’ undeclared (first use in this function); did you mean ‘DMA_BUF_IOCTL_SYNC’?
  536 |         if (ioctl(dmabuf_fd, DMA_BUF_IOCTL_PHYS, &dma_phys) < 0)
      |                              ^~~~~~~~~~~~~~~~~~
      |                              DMA_BUF_IOCTL_SYNC
../imxdmabuffer/imxdmabuffer_dma_heap_allocator.c:532:29: warning: unused variable ‘dma_phys’ [-Wunused-variable]
  532 |         struct dma_buf_phys dma_phys;
      |                             ^~~~~~~~
../imxdmabuffer/imxdmabuffer_dma_heap_allocator.c:544:1: warning: control reaches end of non-void function [-Wreturn-type]
  544 | }
      | ^

Waf: Leaving directory `/home/purism/libimxdmabuffer-master/build'
Build failed
 -> task in 'imxdmabuffer' failed with exit status 1 (run with -v to display more information)

carlosgonz0 avatar Jun 23 '25 01:06 carlosgonz0

Please provide more details on how to reproduce the issue. What machine are you using and which branches are involved?

otavio avatar Jun 23 '25 11:06 otavio

Branch is this: https://github.com/Freescale/libimxdmabuffer/releases/tag/1.1.3 i tryed master too. Machine is this: Librem 5 and Linux 6.6.92: https://source.puri.sm/Librem5/linux

carlosgonz0 avatar Jun 26 '25 04:06 carlosgonz0