0

My driver was previously compiled with dma_gem_cma_helper.h using CMA-DMA in Kernel Ver-5.15.0-131. It seems that CMA either incomplete or something else in Kernel Ver-6.1.55. I am switching to DMA without CMA. Using dma_gem_dma_helper.h and replacing _cma with _dma, as shown in the patch file: https://lists.openwall.net/linux-kernel/2022/07/06/674. It needs both vaddr and paddr data members. But void * paddr is not defined in the struct drm_gem_dma_object.

struct drm_gem_dma_object {
        struct drm_gem_object base;
        dma_addr_t dma_addr;
        struct sg_table *sgt;

        /* For objects with DMA memory allocated by GEM DMA */
        void *vaddr;

        bool map_noncoherent;
};

How to convert CMA-DMA code into DMA-DMA code without paddr? Did I miss anything?

1
  • found that use dma_addr for paddr. Not sure it will work. It's based on RedHat: Link Commented Mar 21 at 12:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.