[Intel-gfx] [PATCH 1/2] drm/i915: Make stolen use pin pages

2013-05-31 Thread Ben Widawsky
This makes it easier to catch leaks. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c index 89cbfab..bc593e3 100644 --- a

[Intel-gfx] [PATCH 2/2] drm/i915: Unpin stolen pages

2013-05-31 Thread Ben Widawsky
path, this patch cleans up that remaining pin. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index e5b6a92..a18a485 100644 --- a/drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Make stolen use pin pages

2013-05-31 Thread Ben Widawsky
This should have been in reply to patch 2, sorry... On Fri, May 31, 2013 at 02:46:19PM -0700, Ben Widawsky wrote: > This makes it easier to catch leaks. > > Signed-off-by: Ben Widawsky > --- > drivers/gpu/drm/i915/i915_gem_stolen.c | 2 +- > 1 file changed, 1 insert

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Unpin stolen pages

2013-06-03 Thread Ben Widawsky
in_count for its > > purposes. The purpose of this patch is purely to allow sanity checking > > the pages_pin_count with a WARN_ON during free which seems sensible but > > not strictly required. > > Yeah, silly me didn't read the code before sending a knee-jerk mail ;-)

Re: [Intel-gfx] [PATCH 00/34] PPGTT prep part 2 (and unmerged part 1)

2013-06-04 Thread Ben Widawsky
On Sat, May 25, 2013 at 12:26:34PM -0700, Ben Widawsky wrote: > Hello. > > I'm continuing to develop full PPGTT support for the i915 driver. This > series is a follow-up to the previously posted RFC [1]. This series > contains reworked versions of the unmerged patches (fing

Re: [Intel-gfx] [PATCH] drm/i915: Track clients and print their object usage in debugfs

2013-06-04 Thread Ben Widawsky
15_gem_request { > }; > > struct drm_i915_file_private { > + struct drm_file *base; > + struct task_struct *task; > + struct list_head link; > struct { > spinlock_t lock; > struct list_head request_list; > diff --git a/drivers/gpu/drm

Re: [Intel-gfx] [PATCH] drm/i915: Track clients and print their object usage in debugfs

2013-06-04 Thread Ben Widawsky
96cd37..8497dc9 100644 > --- a/drivers/gpu/drm/i915/i915_drv.h > +++ b/drivers/gpu/drm/i915/i915_drv.h > @@ -1068,7 +1068,6 @@ typedef struct drm_i915_private { > struct mutex modeset_restore_lock; > > struct i915_gtt gtt; > - > struct i915_gem_mm mm; &

Re: [Intel-gfx] [PATCH] drm/i915: Track clients and print their object usage in debugfs

2013-06-04 Thread Ben Widawsky
gt; xonotic-linux64: 1032 objects, 569933824 bytes (46874624 active, 383545344 > inactive, 6508544 unbound) > > v2: Use existing drm->filelist as pointed out by Ben. > v3: Not even stashing the task_struct is required as Ben pointed out > drm_file->pid. > > Signed-off-by:

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Only slightly increment hangcheck score if we succesfully kick a ring

2013-06-06 Thread Ben Widawsky
try to find out if the kick > helped." > > v2: Make sure we catch DoS attempts with batches full of invalid WAITs. > > References: https://bugs.freedesktop.org/show_bug.cgi?id=65394 > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala > Cc: Ben Widawsky > --- >

Re: [Intel-gfx] [PATCH] drm/i915: Don't count semaphore waits towards a stuck ring

2013-06-09 Thread Ben Widawsky
hit it probably implies the timeout value is too > low." > > v2: Make sure we don't even incur the KICK cost whilst waiting. > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65394 > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala > Cc: Ben Widawsky >

Re: [Intel-gfx] [PATCH 19/24] drm/i915: don't enable PM_VEBOX_CS_ERROR_INTERRUPT

2013-06-12 Thread Ben Widawsky
to be consistent with the > existing mess though. And in case someone feels like fixing it all up. > > This has been errornously enabled in > > commit 12638c57f31952127c734c26315e1348fa1334c2 > Author: Ben Widawsky > Date: Tue May 28 19:22:31 2013 -0700 > > drm/i

Re: [Intel-gfx] [PATCH 19/24] drm/i915: don't enable PM_VEBOX_CS_ERROR_INTERRUPT

2013-06-12 Thread Ben Widawsky
On Wed, Jun 12, 2013 at 07:18:38PM +0200, Daniel Vetter wrote: > On Wed, Jun 12, 2013 at 10:13:41AM -0700, Ben Widawsky wrote: > > On Wed, Jun 12, 2013 at 01:37:21PM +0200, Daniel Vetter wrote: > > > The code to handle it is broken - there's simply no code to clear CS >

Re: [Intel-gfx] [PATCH 19/24] drm/i915: don't enable PM_VEBOX_CS_ERROR_INTERRUPT

2013-06-12 Thread Ben Widawsky
On Wed, Jun 12, 2013 at 08:32:44PM +0200, Daniel Vetter wrote: > On Wed, Jun 12, 2013 at 8:19 PM, Ben Widawsky wrote: > > On Wed, Jun 12, 2013 at 07:18:38PM +0200, Daniel Vetter wrote: > >> On Wed, Jun 12, 2013 at 10:13:41AM -0700, Ben Widawsky wrote: > >> > On W

Re: [Intel-gfx] [PATCH 1/7] drm/i915: add struct i915_ctx_hang_stats

2013-06-12 Thread Ben Widawsky
ris Wilson, Ian Romanick) > > Signed-off-by: Mika Kuoppala > I don't have time to do a proper review before Daniel wants to merge these, and Chris has already reviewed it. 1-6 are: Acked-by: Ben Widawsky I don't really like the behavior of 7. At least, I'd like to mak

Re: [Intel-gfx] [PATCH] drm/i915: Reorder ring reinitialisation round reset

2013-06-12 Thread Ben Widawsky
bled. > > Signed-off-by: Chris Wilson > FWIW: I have some patches in my PPGTT series which I think accomplish the same thing with a nicer end result. See the, "use hw_init" patch. I've fine tuned things a bit since then too, iirc. [snip] -- Ben

Re: [Intel-gfx] [PATCH 24/24] drm/i915: simplify rps interrupt enabling/disabling sequence

2013-06-12 Thread Ben Widawsky
enable sequence, so we can reinstate the WARN lost in > > commit eda63ffb906c2fb3b609a0e87aeb63c0f25b9e6b > Author: Ben Widawsky > Date: Tue May 28 19:22:26 2013 -0700 > > drm/i915: Add PM regs to pre/post install > > Note that there's some room for futur

Re: [Intel-gfx] [PATCH] drm/i915: Reorder ring reinitialisation round reset

2013-06-12 Thread Ben Widawsky
On Wed, Jun 12, 2013 at 11:42:56PM +0100, Chris Wilson wrote: > On Wed, Jun 12, 2013 at 02:15:48PM -0700, Ben Widawsky wrote: > > On Mon, Jun 10, 2013 at 01:54:50PM +0100, Chris Wilson wrote: > > > In particular, we were reseting our GEM tracking before even attempting > >

[Intel-gfx] [PATCH] drm/i915: Remove extra "ring" from error message

2013-06-13 Thread Ben Widawsky
The ring names already have "ring" in it. CC: Chris Wilson Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 7505dd0..e8bec5b 10

[Intel-gfx] [PATCH] drm/i915: PPGTT dump for debug

2013-06-24 Thread Ben Widawsky
No users yet Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 893007a..005358f 100644 --- a/drivers/gpu/drm

Re: [Intel-gfx] [PATCH] drm/i915: PPGTT dump for debug

2013-06-24 Thread Ben Widawsky
On Mon, Jun 24, 2013 at 10:01:33AM -0700, Ben Widawsky wrote: > No users yet > > Signed-off-by: Ben Widawsky I didn't mean to send this yet. Please ignore. -- Ben Widawsky, Intel Open Source Technology Center ___ Intel-gfx mailing

[Intel-gfx] [PATCH] drm/i915: Fix context sizes on HSW

2013-06-24 Thread Ben Widawsky
st use 18 to be safe. We can trim it later. Reported-by: "Azad, Vinit" Cc: sta...@vger.kernel.org Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/i915_reg.h | 9 + 2 files changed, 2 insertions(+), 9 deletions(-) dif

[Intel-gfx] [PATCH] [v2] drm/i915: Fix context sizes on HSW

2013-06-24 Thread Ben Widawsky
ted-by: "Azad, Vinit" Cc: sta...@vger.kernel.org Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/i915_reg.h | 9 + 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_con

[Intel-gfx] [PATCH] [v3] drm/i915: Fix context sizes on HSW

2013-06-25 Thread Ben Widawsky
comment to the code. (Jesse & Paulo) Reported-by: "Azad, Vinit" Cc: sta...@vger.kernel.org Reviewed-by: Jesse Barnes Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/i915_reg.h | 15 +++ 2 files changed, 8 i

Re: [Intel-gfx] [PATCH i-g-t v2 3/3] quick_dump: Add VLV DPIO registers

2013-06-26 Thread Ben Widawsky
ed-off-by: Ville Syrjälä > Series is: Reviewed-by: Ben Widawsky -- Ben Widawsky, Intel Open Source Technology Center ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH 00/66] [v1] Full PPGTT minus soft pin

2013-06-27 Thread Ben Widawsky
in order to change cache levels. This should no longer be the case for unaffected VMs (I think). The same may be true with domain tracking. ## dmabuf/prime integration I haven't looked into what's missing to support it. If I'm lucky, it just works. With that, if you haven't a

[Intel-gfx] [PATCH 02/66] drm/i915: Extract error buffer capture

2013-06-27 Thread Ben Widawsky
This helps when we have per VM buffer capturing. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_irq.c | 69 +++-- 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c

[Intel-gfx] [PATCH 01/66] drm/i915: Remove extra error state NULL

2013-06-27 Thread Ben Widawsky
Not only was there an extra, but since we now kzalloc the error state, we don't need either. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_irq.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 20

[Intel-gfx] [PATCH 03/66] drm/i915: make PDE|PTE platform specific

2013-06-27 Thread Ben Widawsky
Jesse Barnes Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_gem_gtt.c | 9 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 7940cbe..b709712 100644

[Intel-gfx] [PATCH 05/66] drm/i915: Don't clear gtt with 0 entries

2013-06-27 Thread Ben Widawsky
This will help keep the next patch cleaner which will conditionally clear the guard page, and use 0 num_entries when not actually clear space for guard page. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu

[Intel-gfx] [PATCH 04/66] drm: Optionally create mm blocks from top-to-bottom

2013-06-27 Thread Ben Widawsky
-by: Ben Widawsky --- drivers/gpu/drm/drm_mm.c| 122 ++--- drivers/gpu/drm/i915/i915_gem.c | 4 +- include/drm/drm_mm.h| 148 3 files changed, 161 insertions(+), 113 deletions(-) diff --git a/drivers/gpu/drm

[Intel-gfx] [PATCH 08/66] drm/i915: cleanup context fini

2013-06-27 Thread Ben Widawsky
do_switch. CC: Mika Kuoppala Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_context.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index ff47145..644df91

[Intel-gfx] [PATCH 06/66] drm/i915: Conditionally use guard page based on PPGTT

2013-06-27 Thread Ben Widawsky
more than 1 location. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 3 ++- drivers/gpu/drm/i915/i915_gem.c | 4 ++-- drivers/gpu/drm/i915/i915_gem_gtt.c | 27 ++- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/d

[Intel-gfx] [PATCH 10/66] drm/i915: Split context enabling from init

2013-06-27 Thread Ben Widawsky
sabled contexts. Or else it blows up pre gen6 (Ben) Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem.c | 15 --- drivers/gpu/drm/i915/i915_gem_context.c | 23 --- 3 files changed, 25 insertions(+

[Intel-gfx] [PATCH 09/66] drm/i915: Do a fuller init after reset

2013-06-27 Thread Ben Widawsky
15: fix ILK GPU reset for render Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.c | 29 - drivers/gpu/drm/i915/i915_gem.c | 2 ++ drivers/gpu/drm/i915/intel_ringbuffer.c | 3 ++- 3 files changed, 12 insertions(+), 22 deletions(-) diff --g

[Intel-gfx] [PATCH 12/66] drm/i915: Embed PPGTT into the context

2013-06-27 Thread Ben Widawsky
k the potential to easily use contexts on GEN5 since I believe our odds of running PPGTT on GEN5 are fairly close to 0) Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gem.c | 14 -- drivers/gpu/drm/i915/i915_gem_gtt.c

[Intel-gfx] [PATCH 11/66] drm/i915: destroy i915_gem_init_global_gtt

2013-06-27 Thread Ben Widawsky
doing this, make the ppgtt init function a bit more generic Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 4 +-- drivers/gpu/drm/i915/i915_gem.c | 36 ++--- drivers/gpu/drm/i915/i915_gem_gtt.c | 63 + 3 files change

[Intel-gfx] [PATCH 13/66] drm/i915: Unify PPGTT codepaths on gen6+

2013-06-27 Thread Ben Widawsky
no PPGTT, and we disable PPGTT on gen6 with VT-D. Since Mesa depends on gen6+ having HW contexts, this is a requirement. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_dma.c | 3 ++- drivers/gpu/drm/i915/i915_gem.c | 6 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 4 +++- 3

[Intel-gfx] [PATCH 14/66] drm/i915: Move ppgtt initialization down

2013-06-27 Thread Ben Widawsky
ff-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 16a8486..f56e75b 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c

[Intel-gfx] [PATCH 15/66] drm/i915: Tie context to PPGTT

2013-06-27 Thread Ben Widawsky
on't clean PPGTT up on the failure paths, leave it to unref. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_dma.c | 2 -- drivers/gpu/drm/i915/i915_drv.h | 4 +-- drivers/gpu/drm/i915/i915_gem.c | 49 - drive

[Intel-gfx] [PATCH 07/66] drm/i915: Use drm_mm for PPGTT PDEs

2013-06-27 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem_gtt.c | 45 - 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index c

[Intel-gfx] [PATCH 16/66] drm/i915: Really share scratch page

2013-06-27 Thread Ben Widawsky
A previous patch had set up the ppgtt and ggtt to use the same scratch page, but still kept around both pointers. Kill it, it's not needed and gets in our way for upcoming cleanups. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/i915_gem_

[Intel-gfx] [PATCH 17/66] drm/i915: Combine scratch members into a struct

2013-06-27 Thread Ben Widawsky
There isn't any special reason to do this other than it makes it obvious that the two members are connected. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 6 -- drivers/gpu/drm/i915/i915_gem_gtt.c | 17 - 2 files changed, 12 insertions(+

[Intel-gfx] [PATCH 19/66] drm/i915: Use gtt shortform where possible

2013-06-27 Thread Ben Widawsky
Just for compactness. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_gtt.c | 36 +++- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 746b649..bb4ccb5

[Intel-gfx] [PATCH 20/66] drm/i915: Move fbc members out of line

2013-06-27 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_debugfs.c| 2 +- drivers/gpu/drm/i915/i915_drv.h| 48 +++-- drivers/gpu/drm/i915/i915_gem_stolen.c | 20 +++--- drivers/gpu/drm/i915/intel_display.c | 6 ++--- drivers/gpu/drm/i915

[Intel-gfx] [PATCH 18/66] drm/i915: Drop dev from pte_encode

2013-06-27 Thread Ben Widawsky
ppgtt/mm slightly (albeit, ever so) easier. Reviewed-by: Kenneth Graunke Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 6 ++ drivers/gpu/drm/i915/i915_gem_gtt.c | 21 - 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/drivers/gp

[Intel-gfx] [PATCH 21/66] drm/i915: Move gtt and ppgtt under address space umbrella

2013-06-27 Thread Ben Widawsky
. Eventually we'll ween ourselves off of using this except in cases where we obviously want the GGTT (like display). Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_debugfs.c | 4 +- drivers/gpu/drm/i915/i915_drv.h | 48 ++-- drivers/gpu/drm/i915/i915_gem.c

[Intel-gfx] [PATCH 22/66] drm/i915: Move gtt_mtrr to i915_gtt

2013-06-27 Thread Ben Widawsky
for file in `ls drivers/gpu/drm/i915/*.c` ; do sed -i "s/mm.gtt_mtrr/gtt.mtrr/" $file; done Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_dma.c | 8 drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/d

[Intel-gfx] [PATCH 24/66] drm/i915: Move aliasing_ppgtt

2013-06-27 Thread Ben Widawsky
for file in `ls drivers/gpu/drm/i915/*.c` ; do sed -i "s/mm.aliasing/gtt.aliasing/" $file; done Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_debugfs.c| 4 ++-- drivers/gpu/drm/i915/i915_dma.c| 2 +- drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [PATCH 23/66] drm/i915: Move stolen stuff to i915_gtt

2013-06-27 Thread Ben Widawsky
It doesn't apply to generic VMA, so it belongs with the gtt. for file in `ls drivers/gpu/drm/i915/*.c` ; do sed -i "s/mm.stolen_base/gtt.stolen_base/" $file; done for file in `ls drivers/gpu/drm/i915/*.c` ; do sed -i "s/mm.stolen/gtt.stolen/" $file;

[Intel-gfx] [PATCH 27/66] drm/i915: Create a global list of vms

2013-06-27 Thread Ben Widawsky
st is accurate because we already have a member in place to access our global GTT. By porting that to use our list (which assumes the GGTT is always the first entry) we can verify a decent amount of the code is working correct. NOTE: to do this, we must initialize the list quite early. Signed-off-by

[Intel-gfx] [PATCH 25/66] drm/i915: Put the mm in the parent address space

2013-06-27 Thread Ben Widawsky
;d hope one day this becomes almost irrelvant. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_dma.c| 4 ++-- drivers/gpu/drm/i915/i915_drv.h| 3 +-- drivers/gpu/drm/i915/i915_gem.c| 4 ++-- drivers/gpu/drm/i915/i915_gem_evict.c | 10 +- drivers/gpu/drm

[Intel-gfx] [PATCH 29/66] drm: pre allocate node for create_block

2013-06-27 Thread Ben Widawsky
_create_block(), both related to stolen memory. As a side note, this patch has is able to leverage all the existing drm_mm_put_block because the node is still kzalloc'd. When the aforementioned VMA code comes into play, that too has to change. Signed-off-by: Ben Widawsky --- driver

[Intel-gfx] [PATCH 26/66] drm/i915: Move active/inactive lists to new mm

2013-06-27 Thread Ben Widawsky
lso opted to move the comments out of line a bit so one can get a better picture of what the various lists do. v2: Leave the bound list as a global one. (Chris, indirectly) CC: Chris Wilson Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_debugfs.c| 11 driver

[Intel-gfx] [PATCH 28/66] drm/i915: Remove object's gtt_offset

2013-06-27 Thread Ben Widawsky
gtt_offset has always been == gtt_space->start. This makes an upcoming change much easier to swallow. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_debugfs.c| 9 +++--- drivers/gpu/drm/i915/i915_drv.h| 7 drivers/gpu/drm/i915/i915_gem.c|

[Intel-gfx] [PATCH 31/66] drm/i915: Create VMAs (part 1)

2013-06-27 Thread Ben Widawsky
v2: s/i915_obj/i915_gem_obj (Chris) v3: Only move an object to the now global unbound list if there are no more VMAs for the object which are bound into a VM (ie. the list is empty). Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h| 30 ++- drivers/gpu/

[Intel-gfx] [PATCH 30/66] drm/i915: Getter/setter for object attributes

2013-06-27 Thread Ben Widawsky
This will be handy when we add VMs. It's not strictly, necessary, but it will make the code much cleaner. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_debugfs.c| 26 +-- drivers/gpu/drm/i915/i915_drv.h| 21 + drivers/gpu/drm/i915/i915_

[Intel-gfx] [PATCH 32/66] drm/i915: Create VMAs (part 2) - kill gtt space

2013-06-27 Thread Ben Widawsky
Remove the obj->gtt_space. See if it still works. This validates that what we did in part 1 was correct. BISECT WARNING: This patch was not meant for bisect. If it does end up upstream, it should be included in the 3 part series for creating the VMA. Signed-off-by: Ben Widawsky --- drivers/

[Intel-gfx] [PATCH 34/66] drm/i915: Create VMAs (part 3.5) - map and fenceable tracking

2013-06-27 Thread Ben Widawsky
other address space should ever modify these flags. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 8fe5f4e..83e2eb3 100644 --- a/dr

[Intel-gfx] [PATCH 35/66] drm/i915: Create VMAs (part 4) - Error capture

2013-06-27 Thread Ben Widawsky
real world system grows significantly we'll have to focus on only capturing the guilty VM, or else it's likely there won't be enough space for error capture. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_debugfs.c | 8 +-- drivers/gpu/drm/i915/i915_drv.h | 4

[Intel-gfx] [PATCH 36/66] drm/i915: Create VMAs (part 5) - move mm_list

2013-06-27 Thread Ben Widawsky
hange much easier to understand. v2: only bump GGTT LRU in i915_gem_object_set_to_gtt_domain (Chris) Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_debugfs.c| 49 ++ drivers/gpu/drm/i915/i915_drv.h| 5 ++-- drivers/gpu/drm/i915/i915_gem.c

[Intel-gfx] [PATCH 37/66] drm/i915: Create VMAs (part 6) - finish error plumbing

2013-06-27 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_irq.c | 53 - 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 28880bf..e1653fd 100644 --- a/drivers/gpu/drm

[Intel-gfx] [PATCH 38/66] drm/i915: create an object_is_active()

2013-06-27 Thread Ben Widawsky
This is simply obj->active for now, but will serve a purpose when we track activity per vma. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h| 1 + drivers/gpu/drm/i915/i915_gem.c| 18 -- drivers/gpu/drm/i915/i915_gem_context.c|

[Intel-gfx] [PATCH 39/66] drm/i915: Move active to vma

2013-06-27 Thread Ben Widawsky
Probably need to squash whole thing, or just the inactive part, tbd... Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 14 ++-- drivers/gpu/drm/i915/i915_gem.c | 47 - 2 files changed, 35 insertions(+), 26 deletions(-) diff

[Intel-gfx] [PATCH 40/66] drm/i915: Track all VMAs per VM

2013-06-27 Thread Ben Widawsky
This allows us to be aware of all the VMAs leftover and teardown, and is useful for debug. I suspect it will prove even more useful later. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gem.c | 4 2 files changed, 6 insertions(+) diff

[Intel-gfx] [PATCH 41/66] drm/i915: Defer request freeing

2013-06-27 Thread Ben Widawsky
s the request free lastly. Without this change, we cannot guarantee to we don't still have active objects in the VM. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c

[Intel-gfx] [PATCH 42/66] drm/i915: Clean up VMAs before freeing

2013-06-27 Thread Ben Widawsky
ned-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem.c | 28 drivers/gpu/drm/i915/i915_gem_context.c | 1 + 3 files changed, 30 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gp

[Intel-gfx] [PATCH 43/66] drm/i915: Replace has_bsd/blt with a mask

2013-06-27 Thread Ben Widawsky
v2: Big conflict resolution on Damien's DEV_INFO_FOR_EACH stuff v3: Resolved vebox addition Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.c | 28 ++-- drivers/gpu/drm/i915/i915_drv.h | 11 --- 2 files changed, 26 insertions(+), 13 dele

[Intel-gfx] [PATCH 44/66] drm/i915: Catch missed context unref earlier

2013-06-27 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 4 ++-- drivers/gpu/drm/i915/i915_gem_context.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index f17d825..bead414 100644 --- a

[Intel-gfx] [PATCH 46/66] drm/i915: Permit contexts on all rings

2013-06-27 Thread Ben Widawsky
If we want to use contexts in more abstract terms (specifically with PPGTT in mind), we need to allow them to be specified for any ring. NOTE: This commit requires an update to intel-gpu-tools to make it not fail. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_context.c| 56

[Intel-gfx] [PATCH 45/66] drm/i915: Add a context open function

2013-06-27 Thread Ben Widawsky
We'll be doing a bit more stuff with each file, so having our own open function should make things clean. This also allows us to easily add conditionals for stuff we don't want to do when we don't have HW contexts. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_dma

[Intel-gfx] [PATCH 48/66] drm/i915: Better reset handling for contexts

2013-06-27 Thread Ben Widawsky
it was in (mid context write, for example), later restoring the context is a bad idea. By setting the flag to not initialized, the next load of that context will not restore the state, and thus on the subsequent switch away from the context will overwrite the old data. Signed-off-by: Be

[Intel-gfx] [PATCH 47/66] drm/i915: Fix context fini refcounts

2013-06-27 Thread Ben Widawsky
With multiple rings having a last context, we must now unreference these contexts. This could be squashed if desired since it leaves the last patch broken. However, because it was a bit tricky to catch, I've left it separated for primarily review purposed Signed-off-by: Ben Wid

[Intel-gfx] [PATCH 51/66] drm/i915: Track which ring a context ran on

2013-06-27 Thread Ben Widawsky
an example, if we have: RCS BCS ctxA ctx A ctx B ctxB Without tracking the last ring B ran on, we wouldn't know to switch the address space on BCS in the last row. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 1 + dr

[Intel-gfx] [PATCH 49/66] drm/i915: Create a per file_priv default context

2013-06-27 Thread Ben Widawsky
bject, try calling the shrinker once to see if it's not possible to carry on. v2: Updated to address Mika's recent context guilty changes Some more changes around this come up in later patches as well. Signed-off-by: Ben Widawsky Conflicts: drivers/gpu/drm/i915/i915_gem_context

[Intel-gfx] [PATCH 53/66] drm/i915: PPGTT should take a ppgtt argument

2013-06-27 Thread Ben Widawsky
At one time I was planning to call enable for all PPGTTs. I dropped this, however I kept around this change because it looks better to me. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem.c | 4 +++- drivers/gpu/drm/i915

[Intel-gfx] [PATCH 52/66] drm/i915: dump error state based on capture

2013-06-27 Thread Ben Widawsky
s are stable. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_debugfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 60d2a94..15f29de 100644 --- a/drivers/gpu/drm/i915/i915_debu

[Intel-gfx] [PATCH 58/66] drm/i915: Get context early in execbuf

2013-06-27 Thread Ben Widawsky
need to use ctx_id in certain places. This will be addressed in a subsequent patch. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h| 2 ++ drivers/gpu/drm/i915/i915_gem_context.c| 4 +--- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 24 3

[Intel-gfx] [PATCH 56/66] drm/i915: Write PDEs at init instead of enable

2013-06-27 Thread Ben Widawsky
We won't be calling enable() for all PPGTTs. We do need to write PDEs for all PPGTTs however. By moving the writing to init (which is called for all PPGTTs) we should accomplish this. TODO: Eventually, we should allocate the page tables on demand. Signed-off-by: Ben Widawsky --- driver

[Intel-gfx] [PATCH 55/66] drm/i915: Extract mm switching to function

2013-06-27 Thread Ben Widawsky
In order to do the full context switch with address space, it's convenient to have a way to switch the address space. We already have this in our code - just pull it out to be called by the context switch code later. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [PATCH 54/66] drm/i915: USE LRI for switching PP_DIR_BASE

2013-06-27 Thread Ben Widawsky
The docs seem to suggest this is the appropriate method (though it doesn't say so outright). We certainly must do this for switching VMs on the fly, since synchronizing the rings to MMIO updates isn't acceptable. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem_

[Intel-gfx] [PATCH 57/66] drm/i915: Disallow pin with full ppgtt

2013-06-27 Thread Ben Widawsky
Pin doesn't fit with PPGTT since the interface doesn't allow for the context for which we want to pin. Full PPGTT will bring a new "soft pin" interface. The semantics of which will probably take some time to iron out. Signed-off-by: Ben Widawsky --- drivers/gpu/drm

[Intel-gfx] [PATCH 60/66] drm/i915: Actually add the new address spaces

2013-06-27 Thread Ben Widawsky
asted, whatever). Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gem.c | 17 - drivers/gpu/drm/i915/i915_gem_gtt.c | 9 +++-- drivers/gpu/drm/i915/i915_irq.c | 3 --- drivers/gpu/drm/i915/i915_trace.h

[Intel-gfx] [PATCH 61/66] drm/i915: Use multiple VMs

2013-06-27 Thread Ben Widawsky
This requires doing an actual switch of the page tables during the context switch/execbuf. Along the way, cut away as much "aliasing" ppgtt as possible Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_gem.c| 22 +- drivers/gp

[Intel-gfx] [PATCH 59/66] drm/i915: Pass ctx directly to switch/hangstat

2013-06-27 Thread Ben Widawsky
We have all the info earlier now, so we may as well avoid the excess lookup. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h| 5 ++--- drivers/gpu/drm/i915/i915_gem.c| 2 +- drivers/gpu/drm/i915/i915_gem_context.c| 21 ++--- drivers

[Intel-gfx] [PATCH 63/66] drm/i915: Add PPGTT dumper

2013-06-27 Thread Ben Widawsky
Dump the aliasing PPGTT with it. The aliasing PPGTT should actually always be empty. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_debugfs.c | 3 +- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem_gtt.c | 60 + 3 files

[Intel-gfx] [PATCH 62/66] drm/i915: Kill now unused ppgtt_{un, }bind

2013-06-27 Thread Ben Widawsky
vm->insert_entries was good enough. We can bring this function back later if needed. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_drv.h | 5 - drivers/gpu/drm/i915/i915_gem_gtt.c | 22 -- 2 files changed, 27 deletions(-) diff --git a/drivers/gpu/

[Intel-gfx] [PATCH 64/66] drm/i915: Dump all ppgtt

2013-06-27 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_debugfs.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 2dfa784..20d6265 100644 --- a/drivers/gpu/drm

[Intel-gfx] [PATCH 65/66] drm/i915: Add debugfs for vma info per vm

2013-06-27 Thread Ben Widawsky
Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_debugfs.c | 81 + 1 file changed, 81 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 20d6265..6bbb602 100644 --- a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH 66/66] drm/i915: Getparam full ppgtt

2013-06-27 Thread Ben Widawsky
As of now (and this may change) we can't have aliasing PPGTT anymore (it just won't happen). We do still have the aliasing ppgtt internally though so we can use that to tell userspace if we have full PPGTT. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_dma.c | 7 +-

[Intel-gfx] [PATCH 50/66] drm/i915: Remove ring specificity from contexts

2013-06-27 Thread Ben Widawsky
When originally implementing HW contexts it was not clear if we'd strongly associate a context with a ring. Now it is clear, a context will not belong to a ring. We've removed all remnants of it's usage. So drop it completely now. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/

Re: [Intel-gfx] [PATCH 61/66] drm/i915: Use multiple VMs

2013-06-27 Thread Ben Widawsky
On Thu, Jun 27, 2013 at 04:31:02PM -0700, Ben Widawsky wrote: > This requires doing an actual switch of the page tables during the > context switch/execbuf. > > Along the way, cut away as much "aliasing" ppgtt as possible > > Signed-off-by: Ben Widawsky > --- >

Re: [Intel-gfx] [PATCH 17/24] drm/i915: kill dev_priv->rps.lock

2013-06-27 Thread Ben Widawsky
I915_WRITE_IMR(ring, ~0); > I915_WRITE(GEN6_PMIMR, pm_imr | ring->irq_enable_mask); > POSTING_READ(GEN6_PMIMR); > } > - spin_unlock_irqrestore(&dev_priv->rps.lock, flags); > + spin_unlock_irqrestore(&dev_priv->irq_lock, flags);

Re: [Intel-gfx] [PATCH 17/24] drm/i915: kill dev_priv->rps.lock

2013-06-27 Thread Ben Widawsky
fer irq refcounts without causing a massive confusion, but > that's for the next patch. > > Signed-off-by: Daniel Vetter Patches 14-17 are: Reviewed-by: Ben Widawsky > --- > drivers/gpu/drm/i915/i915_dma.c | 1 - > drivers/gpu/drm/i915/i915_drv.h | 8 +++

Re: [Intel-gfx] [PATCH 00/66] [v1] Full PPGTT minus soft pin

2013-06-27 Thread Ben Widawsky
Forgot the repo: http://cgit.freedesktop.org/~bwidawsk/drm-intel/log/?h=ppgtt On Thu, Jun 27, 2013 at 04:30:01PM -0700, Ben Widawsky wrote: > First, I don't think this whole series is ready for merge yet. It is > however ready for a review, and I think a lot of the prep patches in t

Re: [Intel-gfx] [PATCH 20/24] drm/i915: kill bogus GTIIR clearing in vlv_preinstall hook

2013-06-28 Thread Ben Widawsky
ould guess. We only seem to do one in postinstall. If this change was intentional, I think we should get Jesse to explain the origin of the original double clear. -- Ben Widawsky, Intel Open Source Technology Center ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH 18/24] drm/i915: unify ring irq refcounts (again)

2013-06-28 Thread Ben Widawsky
ity, and I think we'd want separate enable_masks for pm/gt to make it worthwhile to use separate refcounts. Anyway, can you add a comment in the code about what irq_refcount does. with that, it's Reviewed-by: Ben Widawsky > > Signed-off-by: Daniel Vetter > --- > driver

Re: [Intel-gfx] [PATCH 19/24] drm/i915: don't enable PM_VEBOX_CS_ERROR_INTERRUPT

2013-06-28 Thread Ben Widawsky
On Wed, Jun 12, 2013 at 08:32:44PM +0200, Daniel Vetter wrote: > On Wed, Jun 12, 2013 at 8:19 PM, Ben Widawsky wrote: > > On Wed, Jun 12, 2013 at 07:18:38PM +0200, Daniel Vetter wrote: > >> On Wed, Jun 12, 2013 at 10:13:41AM -0700, Ben Widawsky wrote: > >> > On W

Re: [Intel-gfx] [PATCH 21/24] drm/i915: unify PM interrupt preinstall sequence

2013-06-28 Thread Ben Widawsky
; I915_WRITE(RING_IMR(BLT_RING_BASE), 0); > > - /* and GT */ > - I915_WRITE(GTIMR, 0x); > - I915_WRITE(GTIER, 0x0); > - POSTING_READ(GTIER); > + gen5_gt_irq_preinstall(dev); > > I915_WRITE(DPINVGTT, 0xff); > > -- > 1.8.1.4 > > __

[Intel-gfx] [PATCH 0/6] Page faults to help user space debug

2013-06-28 Thread Ben Widawsky
age faults are. The one time I tried to turn it on previously, I remember getting a hard hang, but my memory if very fuzzy. Putt this out there for review, and hopefully for Paul to test as soon as he has something read. Ben Widawsky (6): drm/i915: Faults for scratch PTEs drm/i915: Debugfs fo

[Intel-gfx] [PATCH 1/6] drm/i915: Faults for scratch PTEs

2013-06-28 Thread Ben Widawsky
Using a new "debug_flags" we'll be able to configure some options which make it easier for user space to quickly identify when there is a bug in their code. There is no way to yet turn it on. Signed-off-by: Ben Widawsky --- drivers/gpu/drm/i915/i915_debugfs.c | 1 + drive

<    1   2   3   4   5   6   7   8   9   10   >