Re: [PATCH] drm/cma: correctly handle non-zero offset for mmap

2017-09-29 Thread Steven Price
On Thu, 2017-09-28 at 10:29 +0200, Daniel Vetter wrote: > On Thu, Sep 28, 2017 at 10:23 AM, Liviu Dudau > wrote: > > Hi Daniel, > > > > On Thu, Sep 28, 2017 at 09:40:35AM +0200, Daniel Vetter wrote: > > > On Wed, Sep 27, 2017 at 4:01 PM, Steven Price >

Re: [PATCH] drm/cma: correctly handle non-zero offset for mmap

2017-09-28 Thread Daniel Vetter
On Thu, Sep 28, 2017 at 10:23 AM, Liviu Dudau wrote: > Hi Daniel, > > On Thu, Sep 28, 2017 at 09:40:35AM +0200, Daniel Vetter wrote: >> On Wed, Sep 27, 2017 at 4:01 PM, Steven Price wrote: >> > From: Tu Vuong >> > >> > When a CMA GEM

Re: [PATCH] drm/cma: correctly handle non-zero offset for mmap

2017-09-28 Thread Liviu Dudau
Hi Daniel, On Thu, Sep 28, 2017 at 09:40:35AM +0200, Daniel Vetter wrote: > On Wed, Sep 27, 2017 at 4:01 PM, Steven Price wrote: > > From: Tu Vuong > > > > When a CMA GEM object is exported via DRM PRIME it should be possible > > to mmap the object using

Re: [PATCH] drm/cma: correctly handle non-zero offset for mmap

2017-09-28 Thread Daniel Vetter
On Wed, Sep 27, 2017 at 4:01 PM, Steven Price wrote: > From: Tu Vuong > > When a CMA GEM object is exported via DRM PRIME it should be possible > to mmap the object using an offset. However drm_gem_cma_mmap_obj always > zeroed vm_pgoff. No, at least no

[PATCH] drm/cma: correctly handle non-zero offset for mmap

2017-09-28 Thread Steven Price
From: Tu Vuong When a CMA GEM object is exported via DRM PRIME it should be possible to mmap the object using an offset. However drm_gem_cma_mmap_obj always zeroed vm_pgoff. Fix this by moving the zeroing of vm_pgoff to drm_gem_cma_mmap (which is only used for non-PRIME mmap)