Re: [Intel-gfx] [PATCH 2/2] drm/i915: Print captured bo for all VM in error state

2014-04-29 Thread Chris Wilson
On Tue, Apr 29, 2014 at 10:33:00AM +0200, Daniel Vetter wrote:
> On Tue, Apr 29, 2014 at 3:10 AM, Ben Widawsky  wrote:
> > On Sat, Jan 25, 2014 at 08:10:06PM +0100, Daniel Vetter wrote:
> >> On Fri, Jan 24, 2014 at 12:13:44PM -0800, Ben Widawsky wrote:
> >> > ping
> >>
> >> Merged the first patch to topic/ppgtt, but punted on the 2nd - I think
> >> with Mika's improvement to the guilty batch detection we should be able to
> >> fix this better. Or what's the consensus here?
> >>
> >> Aside: I didn't spot your r-b burried way at the bottom of your mail,
> >> hence why I didn't apply them.
> >> -Daniel
> >>
> >
> > What happened to this patch or its equivalent?
> 
> I still think with the guilty detection we could just dump the
> "interesting" ppgtt instead of all of them. Maybe poke Mika?

Urm. Most of the time I contemplate patches to add all bound GTT objects
as well i.e. there is a paucity of information here. (And currently
*none* of value upstream. None.)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 2/2] drm/i915: Print captured bo for all VM in error state

2014-04-29 Thread Daniel Vetter
On Tue, Apr 29, 2014 at 3:10 AM, Ben Widawsky  wrote:
> On Sat, Jan 25, 2014 at 08:10:06PM +0100, Daniel Vetter wrote:
>> On Fri, Jan 24, 2014 at 12:13:44PM -0800, Ben Widawsky wrote:
>> > ping
>>
>> Merged the first patch to topic/ppgtt, but punted on the 2nd - I think
>> with Mika's improvement to the guilty batch detection we should be able to
>> fix this better. Or what's the consensus here?
>>
>> Aside: I didn't spot your r-b burried way at the bottom of your mail,
>> hence why I didn't apply them.
>> -Daniel
>>
>
> What happened to this patch or its equivalent?

I still think with the guilty detection we could just dump the
"interesting" ppgtt instead of all of them. Maybe poke Mika?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 2/2] drm/i915: Print captured bo for all VM in error state

2014-04-28 Thread Ben Widawsky
On Sat, Jan 25, 2014 at 08:10:06PM +0100, Daniel Vetter wrote:
> On Fri, Jan 24, 2014 at 12:13:44PM -0800, Ben Widawsky wrote:
> > ping
> 
> Merged the first patch to topic/ppgtt, but punted on the 2nd - I think
> with Mika's improvement to the guilty batch detection we should be able to
> fix this better. Or what's the consensus here?
> 
> Aside: I didn't spot your r-b burried way at the bottom of your mail,
> hence why I didn't apply them.
> -Daniel
> 

What happened to this patch or its equivalent?

> > 
> > On Fri, Jan 10, 2014 at 08:08:26PM +, Chris Wilson wrote:
> > > On Fri, Jan 10, 2014 at 11:59:10AM -0800, Ben Widawsky wrote:
> > > > I will gladly re-review if you make any of my suggested changes.
> > > 
> > > Hmm, I had already done the capture_vma one since that is required to
> > > display the right addresses in the error state.
> > > 
> > > The output is like:
> > > 
> > > vm[0]
> > >   Active [0]:
> > >   Pinned [10]:
> > > 0020 8192 10 00 0 0 P dirty L3+LLC
> > > 00202000 4096 01 01 0 0 P snooped or LLC
> > > 00203000   131072 40 40 0 0 P dirty snooped or LLC
> > > 00223000 4096 01 01 0 0 P snooped or LLC
> > > 00224000 4096 01 01 0 0 P snooped or LLC
> > > 00225000   131072 40 40 0 0 P dirty snooped or LLC
> > > 00245000 4096 01 01 0 0 P snooped or LLC
> > > 00246000   131072 40 40 0 0 P dirty snooped or LLC
> > > 00266000  8294400 41 00 0 0 P uncached
> > > 083f2000 8192 41 00 0 0 P L3+LLC
> > > vm[1]
> > >   Active [0]:
> > >   Pinned [0]:
> > > vm[2]
> > >   Active [1]:
> > >  4096 3f 00 f000 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[3]
> > >   Active [1]:
> > >  4096 3f 00 f00c 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[4]
> > >   Active [1]:
> > >  4096 3f 00 f010 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[5]
> > >   Active [1]:
> > >  4096 3f 00 f016 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[6]
> > >   Active [1]:
> > >  4096 3f 00 f019 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[7]
> > >   Active [1]:
> > >  4096 3f 00 f01e 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[8]
> > >   Active [1]:
> > >  4096 3f 00 f017 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[9]
> > >   Active [1]:
> > >  4096 3f 00 f015 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[10]
> > >   Active [1]:
> > >  4096 3f 00 f02b 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[11]
> > >   Active [1]:
> > >  4096 3f 00 f039 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[12]
> > >   Active [1]:
> > >  4096 3f 00 f03c 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[13]
> > >   Active [1]:
> > >  4096 3f 00 f043 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[14]
> > >   Active [1]:
> > >  4096 3f 00 f04d 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[15]
> > >   Active [1]:
> > >  4096 3f 00 f02f 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[16]
> > >   Active [1]:
> > >  4096 3f 00 f053 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[17]
> > >   Active [1]:
> > >  4096 3f 00 f05e 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[18]
> > >   Active [1]:
> > >  4096 3f 00 f059 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[19]
> > >   Active [1]:
> > >  4096 3f 00 f03e 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[20]
> > >   Active [1]:
> > >  4096 3f 00 f067 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[21]
> > >   Active [1]:
> > >  4096 3f 00 f06a 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[22]
> > >   Active [1]:
> > >  4096 3f 00 f068 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[23]
> > >   Active [1]:
> > >  4096 3f 00 f071 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[24]
> > >   Active [1]:
> > >  4096 3f 00 f074 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[25]
> > >   Active [1]:
> > >  4096 3f 00 f077 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[26]
> > >   Active [1]:
> > >  4096 3f 00 f07d 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[27]
> > >   Active [1]:
> > >  4096 3f 00 f07f 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[28]
> > >   Active [1]:
> > >  4096 3f 00 f082 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[29]
> > >   Active [1]:
> > >  4096 3f 00 f085 0 dirty bsd snooped or LLC
> > >   Pinned [0]:
> > > vm[

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Print captured bo for all VM in error state

2014-01-25 Thread Daniel Vetter
On Fri, Jan 24, 2014 at 12:13:44PM -0800, Ben Widawsky wrote:
> ping

Merged the first patch to topic/ppgtt, but punted on the 2nd - I think
with Mika's improvement to the guilty batch detection we should be able to
fix this better. Or what's the consensus here?

Aside: I didn't spot your r-b burried way at the bottom of your mail,
hence why I didn't apply them.
-Daniel

> 
> On Fri, Jan 10, 2014 at 08:08:26PM +, Chris Wilson wrote:
> > On Fri, Jan 10, 2014 at 11:59:10AM -0800, Ben Widawsky wrote:
> > > I will gladly re-review if you make any of my suggested changes.
> > 
> > Hmm, I had already done the capture_vma one since that is required to
> > display the right addresses in the error state.
> > 
> > The output is like:
> > 
> > vm[0]
> >   Active [0]:
> >   Pinned [10]:
> > 0020 8192 10 00 0 0 P dirty L3+LLC
> > 00202000 4096 01 01 0 0 P snooped or LLC
> > 00203000   131072 40 40 0 0 P dirty snooped or LLC
> > 00223000 4096 01 01 0 0 P snooped or LLC
> > 00224000 4096 01 01 0 0 P snooped or LLC
> > 00225000   131072 40 40 0 0 P dirty snooped or LLC
> > 00245000 4096 01 01 0 0 P snooped or LLC
> > 00246000   131072 40 40 0 0 P dirty snooped or LLC
> > 00266000  8294400 41 00 0 0 P uncached
> > 083f2000 8192 41 00 0 0 P L3+LLC
> > vm[1]
> >   Active [0]:
> >   Pinned [0]:
> > vm[2]
> >   Active [1]:
> >  4096 3f 00 f000 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[3]
> >   Active [1]:
> >  4096 3f 00 f00c 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[4]
> >   Active [1]:
> >  4096 3f 00 f010 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[5]
> >   Active [1]:
> >  4096 3f 00 f016 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[6]
> >   Active [1]:
> >  4096 3f 00 f019 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[7]
> >   Active [1]:
> >  4096 3f 00 f01e 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[8]
> >   Active [1]:
> >  4096 3f 00 f017 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[9]
> >   Active [1]:
> >  4096 3f 00 f015 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[10]
> >   Active [1]:
> >  4096 3f 00 f02b 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[11]
> >   Active [1]:
> >  4096 3f 00 f039 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[12]
> >   Active [1]:
> >  4096 3f 00 f03c 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[13]
> >   Active [1]:
> >  4096 3f 00 f043 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[14]
> >   Active [1]:
> >  4096 3f 00 f04d 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[15]
> >   Active [1]:
> >  4096 3f 00 f02f 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[16]
> >   Active [1]:
> >  4096 3f 00 f053 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[17]
> >   Active [1]:
> >  4096 3f 00 f05e 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[18]
> >   Active [1]:
> >  4096 3f 00 f059 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[19]
> >   Active [1]:
> >  4096 3f 00 f03e 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[20]
> >   Active [1]:
> >  4096 3f 00 f067 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[21]
> >   Active [1]:
> >  4096 3f 00 f06a 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[22]
> >   Active [1]:
> >  4096 3f 00 f068 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[23]
> >   Active [1]:
> >  4096 3f 00 f071 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[24]
> >   Active [1]:
> >  4096 3f 00 f074 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[25]
> >   Active [1]:
> >  4096 3f 00 f077 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[26]
> >   Active [1]:
> >  4096 3f 00 f07d 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[27]
> >   Active [1]:
> >  4096 3f 00 f07f 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[28]
> >   Active [1]:
> >  4096 3f 00 f082 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[29]
> >   Active [1]:
> >  4096 3f 00 f085 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[30]
> >   Active [1]:
> >  4096 3f 00 f088 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[31]
> >   Active [1]:
> >  4096 3f 00 f05c 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[32]
> >   Active [1]:
> >  4096 3f 00 f08e 0 dirty bsd snooped or LLC
> >   Pinned [0]:
> > vm[33]
> >   Active [1]:
> >  4096 3f 00 f08c 0 di

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Print captured bo for all VM in error state

2014-01-24 Thread Ben Widawsky
ping

On Fri, Jan 10, 2014 at 08:08:26PM +, Chris Wilson wrote:
> On Fri, Jan 10, 2014 at 11:59:10AM -0800, Ben Widawsky wrote:
> > I will gladly re-review if you make any of my suggested changes.
> 
> Hmm, I had already done the capture_vma one since that is required to
> display the right addresses in the error state.
> 
> The output is like:
> 
> vm[0]
>   Active [0]:
>   Pinned [10]:
> 0020 8192 10 00 0 0 P dirty L3+LLC
> 00202000 4096 01 01 0 0 P snooped or LLC
> 00203000   131072 40 40 0 0 P dirty snooped or LLC
> 00223000 4096 01 01 0 0 P snooped or LLC
> 00224000 4096 01 01 0 0 P snooped or LLC
> 00225000   131072 40 40 0 0 P dirty snooped or LLC
> 00245000 4096 01 01 0 0 P snooped or LLC
> 00246000   131072 40 40 0 0 P dirty snooped or LLC
> 00266000  8294400 41 00 0 0 P uncached
> 083f2000 8192 41 00 0 0 P L3+LLC
> vm[1]
>   Active [0]:
>   Pinned [0]:
> vm[2]
>   Active [1]:
>  4096 3f 00 f000 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[3]
>   Active [1]:
>  4096 3f 00 f00c 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[4]
>   Active [1]:
>  4096 3f 00 f010 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[5]
>   Active [1]:
>  4096 3f 00 f016 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[6]
>   Active [1]:
>  4096 3f 00 f019 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[7]
>   Active [1]:
>  4096 3f 00 f01e 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[8]
>   Active [1]:
>  4096 3f 00 f017 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[9]
>   Active [1]:
>  4096 3f 00 f015 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[10]
>   Active [1]:
>  4096 3f 00 f02b 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[11]
>   Active [1]:
>  4096 3f 00 f039 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[12]
>   Active [1]:
>  4096 3f 00 f03c 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[13]
>   Active [1]:
>  4096 3f 00 f043 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[14]
>   Active [1]:
>  4096 3f 00 f04d 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[15]
>   Active [1]:
>  4096 3f 00 f02f 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[16]
>   Active [1]:
>  4096 3f 00 f053 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[17]
>   Active [1]:
>  4096 3f 00 f05e 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[18]
>   Active [1]:
>  4096 3f 00 f059 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[19]
>   Active [1]:
>  4096 3f 00 f03e 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[20]
>   Active [1]:
>  4096 3f 00 f067 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[21]
>   Active [1]:
>  4096 3f 00 f06a 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[22]
>   Active [1]:
>  4096 3f 00 f068 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[23]
>   Active [1]:
>  4096 3f 00 f071 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[24]
>   Active [1]:
>  4096 3f 00 f074 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[25]
>   Active [1]:
>  4096 3f 00 f077 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[26]
>   Active [1]:
>  4096 3f 00 f07d 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[27]
>   Active [1]:
>  4096 3f 00 f07f 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[28]
>   Active [1]:
>  4096 3f 00 f082 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[29]
>   Active [1]:
>  4096 3f 00 f085 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[30]
>   Active [1]:
>  4096 3f 00 f088 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[31]
>   Active [1]:
>  4096 3f 00 f05c 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[32]
>   Active [1]:
>  4096 3f 00 f08e 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[33]
>   Active [1]:
>  4096 3f 00 f08c 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[34]
>   Active [1]:
>  4096 3f 00 f065 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[35]
>   Active [1]:
>  4096 3f 00 f041 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[36]
>   Active [1]:
>  4096 3f 00 f08f 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[37]
>   Active [1]:
>  4096 3f 00 f06e 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[38]
>   Active [1]:
>  4096 3f 00 f091 0 dirty bsd snooped or LLC
>   Pinned [0]:
> vm[39]
>   Active [1]:
>  4096 3f 00 f092 0 dirty bsd snooped or LLC
>   Pinned

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Print captured bo for all VM in error state

2014-01-10 Thread Chris Wilson
On Fri, Jan 10, 2014 at 11:59:10AM -0800, Ben Widawsky wrote:
> I will gladly re-review if you make any of my suggested changes.

Hmm, I had already done the capture_vma one since that is required to
display the right addresses in the error state.

The output is like:

vm[0]
  Active [0]:
  Pinned [10]:
0020 8192 10 00 0 0 P dirty L3+LLC
00202000 4096 01 01 0 0 P snooped or LLC
00203000   131072 40 40 0 0 P dirty snooped or LLC
00223000 4096 01 01 0 0 P snooped or LLC
00224000 4096 01 01 0 0 P snooped or LLC
00225000   131072 40 40 0 0 P dirty snooped or LLC
00245000 4096 01 01 0 0 P snooped or LLC
00246000   131072 40 40 0 0 P dirty snooped or LLC
00266000  8294400 41 00 0 0 P uncached
083f2000 8192 41 00 0 0 P L3+LLC
vm[1]
  Active [0]:
  Pinned [0]:
vm[2]
  Active [1]:
 4096 3f 00 f000 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[3]
  Active [1]:
 4096 3f 00 f00c 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[4]
  Active [1]:
 4096 3f 00 f010 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[5]
  Active [1]:
 4096 3f 00 f016 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[6]
  Active [1]:
 4096 3f 00 f019 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[7]
  Active [1]:
 4096 3f 00 f01e 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[8]
  Active [1]:
 4096 3f 00 f017 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[9]
  Active [1]:
 4096 3f 00 f015 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[10]
  Active [1]:
 4096 3f 00 f02b 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[11]
  Active [1]:
 4096 3f 00 f039 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[12]
  Active [1]:
 4096 3f 00 f03c 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[13]
  Active [1]:
 4096 3f 00 f043 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[14]
  Active [1]:
 4096 3f 00 f04d 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[15]
  Active [1]:
 4096 3f 00 f02f 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[16]
  Active [1]:
 4096 3f 00 f053 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[17]
  Active [1]:
 4096 3f 00 f05e 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[18]
  Active [1]:
 4096 3f 00 f059 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[19]
  Active [1]:
 4096 3f 00 f03e 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[20]
  Active [1]:
 4096 3f 00 f067 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[21]
  Active [1]:
 4096 3f 00 f06a 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[22]
  Active [1]:
 4096 3f 00 f068 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[23]
  Active [1]:
 4096 3f 00 f071 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[24]
  Active [1]:
 4096 3f 00 f074 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[25]
  Active [1]:
 4096 3f 00 f077 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[26]
  Active [1]:
 4096 3f 00 f07d 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[27]
  Active [1]:
 4096 3f 00 f07f 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[28]
  Active [1]:
 4096 3f 00 f082 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[29]
  Active [1]:
 4096 3f 00 f085 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[30]
  Active [1]:
 4096 3f 00 f088 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[31]
  Active [1]:
 4096 3f 00 f05c 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[32]
  Active [1]:
 4096 3f 00 f08e 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[33]
  Active [1]:
 4096 3f 00 f08c 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[34]
  Active [1]:
 4096 3f 00 f065 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[35]
  Active [1]:
 4096 3f 00 f041 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[36]
  Active [1]:
 4096 3f 00 f08f 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[37]
  Active [1]:
 4096 3f 00 f06e 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[38]
  Active [1]:
 4096 3f 00 f091 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[39]
  Active [1]:
 4096 3f 00 f092 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[40]
  Active [1]:
 4096 3f 00 f09b 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[41]
  Active [1]:
 4096 3f 00 f09f 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[42]
  Active [1]:
 4096 3f 00 f0a1 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[43]
  Active [1]:
 4096 3f 00 f0a4 0 dirty bsd snooped or LLC
  Pinned [0]:
vm[44]
  Active [1

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Print captured bo for all VM in error state

2014-01-10 Thread Ben Widawsky
On Thu, Jan 09, 2014 at 10:57:23PM +, Chris Wilson wrote:
> The current error state harks back to the era of just a single VM. For
> full-ppgtt, we capture every bo on every VM. It behoves us to then print
> every bo for every VM, which we currently fail to do and so miss vital
> information in the error state.
> 
> Signed-off-by: Chris Wilson 

I'm somewhat disappointed with myself since I know I had a lot of this
at one point in time. Thanks for finding/fixing it.

> ---
>  drivers/gpu/drm/i915/i915_drv.h   |  4 +++
>  drivers/gpu/drm/i915/i915_gpu_error.c | 66 
> ++-
>  2 files changed, 54 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 8f0ef8645ea9..673aaee527eb 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -331,6 +331,7 @@ struct drm_i915_error_state {
>   u32 faddr[I915_NUM_RINGS];
>   u64 fence[I915_MAX_NUM_FENCES];
>   struct timeval time;
> +
>   struct drm_i915_error_ring {
>   struct drm_i915_error_object {
>   int page_count;
> @@ -344,6 +345,7 @@ struct drm_i915_error_state {
>   } *requests;
>   int num_requests;
>   } ring[I915_NUM_RINGS];
> +

Not sure if Daniel cares about the whitespace insertions. I do not.

>   struct drm_i915_error_buffer {
>   u32 size;
>   u32 name;
> @@ -361,6 +363,8 @@ struct drm_i915_error_state {
>   u32 cache_level:3;
>   } **active_bo, **pinned_bo;
>   u32 *active_bo_count, *pinned_bo_count;
> + u32 vm_count;
> +

One patch which I never submitted held vm_count in dev_priv. I found it
useful at one time, but I apparently forgot about it.

>   struct intel_overlay_error_state *overlay;
>   struct intel_display_error_state *display;
>   int hangcheck_score[I915_NUM_RINGS];
> diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c 
> b/drivers/gpu/drm/i915/i915_gpu_error.c
> index cce9f559e3d7..b7ead8ce6628 100644
> --- a/drivers/gpu/drm/i915/i915_gpu_error.c
> +++ b/drivers/gpu/drm/i915/i915_gpu_error.c
> @@ -188,10 +188,10 @@ static void print_error_buffers(struct 
> drm_i915_error_state_buf *m,
>   struct drm_i915_error_buffer *err,
>   int count)
>  {
> - err_printf(m, "%s [%d]:\n", name, count);
> + err_printf(m, "  %s [%d]:\n", name, count);
>  
>   while (count--) {
> - err_printf(m, "  %08x %8u %02x %02x %x %x",
> + err_printf(m, "%08x %8u %02x %02x %x %x",
>  err->gtt_offset,
>  err->size,
>  err->read_domains,
> @@ -332,15 +332,17 @@ int i915_error_state_to_str(struct 
> drm_i915_error_state_buf *m,
>   for_each_ring(ring, dev_priv, i)
>   i915_ring_error_state(m, dev, error, i);
>  
> - if (error->active_bo)
> + for (i = 0; i < error->vm_count; i++) {
> + err_printf(m, "vm[%d]\n", i);
> +
>   print_error_buffers(m, "Active",
> - error->active_bo[0],
> - error->active_bo_count[0]);
> + error->active_bo[i],
> + error->active_bo_count[i]);
>  
> - if (error->pinned_bo)
>   print_error_buffers(m, "Pinned",
> - error->pinned_bo[0],
> - error->pinned_bo_count[0]);
> + error->pinned_bo[i],
> + error->pinned_bo_count[i]);
> + }
>  
>   for (i = 0; i < ARRAY_SIZE(error->ring); i++) {
>   struct drm_i915_error_object *obj;
> @@ -606,13 +608,23 @@ static u32 capture_active_bo(struct 
> drm_i915_error_buffer *err,
>  }
>  
>  static u32 capture_pinned_bo(struct drm_i915_error_buffer *err,
> -  int count, struct list_head *head)
> +  int count, struct list_head *head,
> +  struct i915_address_space *vm)
>  {
>   struct drm_i915_gem_object *obj;
>   int i = 0;
>  
>   list_for_each_entry(obj, head, global_list) {
> - if (!i915_gem_obj_is_pinned(obj))
> + struct i915_vma *vma;
> + bool bound = false;
> +
> + list_for_each_entry(vma, &obj->vma_list, vma_link)
> + if (vma->vm == vm && vma->pin_count > 0) {
> + bound = true;
> + break;
> + }
> +
> + if (!bound)
>   continue;
>  
>   capture_bo(err++, obj);
> @@ -876,9 +888,14 @@ static void i915_gem_capture_vm(struct drm_i915_private 
> *dev_priv,
>   list_for_each_entry(vma, &vm->active_list, mm_list)
>   i++;
>   error->active_bo_count[ndx] = i

[Intel-gfx] [PATCH 2/2] drm/i915: Print captured bo for all VM in error state

2014-01-09 Thread Chris Wilson
The current error state harks back to the era of just a single VM. For
full-ppgtt, we capture every bo on every VM. It behoves us to then print
every bo for every VM, which we currently fail to do and so miss vital
information in the error state.

Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/i915/i915_drv.h   |  4 +++
 drivers/gpu/drm/i915/i915_gpu_error.c | 66 ++-
 2 files changed, 54 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 8f0ef8645ea9..673aaee527eb 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -331,6 +331,7 @@ struct drm_i915_error_state {
u32 faddr[I915_NUM_RINGS];
u64 fence[I915_MAX_NUM_FENCES];
struct timeval time;
+
struct drm_i915_error_ring {
struct drm_i915_error_object {
int page_count;
@@ -344,6 +345,7 @@ struct drm_i915_error_state {
} *requests;
int num_requests;
} ring[I915_NUM_RINGS];
+
struct drm_i915_error_buffer {
u32 size;
u32 name;
@@ -361,6 +363,8 @@ struct drm_i915_error_state {
u32 cache_level:3;
} **active_bo, **pinned_bo;
u32 *active_bo_count, *pinned_bo_count;
+   u32 vm_count;
+
struct intel_overlay_error_state *overlay;
struct intel_display_error_state *display;
int hangcheck_score[I915_NUM_RINGS];
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c 
b/drivers/gpu/drm/i915/i915_gpu_error.c
index cce9f559e3d7..b7ead8ce6628 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -188,10 +188,10 @@ static void print_error_buffers(struct 
drm_i915_error_state_buf *m,
struct drm_i915_error_buffer *err,
int count)
 {
-   err_printf(m, "%s [%d]:\n", name, count);
+   err_printf(m, "  %s [%d]:\n", name, count);
 
while (count--) {
-   err_printf(m, "  %08x %8u %02x %02x %x %x",
+   err_printf(m, "%08x %8u %02x %02x %x %x",
   err->gtt_offset,
   err->size,
   err->read_domains,
@@ -332,15 +332,17 @@ int i915_error_state_to_str(struct 
drm_i915_error_state_buf *m,
for_each_ring(ring, dev_priv, i)
i915_ring_error_state(m, dev, error, i);
 
-   if (error->active_bo)
+   for (i = 0; i < error->vm_count; i++) {
+   err_printf(m, "vm[%d]\n", i);
+
print_error_buffers(m, "Active",
-   error->active_bo[0],
-   error->active_bo_count[0]);
+   error->active_bo[i],
+   error->active_bo_count[i]);
 
-   if (error->pinned_bo)
print_error_buffers(m, "Pinned",
-   error->pinned_bo[0],
-   error->pinned_bo_count[0]);
+   error->pinned_bo[i],
+   error->pinned_bo_count[i]);
+   }
 
for (i = 0; i < ARRAY_SIZE(error->ring); i++) {
struct drm_i915_error_object *obj;
@@ -606,13 +608,23 @@ static u32 capture_active_bo(struct drm_i915_error_buffer 
*err,
 }
 
 static u32 capture_pinned_bo(struct drm_i915_error_buffer *err,
-int count, struct list_head *head)
+int count, struct list_head *head,
+struct i915_address_space *vm)
 {
struct drm_i915_gem_object *obj;
int i = 0;
 
list_for_each_entry(obj, head, global_list) {
-   if (!i915_gem_obj_is_pinned(obj))
+   struct i915_vma *vma;
+   bool bound = false;
+
+   list_for_each_entry(vma, &obj->vma_list, vma_link)
+   if (vma->vm == vm && vma->pin_count > 0) {
+   bound = true;
+   break;
+   }
+
+   if (!bound)
continue;
 
capture_bo(err++, obj);
@@ -876,9 +888,14 @@ static void i915_gem_capture_vm(struct drm_i915_private 
*dev_priv,
list_for_each_entry(vma, &vm->active_list, mm_list)
i++;
error->active_bo_count[ndx] = i;
-   list_for_each_entry(obj, &dev_priv->mm.bound_list, global_list)
-   if (i915_gem_obj_is_pinned(obj))
-   i++;
+
+   list_for_each_entry(obj, &dev_priv->mm.bound_list, global_list) {
+   list_for_each_entry(vma, &obj->vma_list, vma_link)
+   if (vma->vm == vm && vma->pin_count > 0) {
+   i++;
+   break;
+   }
+   }
er