[Intel-gfx] [PATCH 1/2] drm/i915: Use CPU mapping for userspace dma-buf mmap()

2015-08-06 Thread Daniel Vetter
On Wed, Aug 05, 2015 at 05:10:17PM -0300, Tiago Vignatti wrote: > On 08/05/2015 04:08 AM, Daniel Vetter wrote: > >On Tue, Aug 04, 2015 at 06:30:25PM -0300, Tiago Vignatti wrote: > >Nah they don't have to be equal since the problem isn't that nothing goes > >out to memory where the display can see

[Intel-gfx] [PATCH 1/2] drm/i915: Use CPU mapping for userspace dma-buf mmap()

2015-08-05 Thread Tiago Vignatti
On 08/05/2015 04:08 AM, Daniel Vetter wrote: > On Tue, Aug 04, 2015 at 06:30:25PM -0300, Tiago Vignatti wrote: > Nah they don't have to be equal since the problem isn't that nothing goes > out to memory where the display can see it, but usually only parts of it. > I.e. you need to change your test

[Intel-gfx] [PATCH 1/2] drm/i915: Use CPU mapping for userspace dma-buf mmap()

2015-08-05 Thread Daniel Vetter
On Tue, Aug 04, 2015 at 06:30:25PM -0300, Tiago Vignatti wrote: > On 07/31/2015 06:02 PM, Chris Wilson wrote: > > > >The first problem is that llc does not guarrantee that the buffer is > >cache coherent with all aspects of the GPU. For scanout and similar > >writes need to be WC. > > > >if

[Intel-gfx] [PATCH 1/2] drm/i915: Use CPU mapping for userspace dma-buf mmap()

2015-08-04 Thread Tiago Vignatti
On 07/31/2015 06:02 PM, Chris Wilson wrote: > > The first problem is that llc does not guarrantee that the buffer is > cache coherent with all aspects of the GPU. For scanout and similar > writes need to be WC. > > if (obj->has_framebuffer_references) would at least catch where the fb > is made

[Intel-gfx] [PATCH 1/2] drm/i915: Use CPU mapping for userspace dma-buf mmap()

2015-07-31 Thread Chris Wilson
On Fri, Jul 31, 2015 at 05:42:23PM -0300, Tiago Vignatti wrote: > For now we're opting out devices that don't have the LLC CPU cache (mostly > "Atom" devices). Alternatively, we could build up a path to mmap them through > GTT WC (and ignore the fact that will be dead-slow for reading). Or, an

[PATCH 1/2] drm/i915: Use CPU mapping for userspace dma-buf mmap()

2015-07-31 Thread Tiago Vignatti
For now we're opting out devices that don't have the LLC CPU cache (mostly "Atom" devices). Alternatively, we could build up a path to mmap them through GTT WC (and ignore the fact that will be dead-slow for reading). Or, an even more complex work I believe, would involve on setting up dma-buf