Re: [PATCH v4 05/17] drm: add mmap() to drm_gem_object_funcs

2019-09-09 Thread Gerd Hoffmann
Hi, > > + vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND | > > VM_DONTDUMP; > > + vma->vm_page_prot = > > pgprot_writecombine(vm_get_page_prot(vma->vm_flags)); > > + vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); > > + } > > Totall

Re: [PATCH v4 05/17] drm: add mmap() to drm_gem_object_funcs

2019-09-06 Thread Daniel Vetter
On Fri, Sep 6, 2019 at 2:13 PM Gerd Hoffmann wrote: > > Hi, > > > I think if we do an mmap callback, it should replace all the mmap handling > > (except the drm_gem_object_get) that drm_gem_mmap_obj does. So maybe > > something like the below: > > [ snip ] > > > Since I remember quite a few disc

Re: [PATCH v4 05/17] drm: add mmap() to drm_gem_object_funcs

2019-09-06 Thread Gerd Hoffmann
Hi, > I think if we do an mmap callback, it should replace all the mmap handling > (except the drm_gem_object_get) that drm_gem_mmap_obj does. So maybe > something like the below: [ snip ] > Since I remember quite a few discussions where the default vma flag > wrangling we're doing is seriousl

Re: [PATCH v4 05/17] drm: add mmap() to drm_gem_object_funcs

2019-09-03 Thread Daniel Vetter
On Thu, Aug 08, 2019 at 03:44:05PM +0200, Gerd Hoffmann wrote: > drm_gem_object_funcs->vm_ops alone can't handle > everything mmap() needs. Add a new callback for it. > > Signed-off-by: Gerd Hoffmann > --- > include/drm/drm_gem.h | 9 + > drivers/gpu/drm/drm_gem.c | 6 ++ > 2 fi

[PATCH v4 05/17] drm: add mmap() to drm_gem_object_funcs

2019-08-08 Thread Gerd Hoffmann
drm_gem_object_funcs->vm_ops alone can't handle everything mmap() needs. Add a new callback for it. Signed-off-by: Gerd Hoffmann --- include/drm/drm_gem.h | 9 + drivers/gpu/drm/drm_gem.c | 6 ++ 2 files changed, 15 insertions(+) diff --git a/include/drm/drm_gem.h b/include/drm