[Intel-gfx] [PATCH 02/13] drm/i915: rewrite shmem_pwrite_slow to use copy_from_user

2011-11-21 Thread Daniel Vetter
On Sun, Nov 20, 2011 at 09:56:32PM -0800, Ben Widawsky wrote: [snip the patch] > Bikeshed, but I would much prefer a #define for the swizzle > bit/cacheline size. I've looked at this stuff way too long, so I'm biased, but 64 = cacheline = dram fetch size = 1 << 64 feels about as natural for me as

Re: [Intel-gfx] [PATCH 02/13] drm/i915: rewrite shmem_pwrite_slow to use copy_from_user

2011-11-21 Thread Ben Widawsky
On Mon, Nov 21, 2011 at 09:55:07AM -0800, Ben Widawsky wrote: > On Mon, Nov 21, 2011 at 05:02:44PM +0100, Daniel Vetter wrote: > > On Sun, Nov 20, 2011 at 09:56:32PM -0800, Ben Widawsky wrote: > > [snip the patch] > > > Bikeshed, but I would much prefer a #define for the swizzle > > > bit/cacheline

[Intel-gfx] [PATCH 02/13] drm/i915: rewrite shmem_pwrite_slow to use copy_from_user

2011-11-21 Thread Ben Widawsky
On Mon, Nov 21, 2011 at 09:55:07AM -0800, Ben Widawsky wrote: > On Mon, Nov 21, 2011 at 05:02:44PM +0100, Daniel Vetter wrote: > > On Sun, Nov 20, 2011 at 09:56:32PM -0800, Ben Widawsky wrote: > > [snip the patch] > > > Bikeshed, but I would much prefer a #define for the swizzle > > > bit/cacheline

Re: [Intel-gfx] [PATCH 02/13] drm/i915: rewrite shmem_pwrite_slow to use copy_from_user

2011-11-21 Thread Ben Widawsky
On Mon, Nov 21, 2011 at 05:02:44PM +0100, Daniel Vetter wrote: > On Sun, Nov 20, 2011 at 09:56:32PM -0800, Ben Widawsky wrote: > [snip the patch] > > Bikeshed, but I would much prefer a #define for the swizzle > > bit/cacheline size. > > I've looked at this stuff way too long, so I'm biased, but 6

[Intel-gfx] [PATCH 02/13] drm/i915: rewrite shmem_pwrite_slow to use copy_from_user

2011-11-21 Thread Ben Widawsky
On Mon, Nov 21, 2011 at 05:02:44PM +0100, Daniel Vetter wrote: > On Sun, Nov 20, 2011 at 09:56:32PM -0800, Ben Widawsky wrote: > [snip the patch] > > Bikeshed, but I would much prefer a #define for the swizzle > > bit/cacheline size. > > I've looked at this stuff way too long, so I'm biased, but 6

Re: [Intel-gfx] [PATCH 02/13] drm/i915: rewrite shmem_pwrite_slow to use copy_from_user

2011-11-21 Thread Daniel Vetter
On Sun, Nov 20, 2011 at 09:56:32PM -0800, Ben Widawsky wrote: [snip the patch] > Bikeshed, but I would much prefer a #define for the swizzle > bit/cacheline size. I've looked at this stuff way too long, so I'm biased, but 64 = cacheline = dram fetch size = 1 << 64 feels about as natural for me as

Re: [Intel-gfx] [PATCH 02/13] drm/i915: rewrite shmem_pwrite_slow to use copy_from_user

2011-11-20 Thread Ben Widawsky
On Sun, 6 Nov 2011 20:13:49 +0100 Daniel Vetter wrote: > ... instead of get_user_pages, because that fails on non page-backed > user addresses like e.g. a gtt mapping of a bo. > > To get there essentially copy the vfs read path into pagecache. We > can't call that right away because we have to

[Intel-gfx] [PATCH 02/13] drm/i915: rewrite shmem_pwrite_slow to use copy_from_user

2011-11-20 Thread Ben Widawsky
On Sun, 6 Nov 2011 20:13:49 +0100 Daniel Vetter wrote: > ... instead of get_user_pages, because that fails on non page-backed > user addresses like e.g. a gtt mapping of a bo. > > To get there essentially copy the vfs read path into pagecache. We > can't call that right away because we have to

[PATCH 02/13] drm/i915: rewrite shmem_pwrite_slow to use copy_from_user

2011-11-06 Thread Daniel Vetter
... instead of get_user_pages, because that fails on non page-backed user addresses like e.g. a gtt mapping of a bo. To get there essentially copy the vfs read path into pagecache. We can't call that right away because we have to take care of bit17 swizzling. To not deadlock with our own pagefault

[PATCH 02/13] drm/i915: rewrite shmem_pwrite_slow to use copy_from_user

2011-11-06 Thread Daniel Vetter
... instead of get_user_pages, because that fails on non page-backed user addresses like e.g. a gtt mapping of a bo. To get there essentially copy the vfs read path into pagecache. We can't call that right away because we have to take care of bit17 swizzling. To not deadlock with our own pagefault