[PATCH v6 4/5] drm/i915: Implement end_cpu_access

2015-12-22 Thread Chris Wilson
On Fri, Dec 18, 2015 at 05:19:24PM -0200, Tiago Vignatti wrote: > On 12/18/2015 05:02 PM, Tiago Vignatti wrote: > >On 12/17/2015 06:01 AM, Chris Wilson wrote: > >>On Wed, Dec 16, 2015 at 08:25:36PM -0200, Tiago Vignatti wrote: > >>>This function is meant to be used with dma-buf mmap, when finishing

[PATCH v6 4/5] drm/i915: Implement end_cpu_access

2015-12-18 Thread Tiago Vignatti
On 12/18/2015 05:02 PM, Tiago Vignatti wrote: > On 12/17/2015 06:01 AM, Chris Wilson wrote: >> On Wed, Dec 16, 2015 at 08:25:36PM -0200, Tiago Vignatti wrote: >>> This function is meant to be used with dma-buf mmap, when finishing >>> the CPU >>> access of the mapped pointer. >>> >>> +static void i

[PATCH v6 4/5] drm/i915: Implement end_cpu_access

2015-12-18 Thread Tiago Vignatti
On 12/17/2015 06:01 AM, Chris Wilson wrote: > On Wed, Dec 16, 2015 at 08:25:36PM -0200, Tiago Vignatti wrote: >> This function is meant to be used with dma-buf mmap, when finishing the CPU >> access of the mapped pointer. >> >> +static void i915_gem_end_cpu_access(struct dma_buf *dma_buf, enum >>

[PATCH v6 4/5] drm/i915: Implement end_cpu_access

2015-12-17 Thread Chris Wilson
On Wed, Dec 16, 2015 at 08:25:36PM -0200, Tiago Vignatti wrote: > This function is meant to be used with dma-buf mmap, when finishing the CPU > access of the mapped pointer. > > +static void i915_gem_end_cpu_access(struct dma_buf *dma_buf, enum > dma_data_direction direction) > +{ > + struct

[PATCH v6 4/5] drm/i915: Implement end_cpu_access

2015-12-16 Thread Tiago Vignatti
This function is meant to be used with dma-buf mmap, when finishing the CPU access of the mapped pointer. The error case should be rare to happen though, requiring the buffer become active during the sync period and for the end_cpu_access to be interrupted. So we use a uninterruptible mutex_lock t