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
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;
+
+
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 +---