Re: [Intel-gfx] [PATCH 5/9] drm/i915/bdw: Reorganize PT allocations

2014-02-20 Thread Imre Deak
On Wed, 2014-02-19 at 22:05 -0800, Ben Widawsky wrote: > The previous allocation mechanism would get 2 contiguous allocations, > one for the page directories, and one for the page tables. As each page > table is 1 page, and there are 512 of these per page directory, this > goes to 2MB. An unfriendl

[Intel-gfx] [PATCH 5/9] drm/i915/bdw: Reorganize PT allocations

2014-02-19 Thread Ben Widawsky
The previous allocation mechanism would get 2 contiguous allocations, one for the page directories, and one for the page tables. As each page table is 1 page, and there are 512 of these per page directory, this goes to 2MB. An unfriendly request at best. Worse still, our HW now supports 4 page dire

Re: [Intel-gfx] [PATCH 5/9] drm/i915/bdw: Reorganize PT allocations

2014-02-19 Thread Ben Widawsky
On Wed, Feb 19, 2014 at 11:20:51PM +0200, Imre Deak wrote: > On Wed, 2014-02-19 at 13:06 -0800, Ben Widawsky wrote: > > On Wed, Feb 19, 2014 at 09:11:46PM +0200, Imre Deak wrote: > > > On Wed, 2014-02-12 at 14:28 -0800, Ben Widawsky wrote: > > > > The previous allocation mechanism would get 2 conti

Re: [Intel-gfx] [PATCH 5/9] drm/i915/bdw: Reorganize PT allocations

2014-02-19 Thread Imre Deak
On Wed, 2014-02-19 at 13:06 -0800, Ben Widawsky wrote: > On Wed, Feb 19, 2014 at 09:11:46PM +0200, Imre Deak wrote: > > On Wed, 2014-02-12 at 14:28 -0800, Ben Widawsky wrote: > > > The previous allocation mechanism would get 2 contiguous allocations, > > > one for the page directories, and one for

Re: [Intel-gfx] [PATCH 5/9] drm/i915/bdw: Reorganize PT allocations

2014-02-19 Thread Ben Widawsky
On Wed, Feb 19, 2014 at 09:11:46PM +0200, Imre Deak wrote: > On Wed, 2014-02-12 at 14:28 -0800, Ben Widawsky wrote: > > The previous allocation mechanism would get 2 contiguous allocations, > > one for the page directories, and one for the page tables. As each page > > table is 1 page, and there ar

Re: [Intel-gfx] [PATCH 5/9] drm/i915/bdw: Reorganize PT allocations

2014-02-19 Thread Imre Deak
On Wed, 2014-02-19 at 21:11 +0200, Imre Deak wrote: > On Wed, 2014-02-12 at 14:28 -0800, Ben Widawsky wrote: > > The previous allocation mechanism would get 2 contiguous allocations, > > one for the page directories, and one for the page tables. As each page > > table is 1 page, and there are 512 o

Re: [Intel-gfx] [PATCH 5/9] drm/i915/bdw: Reorganize PT allocations

2014-02-19 Thread Imre Deak
On Wed, 2014-02-12 at 14:28 -0800, Ben Widawsky wrote: > The previous allocation mechanism would get 2 contiguous allocations, > one for the page directories, and one for the page tables. As each page > table is 1 page, and there are 512 of these per page directory, this > goes to 1MB. An unfriendl

Re: [Intel-gfx] [PATCH 5/9] drm/i915/bdw: Reorganize PT allocations

2014-02-12 Thread Ben Widawsky
On Wed, Feb 12, 2014 at 11:45:59PM +, Chris Wilson wrote: > On Wed, Feb 12, 2014 at 02:28:48PM -0800, Ben Widawsky wrote: > > - for (i = first_pte; i < last_pte; i++) > > + for (i = which_pte; i < last_pte; i++) { > > pt_vaddr[i] = scratch_pte; > > +

Re: [Intel-gfx] [PATCH 5/9] drm/i915/bdw: Reorganize PT allocations

2014-02-12 Thread Chris Wilson
On Wed, Feb 12, 2014 at 02:28:48PM -0800, Ben Widawsky wrote: > - for (i = first_pte; i < last_pte; i++) > + for (i = which_pte; i < last_pte; i++) { > pt_vaddr[i] = scratch_pte; > + num_entries--; > + BUG_ON(num_

[Intel-gfx] [PATCH 5/9] drm/i915/bdw: Reorganize PT allocations

2014-02-12 Thread Ben Widawsky
The previous allocation mechanism would get 2 contiguous allocations, one for the page directories, and one for the page tables. As each page table is 1 page, and there are 512 of these per page directory, this goes to 1MB. An unfriendly request at best. Worse still, our HW now supports 4 page dire