On Thu, Mar 11, 2021 at 04:12:55PM +, Paul Cercueil wrote:
> ret = dma_mmap_pages(cma_obj->base.dev->dev,
> vma, vma->vm_end - vma->vm_start,
> virt_to_page(cma_obj->vaddr));
>
> It works fine.
>
> I think I can use remap_pfn_range() for now, and switch
Le jeu. 11 mars 2021 à 12:36, Christoph Hellwig a
écrit :
On Thu, Mar 11, 2021 at 12:32:27PM +, Paul Cercueil wrote:
> dma_to_phys must not be used by drivers.
>
> I have a proper helper for this waiting for users:
>
>
http://git.infradead.org/users/hch/misc.git/commitdiff/96a546e
On Thu, Mar 11, 2021 at 12:32:27PM +, Paul Cercueil wrote:
> > dma_to_phys must not be used by drivers.
> >
> > I have a proper helper for this waiting for users:
> >
> > http://git.infradead.org/users/hch/misc.git/commitdiff/96a546e7229ec53aadbdb7936d1e5e6cb5958952
> >
> > If you can confir
Hi Christoph,
Le jeu. 11 mars 2021 à 12:26, Christoph Hellwig a
écrit :
+int drm_gem_cma_mmap_noncoherent(struct drm_gem_object *obj,
+ struct vm_area_struct *vma)
+{
+ struct drm_gem_cma_object *cma_obj;
+ unsigned long pfn;
+ int ret;
+
+
> +int drm_gem_cma_mmap_noncoherent(struct drm_gem_object *obj,
> + struct vm_area_struct *vma)
> +{
> + struct drm_gem_cma_object *cma_obj;
> + unsigned long pfn;
> + int ret;
> +
> + /*
> + * Clear the VM_PFNMAP flag that was set by drm_gem_mmap()
This function can be used by drivers that need to mmap dumb buffers
created with non-coherent backing memory.
v2: Use dma_to_phys() since cma_obj->paddr isn't a phys_addr_t but a
dma_addr_t.
Signed-off-by: Paul Cercueil
---
drivers/gpu/drm/drm_gem_cma_helper.c | 67 +---
6 matches
Mail list logo