Re: [PATCH 4/8] drm/ttm: factor out ttm_bo_mmap_vma_setup

2019-09-17 Thread Gerd Hoffmann
> It may not be worth blocking on this, so > > Acked-by: Thomas Zimmermann > > But I still think it's not a good interface because it exposes internal > details. > > Please consider another idea: how about splitting off the ttm_bo_get() > and vma-flags setup of ttm_fbdev_mmap() into a separat

Re: [PATCH 4/8] drm/ttm: factor out ttm_bo_mmap_vma_setup

2019-09-17 Thread Thomas Zimmermann
Hi Gerd Am 17.09.19 um 10:34 schrieb Gerd Hoffmann: > On Fri, Sep 13, 2019 at 03:05:34PM +0200, Thomas Zimmermann wrote: > >>> +void ttm_bo_mmap_vma_setup(struct ttm_buffer_object *bo, struct >>> vm_area_struct *vma) >>> +{ >>> + vma->vm_ops = &ttm_bo_vm_ops; >>> + >>> + /* >>> +* Note:

Re: [PATCH 4/8] drm/ttm: factor out ttm_bo_mmap_vma_setup

2019-09-17 Thread Gerd Hoffmann
On Fri, Sep 13, 2019 at 03:05:34PM +0200, Thomas Zimmermann wrote: > > +void ttm_bo_mmap_vma_setup(struct ttm_buffer_object *bo, struct > > vm_area_struct *vma) > > +{ > > + vma->vm_ops = &ttm_bo_vm_ops; > > + > > + /* > > +* Note: We're transferring the bo reference to > > +* vma->vm

Re: [PATCH 4/8] drm/ttm: factor out ttm_bo_mmap_vma_setup

2019-09-17 Thread Gerd Hoffmann
On Fri, Sep 13, 2019 at 02:56:09PM +0200, Thomas Zimmermann wrote: > Hi > > Am 13.09.19 um 14:29 schrieb Gerd Hoffmann: > > Factor out ttm vma setup to a new function. Reduces > > code duplication a bit and allows to implement > > &drm_gem_object_funcs.mmap in gem ttm helpers. > > > > Signed-off

Re: [PATCH 4/8] drm/ttm: factor out ttm_bo_mmap_vma_setup

2019-09-13 Thread Thomas Zimmermann
Hi Am 13.09.19 um 14:29 schrieb Gerd Hoffmann: > Factor out ttm vma setup to a new function. Reduces > code duplication a bit and allows to implement > &drm_gem_object_funcs.mmap in gem ttm helpers. > > Signed-off-by: Gerd Hoffmann > --- > include/drm/ttm/ttm_bo_api.h| 8 ++ > drivers

Re: [PATCH 4/8] drm/ttm: factor out ttm_bo_mmap_vma_setup

2019-09-13 Thread Thomas Zimmermann
Hi Am 13.09.19 um 14:29 schrieb Gerd Hoffmann: > Factor out ttm vma setup to a new function. Reduces > code duplication a bit and allows to implement > &drm_gem_object_funcs.mmap in gem ttm helpers. > > Signed-off-by: Gerd Hoffmann > --- > include/drm/ttm/ttm_bo_api.h| 8 ++ > drivers

[PATCH 4/8] drm/ttm: factor out ttm_bo_mmap_vma_setup

2019-09-13 Thread Gerd Hoffmann
Factor out ttm vma setup to a new function. Reduces code duplication a bit and allows to implement &drm_gem_object_funcs.mmap in gem ttm helpers. Signed-off-by: Gerd Hoffmann --- include/drm/ttm/ttm_bo_api.h| 8 ++ drivers/gpu/drm/ttm/ttm_bo_vm.c | 47 ++---