[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Skip an engine reset if it recovered before our preparations (rev2)

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915: Skip an engine reset if it recovered before our preparations 
(rev2)
URL   : https://patchwork.freedesktop.org/series/35453/
State : failure

== Summary ==

Warning: bzip CI_DRM_3525/shard-glkb6/results10.json.bz2 wasn't in correct JSON 
format
Test gem_eio:
Subgroup in-flight:
dmesg-warn -> PASS   (shard-snb) fdo#104058
Subgroup in-flight-suspend:
pass   -> FAIL   (shard-hsw)
Test gem_softpin:
Subgroup noreloc-s3:
pass   -> SKIP   (shard-snb) fdo#102365
pass   -> FAIL   (shard-hsw) fdo#103540
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass   -> SKIP   (shard-hsw) fdo#103375
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
pass   -> FAIL   (shard-snb) fdo#101623
Test kms_setmode:
Subgroup basic:
fail   -> PASS   (shard-hsw) fdo#99912
Test perf:
Subgroup oa-formats:
pass   -> FAIL   (shard-hsw) fdo#104151

fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#104151 https://bugs.freedesktop.org/show_bug.cgi?id=104151

shard-hswtotal:2712 pass:1534 dwarn:1   dfail:0   fail:12  skip:1165 
time:9336s
shard-snbtotal:2712 pass:1307 dwarn:1   dfail:0   fail:12  skip:1392 
time:7931s
Blacklisted hosts:
shard-apltotal:2690 pass:1661 dwarn:1   dfail:0   fail:26  skip:1001 
time:13431s
shard-kbltotal:2712 pass:1806 dwarn:1   dfail:1   fail:26  skip:878 
time:11049s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7517/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Restore the kernel context after a GPU reset on an idle engine

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915: Restore the kernel context after a GPU reset on an idle engine
URL   : https://patchwork.freedesktop.org/series/35454/
State : failure

== Summary ==

Warning: bzip CI_DRM_3525/shard-glkb6/results10.json.bz2 wasn't in correct JSON 
format
Test kms_cursor_legacy:
Subgroup flip-vs-cursor-atomic:
pass   -> DMESG-WARN (shard-hsw) fdo#102670
Test kms_setmode:
Subgroup basic:
fail   -> PASS   (shard-hsw) fdo#99912
Test kms_flip:
Subgroup vblank-vs-dpms-suspend-interruptible:
pass   -> SKIP   (shard-snb) fdo#102365
Subgroup blt-wf_vblank-vs-modeset-interruptible:
pass   -> INCOMPLETE (shard-hsw)
Test gem_eio:
Subgroup in-flight:
dmesg-warn -> PASS   (shard-snb) fdo#104058
Test drv_selftest:
Subgroup live_hangcheck:
pass   -> INCOMPLETE (shard-snb) fdo#103880

fdo#102670 https://bugs.freedesktop.org/show_bug.cgi?id=102670
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058
fdo#103880 https://bugs.freedesktop.org/show_bug.cgi?id=103880

shard-hswtotal:2684 pass:1518 dwarn:2   dfail:0   fail:9   skip:1154 
time:9070s
shard-snbtotal:2694 pass:1289 dwarn:1   dfail:0   fail:11  skip:1392 
time:7858s
Blacklisted hosts:
shard-apltotal:2712 pass:1685 dwarn:1   dfail:0   fail:24  skip:1001 
time:14134s
shard-kbltotal:2712 pass:1808 dwarn:1   dfail:0   fail:24  skip:879 
time:11078s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7515/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t 1/4] lib: copy intel_aub.h from libdrm

2017-12-15 Thread Jordan Justen
Reviewed-by: Jordan Justen 

On 2017-12-06 15:11:20, Scott D Phillips wrote:
> No functionality related to aub is provided by libdrm aside from
> intel_aub.h which somewhat defines the file format. Move the
> header into this project to ease aub-related development.
> 
> Signed-off-by: Scott D Phillips 
> ---
>  lib/Makefile.am | 1 -
>  lib/{stubs/drm => }/intel_aub.h | 0
>  lib/rendercopy_gen8.c   | 2 +-
>  lib/rendercopy_gen9.c   | 2 +-
>  lib/stubs/drm/README| 6 +++---
>  5 files changed, 5 insertions(+), 6 deletions(-)
>  rename lib/{stubs/drm => }/intel_aub.h (100%)
> 
> diff --git a/lib/Makefile.am b/lib/Makefile.am
> index c19055ac..ab9eefe6 100644
> --- a/lib/Makefile.am
> +++ b/lib/Makefile.am
> @@ -23,7 +23,6 @@ endif
>  
>  if !HAVE_LIBDRM_INTEL
>  libintel_tools_la_SOURCES +=   \
> -stubs/drm/intel_aub.h  \
>  stubs/drm/intel_bufmgr.c   \
>  stubs/drm/intel_bufmgr.h
>  endif
> diff --git a/lib/stubs/drm/intel_aub.h b/lib/intel_aub.h
> similarity index 100%
> rename from lib/stubs/drm/intel_aub.h
> rename to lib/intel_aub.h
> diff --git a/lib/rendercopy_gen8.c b/lib/rendercopy_gen8.c
> index a7fc2c48..fe3fedfa 100644
> --- a/lib/rendercopy_gen8.c
> +++ b/lib/rendercopy_gen8.c
> @@ -22,7 +22,7 @@
>  #include "intel_reg.h"
>  #include "igt_aux.h"
>  
> -#include 
> +#include "intel_aub.h"
>  
>  #define VERTEX_SIZE (3*4)
>  
> diff --git a/lib/rendercopy_gen9.c b/lib/rendercopy_gen9.c
> index 95374807..e646e97f 100644
> --- a/lib/rendercopy_gen9.c
> +++ b/lib/rendercopy_gen9.c
> @@ -23,7 +23,7 @@
>  #include "intel_reg.h"
>  #include "igt_aux.h"
>  
> -#include 
> +#include "intel_aub.h"
>  
>  #define VERTEX_SIZE (3*4)
>  
> diff --git a/lib/stubs/drm/README b/lib/stubs/drm/README
> index 118837c3..79f2b5f6 100644
> --- a/lib/stubs/drm/README
> +++ b/lib/stubs/drm/README
> @@ -1,4 +1,4 @@
> -intel_bufmgr.h and intel_aub.h are a local copy of the files provided by 
> libdrm.
> +intel_bufmgr.h is a local copy of the file provided by libdrm 
> (intel/intel_bufmgr.h).
>  
> -Before releasing i-g-t a current copy of the files should be copied into this
> -directory of i-g-t.
> +Before releasing i-g-t a current copy of intel_bufmgr.h should be copied into
> +this directory of i-g-t.
> -- 
> 2.14.3
> 
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Skip an engine reset if it recovered before our preparations

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915: Skip an engine reset if it recovered before our preparations
URL   : https://patchwork.freedesktop.org/series/35453/
State : success

== Summary ==

Warning: bzip CI_DRM_3525/shard-glkb6/results10.json.bz2 wasn't in correct JSON 
format
Test perf:
Subgroup polling:
pass   -> FAIL   (shard-hsw) fdo#102252
Test gem_tiled_swapping:
Subgroup non-threaded:
pass   -> INCOMPLETE (shard-hsw) fdo#104218
Test kms_setmode:
Subgroup basic:
fail   -> WARN   (shard-snb) fdo#99912 +1
Test gem_eio:
Subgroup in-flight:
dmesg-warn -> PASS   (shard-snb) fdo#104058

fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058

shard-hswtotal:2654 pass:1502 dwarn:1   dfail:0   fail:10  skip:1140 
time:9089s
shard-snbtotal:2712 pass:1309 dwarn:1   dfail:0   fail:10  skip:1391 
time:8046s
Blacklisted hosts:
shard-apltotal:2712 pass:1683 dwarn:1   dfail:1   fail:25  skip:1001 
time:13920s
shard-kbltotal:2712 pass:1804 dwarn:1   dfail:1   fail:27  skip:879 
time:11191s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7514/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Skip an engine reset if it recovered before our preparations (rev2)

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915: Skip an engine reset if it recovered before our preparations 
(rev2)
URL   : https://patchwork.freedesktop.org/series/35453/
State : success

== Summary ==

Series 35453v2 drm/i915: Skip an engine reset if it recovered before our 
preparations
https://patchwork.freedesktop.org/api/1.0/series/35453/revisions/2/mbox/

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS   (fi-snb-2520m) fdo#103713
Test kms_psr_sink_crc:
Subgroup psr_basic:
dmesg-warn -> PASS   (fi-skl-6700hq) fdo#101144

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:437s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:436s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:1   fail:0   skip:64  
time:393s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:503s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:277s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:496s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:493s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:477s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:470s
fi-elk-e7500 total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:532s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:412s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:412s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:389s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:467s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:426s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:478s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:519s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:466s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:524s
fi-pnv-d510  total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:595s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:446s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:524s
fi-skl-6700hqtotal:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:552s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:494s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:440s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:548s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:410s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:589s
fi-cnl-y total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:625s
fi-glk-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:482s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:504s

e62100b705b3eb079c6acd60c25a8d54d92b7dac drm-tip: 2017y-12m-15d-21h-18m-47s UTC 
integration manifest
78f0edd70104 drm/i915: Skip an engine reset if it recovered before our 
preparations

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7517/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: Implement WaDisableVFclkgate.

2017-12-15 Thread Patchwork
== Series Details ==

Series: series starting with [1/2] drm/i915: Implement WaDisableVFclkgate.
URL   : https://patchwork.freedesktop.org/series/35456/
State : warning

== Summary ==

Series 35456v1 series starting with [1/2] drm/i915: Implement 
WaDisableVFclkgate.
https://patchwork.freedesktop.org/api/1.0/series/35456/revisions/1/mbox/

Test gem_sync:
Subgroup basic-each:
pass   -> SKIP   (fi-blb-e6850)
Subgroup basic-many-each:
pass   -> SKIP   (fi-blb-e6850)
Subgroup basic-store-all:
pass   -> SKIP   (fi-blb-e6850)
Subgroup basic-store-each:
pass   -> SKIP   (fi-blb-e6850)
Test gem_tiled_blits:
Subgroup basic:
pass   -> SKIP   (fi-blb-e6850)
Test gem_tiled_fence_blits:
Subgroup basic:
pass   -> SKIP   (fi-blb-e6850)
Test gem_wait:
Subgroup basic-busy-all:
pass   -> SKIP   (fi-blb-e6850)
Subgroup basic-wait-all:
pass   -> SKIP   (fi-blb-e6850)
Subgroup basic-await-all:
pass   -> SKIP   (fi-blb-e6850)
Test kms_busy:
Subgroup basic-flip-a:
pass   -> SKIP   (fi-blb-e6850)
Subgroup basic-flip-b:
pass   -> SKIP   (fi-blb-e6850)
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-legacy:
pass   -> SKIP   (fi-blb-e6850)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS   (fi-snb-2520m) fdo#103713
Test kms_psr_sink_crc:
Subgroup psr_basic:
dmesg-warn -> PASS   (fi-skl-6700hq) fdo#101144

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:436s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:442s
fi-blb-e6850 total:288  pass:210  dwarn:1   dfail:1   fail:0   skip:76  
time:368s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:501s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:278s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:494s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:493s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:481s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:468s
fi-elk-e7500 total:224  pass:163  dwarn:14  dfail:1   fail:0   skip:45 
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:530s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:404s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:415s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:391s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:477s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:432s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:484s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:519s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:466s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:519s
fi-pnv-d510  total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:588s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:454s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:527s
fi-skl-6700hqtotal:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:549s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:496s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:446s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:546s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:411s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:590s
fi-cnl-y total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:610s
fi-glk-dsi   total:21   pass:20   dwarn:0   dfail:0   fail:0   skip:0  
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:503s

e62100b705b3eb079c6acd60c25a8d54d92b7dac drm-tip: 2017y-12m-15d-21h-18m-47s UTC 
integration manifest
d4a5b1558958 drm/i915: Implement WaDisableEarlyEOT.
ca4bad3d032f drm/i915: Implement WaDisableVFclkgate.

== Logs ==

For more details see: 

Re: [Intel-gfx] [PATCH] drm/i915: Restore the kernel context after a GPU reset on an idle engine

2017-12-15 Thread Michel Thierry

On 12/15/2017 4:03 PM, Chris Wilson wrote:

As part of the system requirement for powersaving is that we always have
a context loaded. Upon boot and resume, we load the kernel_context to
ensure that some valid state is set before powersaving kicks in, we
should do so after a full GPU reset as well. We only need to do so for
an idle engine, as any active engines will restart by executing the
stuck request, loading its context, for the idle engine we create a
new request to load the kernel_context instead.

Signed-off-by: Chris Wilson 
Cc: Mika Kuoppala 
Cc: Joonas Lahtinen 
---
  drivers/gpu/drm/i915/i915_gem.c | 9 +
  1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 4a7f5579a7a5..189725a8fed6 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3119,6 +3119,15 @@ void i915_gem_reset(struct drm_i915_private *dev_priv)
 ctx = fetch_and_zero(>last_retired_context);
 if (ctx)
 engine->context_unpin(engine, ctx);
+
+   if (list_empty(>timeline->requests)) {
+   struct drm_i915_gem_request *rq;
+
+   rq = i915_gem_request_alloc(engine,
+   dev_priv->kernel_context);
+   if (!IS_ERR(rq))
+   __i915_add_request(rq, false);
+   }
 }

 i915_gem_restore_fences(dev_priv);


It shouldn't hurt and if it fixes something,

Reviewed-by: Michel Thierry 
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/trace: add hw_id to gem requests trace points

2017-12-15 Thread Lionel Landwerlin

On 15/12/17 21:15, Chris Wilson wrote:

Quoting Tvrtko Ursulin (2017-12-15 17:22:57)

On 15/12/2017 16:18, Lionel Landwerlin wrote:

On 15/12/17 16:08, Chris Wilson wrote:

Quoting Lionel Landwerlin (2017-12-15 15:51:36)

When monitoring the GPU with i915 perf, reports are tagged with a hw
id. When also tracking the requests using the kernel tracepoints, if
we include the hw_id from i915_gem_context, this allows us to
correlate a process with hw id fields in the OA reports.

Maybe, but don't split the fence.context and fence.seqno. You should
also update the igt tools using the tracepoints.
-Chris


I would have thought the tools could deal with a different ordering :(

At least as a benefit you get to refresh your Perl skills. ;)

trace.pl and intel-gpu-overlay I think are the only two.

I guess it would be possible to smarten both up to detect where the
fields they need are located but maybe too much work.

That's the thinking that got us into this mess to begin with ;)

But yes, it may remain much easier to keep igt in line with the kernel
and just say no to backwards-compatibility for these devtools.
-Chris



Like I said on IRC, I wrote a small parser in peg : 
https://github.com/rib/gputop/blob/imgui/gputop-ui/tracepoint_format.leg
That's enough to get the fields' location/size, but not to interpret 
whether something's a pointer rather than u32/64.
Using a peg parser limits the pain quite a bit. Those should be 
available in python as well (don't know about perl).


-
Lionel
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Restore the kernel context after a GPU reset on an idle engine

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915: Restore the kernel context after a GPU reset on an idle engine
URL   : https://patchwork.freedesktop.org/series/35454/
State : success

== Summary ==

Series 35454v1 drm/i915: Restore the kernel context after a GPU reset on an 
idle engine
https://patchwork.freedesktop.org/api/1.0/series/35454/revisions/1/mbox/

Test gem_sync:
Subgroup basic-all:
dmesg-fail -> PASS   (fi-blb-e6850) fdo#104259 +1
Test kms_frontbuffer_tracking:
Subgroup basic:
incomplete -> SKIP   (fi-elk-e7500) fdo#103989 +1
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS   (fi-snb-2520m) fdo#103713

fdo#104259 https://bugs.freedesktop.org/show_bug.cgi?id=104259
fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:433s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:443s
fi-blb-e6850 total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  
time:382s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:496s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:275s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:498s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:504s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:491s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:466s
fi-elk-e7500 total:229  pass:167  dwarn:14  dfail:1   fail:0   skip:46 
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:530s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:404s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:415s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:390s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:477s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:426s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:480s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:520s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:470s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:520s
fi-pnv-d510  total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  
time:591s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:445s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:536s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:554s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:502s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:445s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:545s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:409s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:591s
fi-cnl-y total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:640s
fi-glk-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:487s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:508s

e62100b705b3eb079c6acd60c25a8d54d92b7dac drm-tip: 2017y-12m-15d-21h-18m-47s UTC 
integration manifest
a0ea693dd156 drm/i915: Restore the kernel context after a GPU reset on an idle 
engine

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7515/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH v2] drm/i915: Skip an engine reset if it recovered before our preparations

2017-12-15 Thread Michel Thierry

On 12/15/2017 4:22 PM, Chris Wilson wrote:

At the beginning of a reset, we disable the submission method and find
the stuck request. We expect to find a stuck request for we have
declared the engine stalled. However, if we find no active request, the
engine must have recovered from its stall before we could issue a reset,
so let the engine continue on without a reset. If the engine is truly
stuck, we will back soon enough with the next reset attempt.

v2: Remove the stale debug message.

Signed-off-by: Chris Wilson 
Cc: Michel Thierry 
Cc: Mika Kuoppala 
---


Reviewed-by: Michel Thierry 


  drivers/gpu/drm/i915/i915_drv.c | 14 +++---
  1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index ca9f4b2862eb..6d39fdf2b604 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -2011,19 +2011,19 @@ int i915_reset_engine(struct intel_engine_cs *engine, 
unsigned int flags)
  
  	GEM_BUG_ON(!test_bit(I915_RESET_ENGINE + engine->id, >flags));
  
+	active_request = i915_gem_reset_prepare_engine(engine);

+   if (IS_ERR_OR_NULL(active_request)) {
+   /* Either the previous reset failed, or we pardon the reset. */
+   ret = PTR_ERR(active_request);
+   goto out;
+   }
+
if (!(flags & I915_RESET_QUIET)) {
dev_notice(engine->i915->drm.dev,
   "Resetting %s after gpu hang\n", engine->name);
}
error->reset_engine_count[engine->id]++;
  
-	active_request = i915_gem_reset_prepare_engine(engine);

-   if (IS_ERR(active_request)) {
-   DRM_DEBUG_DRIVER("Previous reset failed, promote to full 
reset\n");
-   ret = PTR_ERR(active_request);
-   goto out;
-   }
-
if (!engine->i915->guc.execbuf_client)
ret = intel_gt_reset_engine(engine->i915, engine);
else


___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH v2] drm/i915: Skip an engine reset if it recovered before our preparations

2017-12-15 Thread Chris Wilson
At the beginning of a reset, we disable the submission method and find
the stuck request. We expect to find a stuck request for we have
declared the engine stalled. However, if we find no active request, the
engine must have recovered from its stall before we could issue a reset,
so let the engine continue on without a reset. If the engine is truly
stuck, we will back soon enough with the next reset attempt.

v2: Remove the stale debug message.

Signed-off-by: Chris Wilson 
Cc: Michel Thierry 
Cc: Mika Kuoppala 
---
 drivers/gpu/drm/i915/i915_drv.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index ca9f4b2862eb..6d39fdf2b604 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -2011,19 +2011,19 @@ int i915_reset_engine(struct intel_engine_cs *engine, 
unsigned int flags)
 
GEM_BUG_ON(!test_bit(I915_RESET_ENGINE + engine->id, >flags));
 
+   active_request = i915_gem_reset_prepare_engine(engine);
+   if (IS_ERR_OR_NULL(active_request)) {
+   /* Either the previous reset failed, or we pardon the reset. */
+   ret = PTR_ERR(active_request);
+   goto out;
+   }
+
if (!(flags & I915_RESET_QUIET)) {
dev_notice(engine->i915->drm.dev,
   "Resetting %s after gpu hang\n", engine->name);
}
error->reset_engine_count[engine->id]++;
 
-   active_request = i915_gem_reset_prepare_engine(engine);
-   if (IS_ERR(active_request)) {
-   DRM_DEBUG_DRIVER("Previous reset failed, promote to full 
reset\n");
-   ret = PTR_ERR(active_request);
-   goto out;
-   }
-
if (!engine->i915->guc.execbuf_client)
ret = intel_gt_reset_engine(engine->i915, engine);
else
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Skip an engine reset if it recovered before our preparations

2017-12-15 Thread Michel Thierry

On 12/15/2017 4:16 PM, Chris Wilson wrote:

Quoting Michel Thierry (2017-12-16 00:02:47)

Hi,

On 12/15/2017 3:52 PM, Chris Wilson wrote:

At the beginning of a reset, we disable the submission method and find
the stuck request. We expect to find a stuck request for we have
declared the engine stalled. However, if we find no active request, the
engine must have recovered from its stall before we could issue a reset,
so let the engine continue on without a reset. If the engine is truly
stuck, we will back soon enough with the next reset attempt.

Signed-off-by: Chris Wilson 
Cc: Michel Thierry 
Cc: Mika Kuoppala 
---
   drivers/gpu/drm/i915/i915_drv.c | 14 +++---
   1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index ca9f4b2862eb..6f24435ddffe 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -2011,19 +2011,19 @@ int i915_reset_engine(struct intel_engine_cs *engine, 
unsigned int flags)
   
   GEM_BUG_ON(!test_bit(I915_RESET_ENGINE + engine->id, >flags));
   
- if (!(flags & I915_RESET_QUIET)) {

- dev_notice(engine->i915->drm.dev,
-"Resetting %s after gpu hang\n", engine->name);
- }
- error->reset_engine_count[engine->id]++;
-
   active_request = i915_gem_reset_prepare_engine(engine);
- if (IS_ERR(active_request)) {
+ if (IS_ERR_OR_NULL(active_request)) {
   DRM_DEBUG_DRIVER("Previous reset failed, promote to full 
reset\n");
   ret = PTR_ERR(active_request);


Will a static checker complain about PTR_ERR(NULL)?


It shouldn't. PTR_ERR(NULL) -> 0 is one of the valid tricks of PTR_ERR.


And the DRM_DEBUG_DRIVER isn't also correct in that case.


Bah, I was betting on those who read this would know that the full chip
reset was pardoned. If you want, we can just remove the debug.


Yes, the problem is sometimes we only get logs without knowing the code. 
I would vote to either remove it or change it to just say 'reset skipped'.


-Michel
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Skip an engine reset if it recovered before our preparations

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915: Skip an engine reset if it recovered before our preparations
URL   : https://patchwork.freedesktop.org/series/35453/
State : success

== Summary ==

Series 35453v1 drm/i915: Skip an engine reset if it recovered before our 
preparations
https://patchwork.freedesktop.org/api/1.0/series/35453/revisions/1/mbox/

Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
dmesg-warn -> PASS   (fi-kbl-r) fdo#104172
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS   (fi-snb-2520m) fdo#103713
Test kms_psr_sink_crc:
Subgroup psr_basic:
dmesg-warn -> PASS   (fi-skl-6700hq) fdo#101144

fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:440s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:442s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:1   fail:0   skip:64  
time:392s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:500s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:277s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:497s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:498s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:481s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:466s
fi-elk-e7500 total:224  pass:163  dwarn:14  dfail:1   fail:0   skip:45 
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:529s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:409s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:412s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:385s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:470s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:425s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:479s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:518s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:466s
fi-kbl-r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:522s
fi-pnv-d510  total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:591s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:441s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:530s
fi-skl-6700hqtotal:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:557s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:488s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:446s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:549s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:414s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:583s
fi-cnl-y total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:631s
fi-glk-dsi   total:104  pass:43   dwarn:0   dfail:1   fail:0   skip:59 
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:505s

e62100b705b3eb079c6acd60c25a8d54d92b7dac drm-tip: 2017y-12m-15d-21h-18m-47s UTC 
integration manifest
625847aff241 drm/i915: Skip an engine reset if it recovered before our 
preparations

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7514/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Skip an engine reset if it recovered before our preparations

2017-12-15 Thread Chris Wilson
Quoting Michel Thierry (2017-12-16 00:02:47)
> Hi,
> 
> On 12/15/2017 3:52 PM, Chris Wilson wrote:
> > At the beginning of a reset, we disable the submission method and find
> > the stuck request. We expect to find a stuck request for we have
> > declared the engine stalled. However, if we find no active request, the
> > engine must have recovered from its stall before we could issue a reset,
> > so let the engine continue on without a reset. If the engine is truly
> > stuck, we will back soon enough with the next reset attempt.
> > 
> > Signed-off-by: Chris Wilson 
> > Cc: Michel Thierry 
> > Cc: Mika Kuoppala 
> > ---
> >   drivers/gpu/drm/i915/i915_drv.c | 14 +++---
> >   1 file changed, 7 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c 
> > b/drivers/gpu/drm/i915/i915_drv.c
> > index ca9f4b2862eb..6f24435ddffe 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -2011,19 +2011,19 @@ int i915_reset_engine(struct intel_engine_cs 
> > *engine, unsigned int flags)
> >   
> >   GEM_BUG_ON(!test_bit(I915_RESET_ENGINE + engine->id, >flags));
> >   
> > - if (!(flags & I915_RESET_QUIET)) {
> > - dev_notice(engine->i915->drm.dev,
> > -"Resetting %s after gpu hang\n", engine->name);
> > - }
> > - error->reset_engine_count[engine->id]++;
> > -
> >   active_request = i915_gem_reset_prepare_engine(engine);
> > - if (IS_ERR(active_request)) {
> > + if (IS_ERR_OR_NULL(active_request)) {
> >   DRM_DEBUG_DRIVER("Previous reset failed, promote to full 
> > reset\n");
> >   ret = PTR_ERR(active_request);
> 
> Will a static checker complain about PTR_ERR(NULL)?

It shouldn't. PTR_ERR(NULL) -> 0 is one of the valid tricks of PTR_ERR.

> And the DRM_DEBUG_DRIVER isn't also correct in that case.

Bah, I was betting on those who read this would know that the full chip
reset was pardoned. If you want, we can just remove the debug.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t] tests/gem_ctx_param: Update invalid param

2017-12-15 Thread Chris Wilson
Quoting Antonio Argenziano (2017-12-15 19:01:11)
> Since commit: drm/i915/scheduler: Support user-defined priorities, the
> driver support an extra context param to set context's priority. Add
> tests for that interface and update invalid tests.
> 
> Signed-off-by: Antonio Argenziano 
> Cc: Chris Wilson 
> Cc: Michal Winiarski 
> ---
>  tests/gem_ctx_param.c | 77 
> ++-
>  1 file changed, 76 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/gem_ctx_param.c b/tests/gem_ctx_param.c
> index c20ae1ee..9a222e60 100644
> --- a/tests/gem_ctx_param.c
> +++ b/tests/gem_ctx_param.c
> @@ -25,6 +25,7 @@
>   */
>  
>  #include "igt.h"
> +#include 
>  
>  IGT_TEST_DESCRIPTION("Basic test for context set/get param input 
> validation.");
>  
> @@ -136,11 +137,85 @@ igt_main
> gem_context_set_param(fd, );
> }
>  
> +#define MAX_PRIO 1023
> +#define MIN_PRIO -MAX_PRIO
> +#define DEF_PRIO 0

Take these from the uapi header.

> +
> +   arg.param = I915_CONTEXT_PARAM_PRIORITY;
> +
> +   igt_subtest("root-set-priority") {
> +   arg.ctx_id = ctx;
> +   arg.size = 0;
> +

Bonus points for CAP_SYS_NICE checking.

arg.size validation checking.
arg.value > u32 (checking for overflows)

gem_context_get_param() of a new context should return DEF_PRIO

set_param on older machines returns -ENODEV

And that's not even trying to fuzz bad values beyond the sanity checks
of I915_CONTEXT_PARAM_PRIORITY.

> +   for (int i = MIN_PRIO; i <= MAX_PRIO; i += 1023) {

It's a couple of ioctls, do all 1024. Do them in a random order, trust
no one.

> +   arg.value = i;
> +   gem_context_set_param(fd, );
> +
> +   gem_context_get_param(fd, );
> +   igt_assert(arg.value == i); /* Verify prio was set */

igt_assert_eq(arg.value, i);

But doesn't verify the priority does anything. Just the RTT in the API,
which is a nice verification nevertheless.

> +   }
> +   }
> +
> +   igt_subtest("root-set-priority-invalid-value") {
> +   int prio_levels[] = {INT_MIN, MIN_PRIO - 1, MAX_PRIO + 1, 
> INT_MAX};
> +   int old_value;
> +   arg.ctx_id = ctx;
> +
> +   gem_context_get_param(fd, );
> +   old_value = arg.value;
> +
> +   for (int i = 0; i < (sizeof(prio_levels) / sizeof(int)); i++) 
> {

ARRAY_SIZE(prio_levels);

> +   arg.value = prio_levels[i];
> +   igt_assert_eq(__gem_context_set_param(fd, ), 
> -EINVAL);
> +
> +   gem_context_get_param(fd, );
> +   igt_assert(arg.value == old_value); /* Verify prio 
> was not set */
> +   }
> +   }
> +
> +   igt_subtest("user-set-priority") {
> +   arg.size = 0;
> +
> +   igt_fork(child, 1) {
> +   igt_drop_root();
> +   for (int i = MIN_PRIO; i <= DEF_PRIO; i += 1023) {
> +   arg.value = i;
> +   gem_context_set_param(fd, );
> +
> +   gem_context_get_param(fd, );
> +   igt_assert(arg.value == i); /* Verify prio 
> was set */

I wonder if the CAP_SYS_NICE limit might be adjusted in the future.
Certainly preemption rules are flexible, as we haven't told anyone about
them yet.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 1/2] drm/i915: Implement WaDisableVFclkgate.

2017-12-15 Thread Rafael Antognolli
This workaround supposedly fixes some hangs in the VF unit.

Signed-off-by: Rafael Antognolli 
Reviewed-by: Lucas De Marchi 
---
 drivers/gpu/drm/i915/i915_reg.h | 3 +++
 drivers/gpu/drm/i915/intel_pm.c | 5 +
 2 files changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 09bf043c1c2e..a9a6d6698bb1 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -3875,6 +3875,9 @@ enum {
 #define  SARBUNIT_CLKGATE_DIS  (1 << 5)
 #define  RCCUNIT_CLKGATE_DIS   (1 << 7)
 
+#define UNSLICE_UNIT_LEVEL_CLKGATE _MMIO(0x9434)
+#define  VFUNIT_CLKGATE_DIS(1 << 20)
+
 /*
  * Display engine regs
  */
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index a349c4fd51ff..e33842d6bb14 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -8448,6 +8448,11 @@ static void cnl_init_clock_gating(struct 
drm_i915_private *dev_priv)
if (IS_CNL_REVID(dev_priv, CNL_REVID_A0, CNL_REVID_B0))
val |= SARBUNIT_CLKGATE_DIS;
I915_WRITE(SLICE_UNIT_LEVEL_CLKGATE, val);
+
+   /* WaDisableVFclkgate:cnl */
+   val = I915_READ(UNSLICE_UNIT_LEVEL_CLKGATE);
+   val |= VFUNIT_CLKGATE_DIS;
+   I915_WRITE(UNSLICE_UNIT_LEVEL_CLKGATE, val);
 }
 
 static void cfl_init_clock_gating(struct drm_i915_private *dev_priv)
-- 
2.14.3

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 2/2] drm/i915: Implement WaDisableEarlyEOT.

2017-12-15 Thread Rafael Antognolli
There seems to be another clock gating issue which the workaround is
described as:

   "WA: Set 0xE4F0[1] = 1 to disable Early EOT of thread."

Signed-off-by: Rafael Antognolli 
Reviewed-by: Lucas De Marchi 
---
 drivers/gpu/drm/i915/i915_reg.h| 1 +
 drivers/gpu/drm/i915/intel_engine_cs.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index a9a6d6698bb1..8c13d3c89107 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -8145,6 +8145,7 @@ enum {
 #define   PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE(1<<8)
 #define   STALL_DOP_GATING_DISABLE (1<<5)
 #define   THROTTLE_12_5(7<<2)
+#define   DISABLE_EARLY_EOT(1<<1)
 
 #define GEN7_ROW_CHICKEN2  _MMIO(0xe4f4)
 #define GEN7_ROW_CHICKEN2_GT2  _MMIO(0xf4f4)
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c 
b/drivers/gpu/drm/i915/intel_engine_cs.c
index 510e0bc3a377..8b9892947e39 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -1272,6 +1272,9 @@ static int cnl_init_workarounds(struct intel_engine_cs 
*engine)
if (ret)
return ret;
 
+   /* WaDisableEarlyEOT:cnl */
+   WA_SET_BIT_MASKED(GEN8_ROW_CHICKEN, DISABLE_EARLY_EOT);
+
return 0;
 }
 
-- 
2.14.3

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Protect DDI port to DPLL map from theoretical race. (rev2)

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915: Protect DDI port to DPLL map from theoretical race. (rev2)
URL   : https://patchwork.freedesktop.org/series/35446/
State : failure

== Summary ==

Warning: bzip CI_DRM_3525/shard-glkb6/results10.json.bz2 wasn't in correct JSON 
format
Test gem_softpin:
Subgroup noreloc-s3:
pass   -> SKIP   (shard-snb) fdo#102365
Test gem_eio:
Subgroup in-flight:
dmesg-warn -> PASS   (shard-snb) fdo#104058
Test gem_mmap_gtt:
Subgroup basic-wc:
pass   -> FAIL   (shard-hsw)
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
pass   -> FAIL   (shard-snb) fdo#101623

fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623

shard-hswtotal:2712 pass:1536 dwarn:1   dfail:0   fail:11  skip:1164 
time:9441s
shard-snbtotal:2712 pass:1307 dwarn:1   dfail:0   fail:12  skip:1392 
time:7961s
Blacklisted hosts:
shard-apltotal:2712 pass:1685 dwarn:1   dfail:0   fail:25  skip:1001 
time:13832s
shard-kbltotal:2712 pass:1804 dwarn:1   dfail:0   fail:28  skip:879 
time:11169s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7513/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915: Restore the kernel context after a GPU reset on an idle engine

2017-12-15 Thread Chris Wilson
As part of the system requirement for powersaving is that we always have
a context loaded. Upon boot and resume, we load the kernel_context to
ensure that some valid state is set before powersaving kicks in, we
should do so after a full GPU reset as well. We only need to do so for
an idle engine, as any active engines will restart by executing the
stuck request, loading its context, for the idle engine we create a
new request to load the kernel_context instead.

Signed-off-by: Chris Wilson 
Cc: Mika Kuoppala 
Cc: Joonas Lahtinen 
---
 drivers/gpu/drm/i915/i915_gem.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 4a7f5579a7a5..189725a8fed6 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3119,6 +3119,15 @@ void i915_gem_reset(struct drm_i915_private *dev_priv)
ctx = fetch_and_zero(>last_retired_context);
if (ctx)
engine->context_unpin(engine, ctx);
+
+   if (list_empty(>timeline->requests)) {
+   struct drm_i915_gem_request *rq;
+
+   rq = i915_gem_request_alloc(engine,
+   dev_priv->kernel_context);
+   if (!IS_ERR(rq))
+   __i915_add_request(rq, false);
+   }
}
 
i915_gem_restore_fences(dev_priv);
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Skip an engine reset if it recovered before our preparations

2017-12-15 Thread Michel Thierry

Hi,

On 12/15/2017 3:52 PM, Chris Wilson wrote:

At the beginning of a reset, we disable the submission method and find
the stuck request. We expect to find a stuck request for we have
declared the engine stalled. However, if we find no active request, the
engine must have recovered from its stall before we could issue a reset,
so let the engine continue on without a reset. If the engine is truly
stuck, we will back soon enough with the next reset attempt.

Signed-off-by: Chris Wilson 
Cc: Michel Thierry 
Cc: Mika Kuoppala 
---
  drivers/gpu/drm/i915/i915_drv.c | 14 +++---
  1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index ca9f4b2862eb..6f24435ddffe 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -2011,19 +2011,19 @@ int i915_reset_engine(struct intel_engine_cs *engine, 
unsigned int flags)
  
  	GEM_BUG_ON(!test_bit(I915_RESET_ENGINE + engine->id, >flags));
  
-	if (!(flags & I915_RESET_QUIET)) {

-   dev_notice(engine->i915->drm.dev,
-  "Resetting %s after gpu hang\n", engine->name);
-   }
-   error->reset_engine_count[engine->id]++;
-
active_request = i915_gem_reset_prepare_engine(engine);
-   if (IS_ERR(active_request)) {
+   if (IS_ERR_OR_NULL(active_request)) {
DRM_DEBUG_DRIVER("Previous reset failed, promote to full 
reset\n");
ret = PTR_ERR(active_request);


Will a static checker complain about PTR_ERR(NULL)?
And the DRM_DEBUG_DRIVER isn't also correct in that case.


goto out;
}
  
+	if (!(flags & I915_RESET_QUIET)) {

+   dev_notice(engine->i915->drm.dev,
+  "Resetting %s after gpu hang\n", engine->name);
+   }
+   error->reset_engine_count[engine->id]++;
+
if (!engine->i915->guc.execbuf_client)
ret = intel_gt_reset_engine(engine->i915, engine);
else


___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915: Skip an engine reset if it recovered before our preparations

2017-12-15 Thread Chris Wilson
At the beginning of a reset, we disable the submission method and find
the stuck request. We expect to find a stuck request for we have
declared the engine stalled. However, if we find no active request, the
engine must have recovered from its stall before we could issue a reset,
so let the engine continue on without a reset. If the engine is truly
stuck, we will back soon enough with the next reset attempt.

Signed-off-by: Chris Wilson 
Cc: Michel Thierry 
Cc: Mika Kuoppala 
---
 drivers/gpu/drm/i915/i915_drv.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index ca9f4b2862eb..6f24435ddffe 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -2011,19 +2011,19 @@ int i915_reset_engine(struct intel_engine_cs *engine, 
unsigned int flags)
 
GEM_BUG_ON(!test_bit(I915_RESET_ENGINE + engine->id, >flags));
 
-   if (!(flags & I915_RESET_QUIET)) {
-   dev_notice(engine->i915->drm.dev,
-  "Resetting %s after gpu hang\n", engine->name);
-   }
-   error->reset_engine_count[engine->id]++;
-
active_request = i915_gem_reset_prepare_engine(engine);
-   if (IS_ERR(active_request)) {
+   if (IS_ERR_OR_NULL(active_request)) {
DRM_DEBUG_DRIVER("Previous reset failed, promote to full 
reset\n");
ret = PTR_ERR(active_request);
goto out;
}
 
+   if (!(flags & I915_RESET_QUIET)) {
+   dev_notice(engine->i915->drm.dev,
+  "Resetting %s after gpu hang\n", engine->name);
+   }
+   error->reset_engine_count[engine->id]++;
+
if (!engine->i915->guc.execbuf_client)
ret = intel_gt_reset_engine(engine->i915, engine);
else
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/cnl: Add support for horizontal plane flipping (rev2)

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915/cnl: Add support for horizontal plane flipping (rev2)
URL   : https://patchwork.freedesktop.org/series/29114/
State : success

== Summary ==

Warning: bzip CI_DRM_3525/shard-glkb6/results10.json.bz2 wasn't in correct JSON 
format
Test gem_eio:
Subgroup in-flight:
dmesg-warn -> PASS   (shard-snb) fdo#104058
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
pass   -> FAIL   (shard-snb) fdo#101623

fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623

shard-hswtotal:2635 pass:1490 dwarn:1   dfail:0   fail:9   skip:1135 
time:9077s
shard-snbtotal:2712 pass:1308 dwarn:1   dfail:0   fail:12  skip:1391 
time:8027s
Blacklisted hosts:
shard-apltotal:2712 pass:1682 dwarn:1   dfail:1   fail:27  skip:1001 
time:13828s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7511/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Protect DDI port to DPLL map from theoretical race. (rev2)

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915: Protect DDI port to DPLL map from theoretical race. (rev2)
URL   : https://patchwork.freedesktop.org/series/35446/
State : success

== Summary ==

Series 35446v2 drm/i915: Protect DDI port to DPLL map from theoretical race.
https://patchwork.freedesktop.org/api/1.0/series/35446/revisions/2/mbox/

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> PASS   (fi-elk-e7500) fdo#103989 +1
Test gem_sync:
Subgroup basic-all:
dmesg-fail -> FAIL   (fi-blb-e6850) fdo#104259
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
dmesg-warn -> PASS   (fi-kbl-r) fdo#104172 +1
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS   (fi-snb-2520m) fdo#103713

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#104259 https://bugs.freedesktop.org/show_bug.cgi?id=104259
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:431s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:436s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:0   fail:1   skip:64  
time:388s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:504s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:280s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:498s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:502s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:482s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:480s
fi-elk-e7500 total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:533s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:407s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:414s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:394s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:479s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:431s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:478s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:528s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:470s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:523s
fi-pnv-d510  total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:592s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:440s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:530s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:557s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:489s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:447s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:541s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:407s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:587s
fi-cnl-y total:224  pass:199  dwarn:0   dfail:0   fail:0   skip:24 
fi-glk-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:480s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:509s

e62100b705b3eb079c6acd60c25a8d54d92b7dac drm-tip: 2017y-12m-15d-21h-18m-47s UTC 
integration manifest
32b773f75cb9 drm/i915: Protect DDI port to DPLL map from theoretical race.

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7513/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/glk: Disable Guc and HuC on GLK

2017-12-15 Thread Rodrigo Vivi
On Fri, Dec 15, 2017 at 06:07:27AM +, Michal Wajdeczko wrote:
> On Thu, 14 Dec 2017 23:30:56 +0100, Srivatsa, Anusha
>  wrote:
> 
> > 
> > 
> > > -Original Message-
> > > From: Wajdeczko, Michal
> > > Sent: Thursday, December 14, 2017 2:18 PM
> > > To: intel-gfx@lists.freedesktop.org; Srivatsa, Anusha
> > > 
> > > Cc: Vivi, Rodrigo 
> > > Subject: Re: [Intel-gfx] [PATCH] drm/i915/glk: Disable Guc and HuC
> > > on GLK
> > > 
> > > On Thu, 14 Dec 2017 22:58:37 +0100, Anusha Srivatsa
> > >  wrote:
> > > 
> > > > Since the firmwares are released yet to public repo, disable them on
> > > > Geminilake.
> > > > 
> > > > Cc: Rodrigo Vivi 
> > > > Signed-off-by: Anusha Srivatsa 
> > > > ---
> > > >  drivers/gpu/drm/i915/i915_pci.c | 5 +
> > > >  1 file changed, 5 insertions(+)
> > > > 
> > > > diff --git a/drivers/gpu/drm/i915/i915_pci.c
> > > > b/drivers/gpu/drm/i915/i915_pci.c index fa67d3d..ddf7530 100644
> > > > --- a/drivers/gpu/drm/i915/i915_pci.c
> > > > +++ b/drivers/gpu/drm/i915/i915_pci.c
> > > > @@ -521,6 +521,11 @@ static const struct intel_device_info
> > > > intel_geminilake_info __initconst = {
> > > > GEN9_LP_FEATURES,
> > > > .platform = INTEL_GEMINILAKE,
> > > > .ddb_size = 1024,
> > > > +   /* FIXME Geminilake supports GuC but currently firmwares
> > > > +* have not made it to public repo. Lets disable the support
> > > > +* as a temporary fix.
> > > > +*/
> > > > +   .has_guc = 0,
> > > 
> > > Maybe better place to put this fix is __get_platform_enable_guc()
> > > like in [1] [1]
> > > https://patchwork.freedesktop.org/patch/192006/
> > 
> > Michal,
> >  Hmm the reference patch  is controlling guc/huc through  a module
> > parameter but wont the above approach be neater platform wise?
> 
> With your patch it would be impossible to check even preliminary
> firmwares from non-public repo without recompilation of the driver.
> 
> While with variant below it would just require changing modparams like:
>   enable_guc=1
>   guc_firmware_path=preliminary/glk.bin

This is a fair point imo. With has_guc=0 you remove the possibility
of testing preliminary GuC/HuC without a kernel patch...

> 
> Note that auto mode (enable_guc=-1) will still keep GuC disabled for GLK.

... but I believe that the main point here is that if
we don't have a public image it doesn't exist from the upstream perspective.

The ideal is not need this patch and releasing firmware sooner. I see same
happening for all upcoming platforms...

So, whatever we decide for this case needs to cover future cases as well.

Thanks,
Rodrigo.

> 
> Michal
> 
> > 
> > Anusha
> > > diff --git a/drivers/gpu/drm/i915/intel_uc.c
> > > b/drivers/gpu/drm/i915/intel_uc.c
> > > index 49bccc9..22b0afe 100644
> > > --- a/drivers/gpu/drm/i915/intel_uc.c
> > > +++ b/drivers/gpu/drm/i915/intel_uc.c
> > > @@ -60,6 +60,8 @@ static int __get_platform_enable_guc(struct
> > > drm_i915_private *dev_priv)
> > >   enable_guc |= ENABLE_GUC_LOAD_HUC;
> > > 
> > >   /* Any platform specific fine-tuning can be done here */
> > > + if (IS_GEMINILAKE(dev_priv))
> > > + enable_guc = 0; /* no firmware on CI machines */
> > > 
> > >   return enable_guc;
> > >  }
> > > 
> > > 
> > > > GLK_COLORS,
> > > >  };
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH v2] drm/i915: Protect DDI port to DPLL map from theoretical race.

2017-12-15 Thread Rodrigo Vivi
In case we have multiple modesets for different connectors
happening in parallel we could have a race on the RMW on these
shared registers.

This possibility was initially raised by Paulo when reviewing
commit '555e38d27317 ("drm/i915/cnl: DDI - PLL mapping")'
but the original possibility comes from commit '5416d871136d
("drm/i915/skl: Set the eDP link rate on DPLL0")'. Or maybe
later when atomic commits entered into picture.

Apparently the discussion around this topic showed that the
right solution would be on serializing the atomic commits in
a way that we don't have the possibility of races here since
if that parallel modeset happenings apparently many other
things will be on fire.

Code is there since SKL and there was no report of issue,
but since we never looked back to that serialization possibility,
and also we don't have an igt case for that it is better to at
least protect this corner.

Suggested-by: Paulo Zanoni 
Fixes: 555e38d27317 ("drm/i915/cnl: DDI - PLL mapping")
Fixes: 5416d871136d ("drm/i915/skl: Set the eDP link rate on DPLL0")
Cc: Paulo Zanoni 
Cc: Ville Syrjälä 
Cc: Maarten Lankhorst maarten.lankho...@linux.intel.com
Signed-off-by: Rodrigo Vivi 
---
 drivers/gpu/drm/i915/intel_ddi.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 369f780588fb..f624ba8e23be 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -2095,6 +2095,8 @@ static void intel_ddi_clk_select(struct intel_encoder 
*encoder,
if (WARN_ON(!pll))
return;
 
+mutex_lock(_priv->dpll_lock);
+
if (IS_CANNONLAKE(dev_priv)) {
/* Configure DPCLKA_CFGCR0 to map the DPLL to the DDI. */
val = I915_READ(DPCLKA_CFGCR0);
@@ -2124,6 +2126,8 @@ static void intel_ddi_clk_select(struct intel_encoder 
*encoder,
} else if (INTEL_INFO(dev_priv)->gen < 9) {
I915_WRITE(PORT_CLK_SEL(port), hsw_pll_to_ddi_pll_sel(pll));
}
+
+   mutex_unlock(_priv->dpll_lock);
 }
 
 static void intel_ddi_clk_disable(struct intel_encoder *encoder)
-- 
2.13.6

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.IGT: success for tests/gem_ctx_param: Update invalid param

2017-12-15 Thread Patchwork
== Series Details ==

Series: tests/gem_ctx_param: Update invalid param
URL   : https://patchwork.freedesktop.org/series/35438/
State : success

== Summary ==

Warning: bzip CI_DRM_3524/shard-glkb6/results10.json.bz2 wasn't in correct JSON 
format
Test gem_ctx_param:
Subgroup invalid-param-set:
fail   -> PASS   (shard-snb) fdo#103107 +3
Test kms_setmode:
Subgroup basic:
pass   -> FAIL   (shard-hsw) fdo#99912
Test gem_eio:
Subgroup in-flight-contexts:
pass   -> DMESG-WARN (shard-snb) fdo#104058
Test drv_module_reload:
Subgroup basic-reload-inject:
pass   -> DMESG-WARN (shard-snb) fdo#102707 +1
Test pm_rc6_residency:
Subgroup rc6-accuracy:
skip   -> PASS   (shard-snb)
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
fail   -> PASS   (shard-snb) fdo#101623 +1
Test perf:
Subgroup blocking:
pass   -> FAIL   (shard-hsw) fdo#102252
Test kms_flip:
Subgroup dpms-vs-vblank-race:
fail   -> PASS   (shard-hsw) fdo#103060
Test gem_softpin:
Subgroup noreloc-s3:
skip   -> PASS   (shard-snb) fdo#102365
skip   -> PASS   (shard-hsw) fdo#103540
Test drv_selftest:
Subgroup live_hangcheck:
pass   -> INCOMPLETE (shard-snb) fdo#103880

fdo#103107 https://bugs.freedesktop.org/show_bug.cgi?id=103107
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058
fdo#102707 https://bugs.freedesktop.org/show_bug.cgi?id=102707
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103880 https://bugs.freedesktop.org/show_bug.cgi?id=103880

shard-hswtotal:2700 pass:1529 dwarn:2   dfail:0   fail:13  skip:1155 
time:9349s
shard-snbtotal:2698 pass:1290 dwarn:3   dfail:0   fail:14  skip:1390 
time:7969s
Blacklisted hosts:
shard-kbltotal:2676 pass:1772 dwarn:5   dfail:0   fail:27  skip:871 
time:10795s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_688/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/cnl: Add support for horizontal plane flipping

2017-12-15 Thread Chris Wilson
Quoting Rodrigo Vivi (2017-12-15 21:38:00)
> From: Joonas Lahtinen 
> 
> CNL supports horizontal plane flipping on non-linear plane formats.
> 
> v2:
> - Avoid BUG unlike elsewhere in the code (Ville)
> - Hoist the rotation-tiling restriction check (Ville)
> 
> v3 (Rodrigo):
> - Rebased after a while.
> - Fix small indentation issues.
> 
> Bspec: 7656
> Suggested-by: Anusha Srivatsa 
> Cc: Ville Syrjala 
> Cc: Rodrigo Vivi 
> Cc: Anusha Srivatsa 
> Signed-off-by: Joonas Lahtinen 
> Reviewed-by: Ville Syrjälä 
> Signed-off-by: Rodrigo Vivi 
> ---
>  drivers/gpu/drm/i915/i915_reg.h  |  1 +
>  drivers/gpu/drm/i915/intel_display.c | 40 
> +++-
>  2 files changed, 36 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 09bf043c1c2e..14ade8f88dcc 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -6329,6 +6329,7 @@ enum {
>  #define   PLANE_CTL_TILED_X(  1 << 10)
>  #define   PLANE_CTL_TILED_Y(  4 << 10)
>  #define   PLANE_CTL_TILED_YF   (  5 << 10)
> +#define   PLANE_CTL_FLIP_HORIZONTAL(  1 << 8)
>  #define   PLANE_CTL_ALPHA_MASK (0x3 << 4) /* Pre-GLK */
>  #define   PLANE_CTL_ALPHA_DISABLE  (  0 << 4)
>  #define   PLANE_CTL_ALPHA_SW_PREMULTIPLY   (  2 << 4)
> diff --git a/drivers/gpu/drm/i915/intel_display.c 
> b/drivers/gpu/drm/i915/intel_display.c
> index efa6c6d19664..fb5ee413dc30 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3073,6 +3073,12 @@ int skl_check_plane_surface(struct intel_plane_state 
> *plane_state)
> unsigned int rotation = plane_state->base.rotation;
> int ret;
>  
> +   if (rotation & DRM_MODE_REFLECT_X &&
> +   fb->modifier == DRM_FORMAT_MOD_LINEAR) {
> +   DRM_DEBUG_KMS("horizontal flip is not supported with linear 
> surface formats\n");
> +   return -EINVAL;
> +   }
> +
> if (!plane_state->base.visible)
> return 0;
>  
> @@ -3453,9 +3459,9 @@ static u32 skl_plane_ctl_tiling(uint64_t fb_modifier)
> return 0;
>  }
>  
> -static u32 skl_plane_ctl_rotation(unsigned int rotation)
> +static u32 skl_plane_ctl_rotate(unsigned int rotate)
>  {
> -   switch (rotation) {
> +   switch (rotate) {
> case DRM_MODE_ROTATE_0:
> break;
> /*
> @@ -3469,7 +3475,22 @@ static u32 skl_plane_ctl_rotation(unsigned int 
> rotation)
> case DRM_MODE_ROTATE_270:
> return PLANE_CTL_ROTATE_90;
> default:
> -   MISSING_CASE(rotation);
> +   MISSING_CASE(rotate);
> +   }
> +
> +   return 0;
> +}
> +
> +static u32 cnl_plane_ctl_flip(unsigned int reflect)
> +{
> +   switch (reflect) {
> +   case 0:
> +   break;
> +   case DRM_MODE_REFLECT_X:
> +   return PLANE_CTL_FLIP_HORIZONTAL;
> +   case DRM_MODE_REFLECT_Y:
> +   default:
> +   MISSING_CASE(reflect);
> }
>  
> return 0;
> @@ -3497,7 +3518,11 @@ u32 skl_plane_ctl(const struct intel_crtc_state 
> *crtc_state,
>  
> plane_ctl |= skl_plane_ctl_format(fb->format->format);
> plane_ctl |= skl_plane_ctl_tiling(fb->modifier);
> -   plane_ctl |= skl_plane_ctl_rotation(rotation);
> +   plane_ctl |= skl_plane_ctl_rotate(rotation & DRM_MODE_ROTATE_MASK);
> +
> +   if (INTEL_GEN(dev_priv) >= 10)
> +   plane_ctl |= cnl_plane_ctl_flip(rotation &
> +   DRM_MODE_REFLECT_MASK);
>  
> if (key->flags & I915_SET_COLORKEY_DESTINATION)
> plane_ctl |= PLANE_CTL_KEY_ENABLE_DESTINATION;
> @@ -13300,7 +13325,12 @@ intel_primary_plane_create(struct drm_i915_private 
> *dev_priv, enum pipe pipe)
> if (ret)
> goto fail;
>  
> -   if (INTEL_GEN(dev_priv) >= 9) {
> +   if (INTEL_GEN(dev_priv) >= 10) {
> +   supported_rotations =
> +   DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_90 |
> +   DRM_MODE_ROTATE_180 | DRM_MODE_ROTATE_270 |
> +   DRM_MODE_REFLECT_X;

REFLECT_Y == ROTATE_180 | REFLECT_X

Where does that conversion belong? Should the kernel just say it
supports REFLECT_Y and fixup skl_plane_ctl(), that seems pretty simple.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Protect DDI port to DPLL map from theoretical race.

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915: Protect DDI port to DPLL map from theoretical race.
URL   : https://patchwork.freedesktop.org/series/35446/
State : failure

== Summary ==

Applying: drm/i915: Protect DDI port to DPLL map from theoretical race.
error: sha1 information is lacking or useless 
(drivers/gpu/drm/i915/intel_ddi.c).
error: could not build fake ancestor
Patch failed at 0001 drm/i915: Protect DDI port to DPLL map from theoretical 
race.
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915: Protect DDI port to DPLL map from theoretical race.

2017-12-15 Thread Rodrigo Vivi
In case we have multiple modesets for different connectors
happening in parallel we could have a race on the RMW on these
shared registers.

This possibility was initially raised by Paulo when reviewing
commit '555e38d27317 ("drm/i915/cnl: DDI - PLL mapping")'
but the original possibility comes from commit '5416d871136d
("drm/i915/skl: Set the eDP link rate on DPLL0")'. Or maybe
later when atomic commits entered into picture.

Apparently the discussion around this topic showed that the
right solution would be on serializing the atomic commits in
a way that we don't have the possibility of races here since
if that parallel modeset happenings apparently many other
things will be on fire.

Code is there since SKL and there was no report of issue,
but since we never looked back to that serialization possibility,
and also we don't have an igt case for that it is better to at
least protect this corner.

Suggested-by: Paulo Zanoni 
Fixes: 555e38d27317 ("drm/i915/cnl: DDI - PLL mapping")
Fixes: 5416d871136d ("drm/i915/skl: Set the eDP link rate on DPLL0")
Cc: Paulo Zanoni 
Cc: Ville Syrjälä 
Cc: Maarten Lankhorst maarten.lankho...@linux.intel.com
Signed-off-by: Rodrigo Vivi 
---
 drivers/gpu/drm/i915/intel_ddi.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 8467a797a70b..eb816ff2fa77 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -2095,6 +2095,8 @@ static void intel_ddi_clk_select(struct intel_encoder 
*encoder,
if (WARN_ON(!pll))
return;
 
+mutex_lock(_priv->dpll_lock);
+
if (IS_CANNONLAKE(dev_priv)) {
/* Configure DPCLKA_CFGCR0 to map the DPLL to the DDI. */
val = I915_READ(DPCLKA_CFGCR0);
@@ -2124,6 +2126,8 @@ static void intel_ddi_clk_select(struct intel_encoder 
*encoder,
} else if (INTEL_INFO(dev_priv)->gen < 9) {
I915_WRITE_LOG(PORT_CLK_SEL(port), hsw_pll_to_ddi_pll_sel(pll));
}
+
+   mutex_unlock(_priv->dpll_lock);
 }
 
 static void intel_ddi_clk_disable(struct intel_encoder *encoder)
-- 
2.13.6

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.IGT: success for trace.pl: handle request tracepoint fields regardless of their order

2017-12-15 Thread Patchwork
== Series Details ==

Series: trace.pl: handle request tracepoint fields regardless of their order
URL   : https://patchwork.freedesktop.org/series/35434/
State : success

== Summary ==

Warning: bzip CI_DRM_3524/shard-glkb6/results10.json.bz2 wasn't in correct JSON 
format
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-primscrn-cur-indfb-draw-render:
pass   -> SKIP   (shard-snb) fdo#101623 +2
Subgroup fbc-1p-primscrn-pri-shrfb-draw-mmap-gtt:
pass   -> SKIP   (shard-snb) fdo#103167
Test kms_cursor_legacy:
Subgroup flip-vs-cursor-varying-size:
pass   -> SKIP   (shard-snb) fdo#102670
Test kms_flip:
Subgroup dpms-vs-vblank-race:
fail   -> PASS   (shard-hsw) fdo#103060
Test kms_setmode:
Subgroup basic:
pass   -> FAIL   (shard-hsw) fdo#99912
Test gem_softpin:
Subgroup noreloc-s3:
skip   -> PASS   (shard-snb) fdo#102365
skip   -> PASS   (shard-hsw) fdo#103540
Test perf:
Subgroup polling:
pass   -> FAIL   (shard-hsw) fdo#102252
Test gem_tiled_swapping:
Subgroup non-threaded:
incomplete -> PASS   (shard-hsw) fdo#104218

fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#102670 https://bugs.freedesktop.org/show_bug.cgi?id=102670
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218

shard-hswtotal:2712 pass:1536 dwarn:1   dfail:0   fail:11  skip:1164 
time:9467s
shard-snbtotal:2712 pass:1305 dwarn:1   dfail:0   fail:12  skip:1394 
time:8074s
Blacklisted hosts:
shard-apltotal:2712 pass:1683 dwarn:1   dfail:1   fail:25  skip:1001 
time:13962s
shard-kbltotal:2669 pass:1772 dwarn:1   dfail:0   fail:30  skip:865 
time:10903s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_687/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/cnl: Add support for horizontal plane flipping (rev2)

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915/cnl: Add support for horizontal plane flipping (rev2)
URL   : https://patchwork.freedesktop.org/series/29114/
State : success

== Summary ==

Series 29114v2 drm/i915/cnl: Add support for horizontal plane flipping
https://patchwork.freedesktop.org/api/1.0/series/29114/revisions/2/mbox/

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test kms_frontbuffer_tracking:
Subgroup basic:
pass   -> FAIL   (fi-glk-1) fdo#103167
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS   (fi-snb-2520m) fdo#103713
Test kms_psr_sink_crc:
Subgroup psr_basic:
dmesg-warn -> PASS   (fi-skl-6700hq) fdo#101144

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:427s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:440s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:1   fail:0   skip:64  
time:392s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:500s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:276s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:494s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:494s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:480s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:469s
fi-elk-e7500 total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-glk-1 total:288  pass:259  dwarn:0   dfail:0   fail:1   skip:28  
time:527s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:403s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:416s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:388s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:470s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:427s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:475s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:519s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:464s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:523s
fi-pnv-d510  total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:597s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:444s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:531s
fi-skl-6700hqtotal:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:560s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:496s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:448s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:552s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:412s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:591s
fi-cnl-y total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:646s
fi-glk-dsi   total:288  pass:152  dwarn:1   dfail:4   fail:0   skip:131 
time:289s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:514s

e62100b705b3eb079c6acd60c25a8d54d92b7dac drm-tip: 2017y-12m-15d-21h-18m-47s UTC 
integration manifest
57bbe8d09489 drm/i915/cnl: Add support for horizontal plane flipping

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7511/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915/cnl: Add support for horizontal plane flipping

2017-12-15 Thread Rodrigo Vivi
From: Joonas Lahtinen 

CNL supports horizontal plane flipping on non-linear plane formats.

v2:
- Avoid BUG unlike elsewhere in the code (Ville)
- Hoist the rotation-tiling restriction check (Ville)

v3 (Rodrigo):
- Rebased after a while.
- Fix small indentation issues.

Bspec: 7656
Suggested-by: Anusha Srivatsa 
Cc: Ville Syrjala 
Cc: Rodrigo Vivi 
Cc: Anusha Srivatsa 
Signed-off-by: Joonas Lahtinen 
Reviewed-by: Ville Syrjälä 
Signed-off-by: Rodrigo Vivi 
---
 drivers/gpu/drm/i915/i915_reg.h  |  1 +
 drivers/gpu/drm/i915/intel_display.c | 40 +++-
 2 files changed, 36 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 09bf043c1c2e..14ade8f88dcc 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -6329,6 +6329,7 @@ enum {
 #define   PLANE_CTL_TILED_X(  1 << 10)
 #define   PLANE_CTL_TILED_Y(  4 << 10)
 #define   PLANE_CTL_TILED_YF   (  5 << 10)
+#define   PLANE_CTL_FLIP_HORIZONTAL(  1 << 8)
 #define   PLANE_CTL_ALPHA_MASK (0x3 << 4) /* Pre-GLK */
 #define   PLANE_CTL_ALPHA_DISABLE  (  0 << 4)
 #define   PLANE_CTL_ALPHA_SW_PREMULTIPLY   (  2 << 4)
diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index efa6c6d19664..fb5ee413dc30 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3073,6 +3073,12 @@ int skl_check_plane_surface(struct intel_plane_state 
*plane_state)
unsigned int rotation = plane_state->base.rotation;
int ret;
 
+   if (rotation & DRM_MODE_REFLECT_X &&
+   fb->modifier == DRM_FORMAT_MOD_LINEAR) {
+   DRM_DEBUG_KMS("horizontal flip is not supported with linear 
surface formats\n");
+   return -EINVAL;
+   }
+
if (!plane_state->base.visible)
return 0;
 
@@ -3453,9 +3459,9 @@ static u32 skl_plane_ctl_tiling(uint64_t fb_modifier)
return 0;
 }
 
-static u32 skl_plane_ctl_rotation(unsigned int rotation)
+static u32 skl_plane_ctl_rotate(unsigned int rotate)
 {
-   switch (rotation) {
+   switch (rotate) {
case DRM_MODE_ROTATE_0:
break;
/*
@@ -3469,7 +3475,22 @@ static u32 skl_plane_ctl_rotation(unsigned int rotation)
case DRM_MODE_ROTATE_270:
return PLANE_CTL_ROTATE_90;
default:
-   MISSING_CASE(rotation);
+   MISSING_CASE(rotate);
+   }
+
+   return 0;
+}
+
+static u32 cnl_plane_ctl_flip(unsigned int reflect)
+{
+   switch (reflect) {
+   case 0:
+   break;
+   case DRM_MODE_REFLECT_X:
+   return PLANE_CTL_FLIP_HORIZONTAL;
+   case DRM_MODE_REFLECT_Y:
+   default:
+   MISSING_CASE(reflect);
}
 
return 0;
@@ -3497,7 +3518,11 @@ u32 skl_plane_ctl(const struct intel_crtc_state 
*crtc_state,
 
plane_ctl |= skl_plane_ctl_format(fb->format->format);
plane_ctl |= skl_plane_ctl_tiling(fb->modifier);
-   plane_ctl |= skl_plane_ctl_rotation(rotation);
+   plane_ctl |= skl_plane_ctl_rotate(rotation & DRM_MODE_ROTATE_MASK);
+
+   if (INTEL_GEN(dev_priv) >= 10)
+   plane_ctl |= cnl_plane_ctl_flip(rotation &
+   DRM_MODE_REFLECT_MASK);
 
if (key->flags & I915_SET_COLORKEY_DESTINATION)
plane_ctl |= PLANE_CTL_KEY_ENABLE_DESTINATION;
@@ -13300,7 +13325,12 @@ intel_primary_plane_create(struct drm_i915_private 
*dev_priv, enum pipe pipe)
if (ret)
goto fail;
 
-   if (INTEL_GEN(dev_priv) >= 9) {
+   if (INTEL_GEN(dev_priv) >= 10) {
+   supported_rotations =
+   DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_90 |
+   DRM_MODE_ROTATE_180 | DRM_MODE_ROTATE_270 |
+   DRM_MODE_REFLECT_X;
+   } else if (INTEL_GEN(dev_priv) >= 9) {
supported_rotations =
DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_90 |
DRM_MODE_ROTATE_180 | DRM_MODE_ROTATE_270;
-- 
2.13.6

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH v2] x86/gpu: add CFL to early quirks

2017-12-15 Thread Rodrigo Vivi
On Fri, Dec 15, 2017 at 04:39:25PM +, Ingo Molnar wrote:
> 
> * Lucas De Marchi  wrote:
> 
> > CFL was missing from intel_early_ids[]. The PCI ID needs to be there to
> > allow the memory region to be stolen, otherwise we could have RAM being
> > arbitrarily overwritten if for example we keep using the UEFI framebuffer,
> > depending on how BIOS has set up the e820 map.
> > 
> > Fixes: b056f8f3d6b9 ("drm/i915/cfl: Add Coffee Lake PCI IDs for S Skus.")
> > Signed-off-by: Lucas De Marchi 
> > Cc: Rodrigo Vivi 
> > Cc: Anusha Srivatsa 
> > Cc: Jani Nikula 
> > Cc: Joonas Lahtinen 
> > Cc: David Airlie 
> > Cc: intel-gfx@lists.freedesktop.org
> > Cc: dri-de...@lists.freedesktop.org
> > Cc: Ingo Molnar 
> > Cc: H. Peter Anvin 
> > Cc: Thomas Gleixner 
> > Cc: x...@kernel.org
> > Cc:  # v4.13+ 0890540e21cf drm/i915: add GT number 
> > to intel_device_info
> > Cc:  # v4.13+ 41693fd52373 drm/i915/kbl: Change a 
> > KBL pci id to GT2 from GT1.5
> > Cc:  # v4.13+
> > Reviewed-by: Rodrigo Vivi 
> > ---
> > 
> > v2: improve commit message, add Fixes tag and CC stable
> > 
> >  arch/x86/kernel/early-quirks.c | 1 +
> >  include/drm/i915_pciids.h  | 6 ++
> >  2 files changed, 7 insertions(+)
> 
> Acked-by: Ingo Molnar 

Merged to drm-intel-next-queued.
Thanks for the patches, suggestions and acks.

> 
> Thanks,
> 
>   Ingo
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/trace: add hw_id to gem requests trace points

2017-12-15 Thread Chris Wilson
Quoting Tvrtko Ursulin (2017-12-15 17:22:57)
> 
> On 15/12/2017 16:18, Lionel Landwerlin wrote:
> > On 15/12/17 16:08, Chris Wilson wrote:
> >> Quoting Lionel Landwerlin (2017-12-15 15:51:36)
> >>> When monitoring the GPU with i915 perf, reports are tagged with a hw
> >>> id. When also tracking the requests using the kernel tracepoints, if
> >>> we include the hw_id from i915_gem_context, this allows us to
> >>> correlate a process with hw id fields in the OA reports.
> >> Maybe, but don't split the fence.context and fence.seqno. You should
> >> also update the igt tools using the tracepoints.
> >> -Chris
> >>
> > I would have thought the tools could deal with a different ordering :(
> 
> At least as a benefit you get to refresh your Perl skills. ;)
> 
> trace.pl and intel-gpu-overlay I think are the only two.
> 
> I guess it would be possible to smarten both up to detect where the 
> fields they need are located but maybe too much work.

That's the thinking that got us into this mess to begin with ;)

But yes, it may remain much easier to keep igt in line with the kernel
and just say no to backwards-compatibility for these devtools.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH igt] igt/perf_pmu: Speed up frequency measurement

2017-12-15 Thread Chris Wilson
Quoting Tvrtko Ursulin (2017-12-15 18:24:42)
> 
> On 15/12/2017 17:05, Chris Wilson wrote:
> > Use the normal batch_duration_ns and display the sampled frequency:
> > 
> >   Frequency: min=100, max=750, boost=750 MHz
> >   Min frequency: requested 100.0, actual 100.0
> >   Max frequency: requested 755.6, actual 755.6
> > 
> > Signed-off-by: Chris Wilson 
> > Cc: Tvrtko Ursulin 
> > ---
> >   tests/perf_pmu.c | 40 +---
> >   1 file changed, 25 insertions(+), 15 deletions(-)
> > 
> > diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
> > index d88287c17..61ae96d9a 100644
> > --- a/tests/perf_pmu.c
> > +++ b/tests/perf_pmu.c
> > @@ -931,9 +931,10 @@ test_interrupts(int gem_fd)
> >   static void
> >   test_frequency(int gem_fd)
> >   {
> > - const uint64_t duration_ns = 2e9;
> 
> I think I remember why it was this long - because in the early days test 
> was actually applying load, not modifying frequencies directly, so had 
> to wait for the frequency to ramp up.
> 
> >   uint32_t min_freq, max_freq, boost_freq;
> > - uint64_t min[2], max[2], start[2];
> > + uint64_t val[2], start[2];
> > + double min[2], max[2];
> > + unsigned long slept;
> >   igt_spin_t *spin;
> >   int fd, sysfs;
> >   
> > @@ -962,17 +963,19 @@ test_frequency(int gem_fd)
> >   igt_require(igt_sysfs_set_u32(sysfs, "gt_boost_freq_mhz", min_freq));
> >   igt_require(igt_sysfs_get_u32(sysfs, "gt_boost_freq_mhz") == 
> > min_freq);
> >   
> > + gem_quiescent_gpu(gem_fd); /* Idle to be sure the change takes effect 
> > */
> > + spin = igt_spin_batch_new(gem_fd, 0, I915_EXEC_RENDER, 0);
> >   pmu_read_multi(fd, 2, start);
> >   
> > - spin = igt_spin_batch_new(gem_fd, 0, I915_EXEC_RENDER, 0);
> > - igt_spin_batch_set_timeout(spin, duration_ns);
> > - gem_sync(gem_fd, spin->handle);
> > + slept = measured_usleep(batch_duration_ns / 1000);
> 
> Wouldn't it be more precise to read the pmu at this point?

Yes. That makes sense, I was still in busy mode where we wanted it to
stop being busy simultaneously with the timer ceasing. Thinking maybe
tieing the two together and include the time for gem_busy to report
idle. Hopefully the discrepancy is less than a microsecond at this point.

 
> > + igt_spin_batch_end(spin);
> >   
> > - pmu_read_multi(fd, 2, min);
> > - min[0] -= start[0];
> > - min[1] -= start[1];
> > + pmu_read_multi(fd, 2, val);
> > + min[0] = 1e9*(val[0] - start[0]) / slept;
> > + min[1] = 1e9*(val[1] - start[1]) / slept;
> >   
> >   igt_spin_batch_free(gem_fd, spin);
> > + gem_quiescent_gpu(gem_fd); /* Don't leak busy bo into the next phase 
> > */
> >   
> >   usleep(1e6);
> >   
> > @@ -987,17 +990,19 @@ test_frequency(int gem_fd)
> >   igt_require(igt_sysfs_set_u32(sysfs, "gt_min_freq_mhz", max_freq));
> >   igt_require(igt_sysfs_get_u32(sysfs, "gt_min_freq_mhz") == max_freq);
> >   
> > + gem_quiescent_gpu(gem_fd);
> > + spin = igt_spin_batch_new(gem_fd, 0, I915_EXEC_RENDER, 0);
> >   pmu_read_multi(fd, 2, start);
> >   
> > - spin = igt_spin_batch_new(gem_fd, 0, I915_EXEC_RENDER, 0);
> > - igt_spin_batch_set_timeout(spin, duration_ns);
> > - gem_sync(gem_fd, spin->handle);
> > + slept = measured_usleep(batch_duration_ns / 1000);
> > + igt_spin_batch_end(spin);
> >   
> > - pmu_read_multi(fd, 2, max);
> > - max[0] -= start[0];
> > - max[1] -= start[1];
> > + pmu_read_multi(fd, 2, val);
> > + max[0] = 1e9*(val[0] - start[0]) / slept;
> > + max[1] = 1e9*(val[1] - start[1]) / slept;

I was also thinking that we should
assert_within_epsilon(max[0], ref, 5), i.e. that the reported average
frequency is what we expected. That would be better than asserting that
the actual frequency was less than the requested (who knows what the
future holds).

> >   igt_spin_batch_free(gem_fd, spin);
> > + gem_quiescent_gpu(gem_fd);
> 
> Ah I see.. only for the spin batch. Why not then gem_sync or maybe we 
> should add igt_spin_batch_free_sync?

gem_quiescent_gpu goes one step further than gem_sync and says the system is
idle / parked afterwards. Which is often quite important

Yes, seems like I'm repeating this pattern often enough that throwing it
into igt_spin_batch is worthwhile. Also I want to include a spin_batch
variant that guarantees it has started executing before returning.
Sadly will require MI_STORE_DWORD so limit it's availability. I think
I'll wait for the spin_batch options to land before adding more
parameters.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t] intel_vbt_decode: Typo fixes

2017-12-15 Thread Chris Wilson
Quoting Adam Jackson (2017-12-15 19:59:36)
> Signed-off-by: Adam Jackson 
> ---
>  tools/intel_vbt_decode.c | 4 ++--
>  tools/intel_vbt_defs.h   | 6 +++---
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
> index 9d90c69d..ce7da2c0 100644
> --- a/tools/intel_vbt_decode.c
> +++ b/tools/intel_vbt_decode.c
> @@ -309,8 +309,8 @@ static const struct {
> { DEVICE_TYPE_COMPOSITE_OUTPUT, "Composite output" },
> { DEVICE_TYPE_DUAL_CHANNEL, "Dual channel" },
> { 1 << 7, "Content protection" },
> -   { DEVICE_TYPE_HIGH_SPEED_LINK, "High speel link" },
> -   { DEVICE_TYPE_LVDS_SINGALING, "LVDS signaling" },

It shall forever be known as sing-a-ling. :)
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/trace: add hw_id to gem requests trace points (rev2)

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915/trace: add hw_id to gem requests trace points (rev2)
URL   : https://patchwork.freedesktop.org/series/35420/
State : success

== Summary ==

Test kms_setmode:
Subgroup basic:
fail   -> WARN   (shard-snb) fdo#99912
Test kms_cursor_crc:
Subgroup cursor-64x64-suspend:
pass   -> INCOMPLETE (shard-hsw) fdo#103540
Test kms_flip:
Subgroup flip-vs-panning-vs-hang:
dmesg-warn -> PASS   (shard-snb) fdo#103821
Subgroup vblank-vs-suspend:
incomplete -> PASS   (shard-hsw) fdo#103375
Test gem_eio:
Subgroup in-flight-contexts:
pass   -> DMESG-WARN (shard-snb) fdo#104058
Test gem_tiled_swapping:
Subgroup non-threaded:
pass   -> INCOMPLETE (shard-snb) fdo#104218
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-primscrn-pri-indfb-draw-render:
pass   -> FAIL   (shard-hsw) fdo#101623
Test kms_vblank:
Subgroup accuracy-idle:
pass   -> FAIL   (shard-hsw) fdo#102583

fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103821 https://bugs.freedesktop.org/show_bug.cgi?id=103821
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058
fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#102583 https://bugs.freedesktop.org/show_bug.cgi?id=102583

shard-hswtotal:2678 pass:1512 dwarn:1   dfail:0   fail:12  skip:1151 
time:8692s
shard-snbtotal:2654 pass:1275 dwarn:2   dfail:0   fail:12  skip:1363 
time:7726s
Blacklisted hosts:
shard-apltotal:2712 pass:1685 dwarn:1   dfail:0   fail:25  skip:1001 
time:13877s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7510/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH igt v2 1/4] igt/perf_pmu: Tighten busy measurement

2017-12-15 Thread Chris Wilson
Quoting Tvrtko Ursulin (2017-12-15 18:16:52)
> 
> On 15/12/2017 16:10, Chris Wilson wrote:
> > Sleep for a known duration. In particular, CI once saw a measurement for
> > busyness greater than the intended batch_duration!
> > 
> > v2: Go back to starting pmu sampling outside of spinner; the GPU should
> > be idle.
> > 
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104241
> > Signed-off-by: Chris Wilson 
> > Cc: Tvrtko Ursulin 
> > ---
> > - assert_within_epsilon(val, ref, tolerance);
> > + assert_within_epsilon(val, busy ? slept : 0.f, tolerance);
> > + gem_quiescent_gpu(gem_fd);
> 
> Why you think it is needed to quiescent after each subtest? It would 
> make more sense to do so at the beginning of each, if needed, but I 
> thought it wasn't.

After the test makes sure that the spinner is completed before we move
on. We are trying to tidy up after the mess we made, and idle the system
before the next measurement.

Take your pick, before or after, we depend upon the system being in a
certain state. Or both. I picked both for the frequency subtest as the
transition to idle for it is a little more interesting (I was thinking of
gen6_rps_idle side-effects).
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t 3/4] hw-tests: Fix and update gem_bad_address

2017-12-15 Thread Chris Wilson
Quoting Petri Latvala (2017-12-13 12:58:15)
> From: Antonio Argenziano 
> 
> When writing to an invalid memory location, the HW should be clever
> enough to silently discard the write without disrupting execution.
> gem_bad_address aim at just that. The test has been updated to move away
> from the libDrm wrappers and use the IOCTL wrappers instead. Also the
> invalid address has been updated to be just outside of the GTT space.

It barely scratch the surfaces of what could be done to feed in a bad
address.

> 
> v2 (Petri): Split the directory changes to separate commits, fix
> indentation
> 
> Signed-off-by: Antonio Argenziano 
> Signed-off-by: Petri Latvala 
> ---
>  tests/hw-tests/gem_bad_address.c | 69 
> +++-
>  1 file changed, 39 insertions(+), 30 deletions(-)
> 
> diff --git a/tests/hw-tests/gem_bad_address.c 
> b/tests/hw-tests/gem_bad_address.c
> index a970dfa4..2d6112bd 100644
> --- a/tests/hw-tests/gem_bad_address.c
> +++ b/tests/hw-tests/gem_bad_address.c
> @@ -23,37 +23,53 @@
>   * Authors:
>   *Eric Anholt 
>   *Jesse Barnes  (based on gem_bad_blit.c)
> + *Antonio Argenziano 
>   *
>   */
>  
>  #include "igt.h"
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include "drm.h"
> -#include "intel_bufmgr.h"
>  
> -static drm_intel_bufmgr *bufmgr;
> -struct intel_batchbuffer *batch;
> -
> -#define BAD_GTT_DEST ((512*1024*1024)) /* past end of aperture */
> +/*
> + * This test aims at verifying that writing to an invalid location in memory,
> + * doesn't cause hangs. The store command should be ignored completely by the
> + * HW and the whole process should be transparent to the user. Therefore,
> + * the test doesn't perform any validation check but expects the wrapping
> + * execution environment to check no hangs have occurred.

igt provides the facilities to detect GPU hangs. Wrap in
igt_fork_hang_detector, finish with gem_sync. Actual machine death sadly
requires an outside body.

> + *
> + * The test needs to send a privileged batch to be able to write to the GTT.
> + */
>  
>  static void
> -bad_store(void)
> +bad_store(uint32_t fd, uint32_t engine)
>  {
> -   BEGIN_BATCH(4, 0);
> -   OUT_BATCH(MI_STORE_DWORD_IMM | MI_MEM_VIRTUAL | 1 << 21);
> -   OUT_BATCH(0);
> -   OUT_BATCH(BAD_GTT_DEST);
> -   OUT_BATCH(0xdeadbeef);
> -   ADVANCE_BATCH();
> +   struct drm_i915_gem_exec_object2 obj;
> +   struct drm_i915_gem_execbuffer2 execbuf;
> +
> +   uint32_t batch[16];
> +   int i = 0;
> +
> +   memset(, 0, sizeof(obj));
> +   memset(, 0, sizeof(execbuf));
> +
> +   execbuf.buffers_ptr = to_user_pointer();
> +   execbuf.buffer_count = 1;
> +   execbuf.flags = engine;
> +   execbuf.flags |= I915_EXEC_SECURE;

That is asking to turn off the HW validator (for the most part), and
requires drm_open_driver_master(). But since you are doing something
illegal in a context that allows you to shoot yourself in the foot,
what's the point?  What does it prove?

> -   intel_batchbuffer_flush(batch);
> +   obj.handle = gem_create(fd, 4096);
> +
> +   batch[i++] = MI_STORE_DWORD_IMM | MI_MEM_VIRTUAL;

Note that MI_STORE_DWORD doesn't even need a bad address to take over
the machine on some platforms. You should start with a validation that a
known good store works, before testing whether a bad one is skipped.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [v2,1/4] igt/perf_pmu: Tighten busy measurement

2017-12-15 Thread Patchwork
== Series Details ==

Series: series starting with [v2,1/4] igt/perf_pmu: Tighten busy measurement
URL   : https://patchwork.freedesktop.org/series/35421/
State : failure

== Summary ==

Test kms_flip:
Subgroup flip-vs-panning:
pass   -> DMESG-WARN (shard-hsw) fdo#103540
Subgroup flip-vs-panning-vs-hang:
dmesg-warn -> PASS   (shard-snb) fdo#103821
Subgroup vblank-vs-suspend:
incomplete -> PASS   (shard-hsw) fdo#103375
Subgroup blt-wf_vblank-vs-modeset-interruptible:
incomplete -> PASS   (shard-hsw)
Test perf:
Subgroup blocking:
pass   -> FAIL   (shard-hsw) fdo#102252
Test drv_suspend:
Subgroup debugfs-reader:
pass   -> FAIL   (shard-snb)

fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103821 https://bugs.freedesktop.org/show_bug.cgi?id=103821
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252

shard-hswtotal:2712 pass:1535 dwarn:2   dfail:0   fail:11  skip:1164 
time:9450s
shard-snbtotal:2712 pass:1306 dwarn:1   dfail:0   fail:14  skip:1391 
time:8022s
Blacklisted hosts:
shard-apltotal:2690 pass:1656 dwarn:1   dfail:0   fail:31  skip:1001 
time:13533s
shard-kbltotal:2677 pass:1778 dwarn:1   dfail:0   fail:33  skip:864 
time:10886s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_685/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.IGT: failure for igt/perf_pmu: Tighten measurements for most-busy

2017-12-15 Thread Patchwork
== Series Details ==

Series: igt/perf_pmu: Tighten measurements for most-busy
URL   : https://patchwork.freedesktop.org/series/35414/
State : failure

== Summary ==

Test kms_flip:
Subgroup blt-wf_vblank-vs-modeset-interruptible:
incomplete -> PASS   (shard-hsw)
Subgroup flip-vs-panning-vs-hang:
dmesg-warn -> PASS   (shard-snb) fdo#103821
Test kms_force_connector_basic:
Subgroup force-connector-state:
skip   -> INCOMPLETE (shard-snb)
Test drv_suspend:
Subgroup fence-restore-untiled:
pass   -> SKIP   (shard-snb)
Test kms_setmode:
Subgroup basic:
fail   -> PASS   (shard-hsw) fdo#99912
Test gem_exec_suspend:
Subgroup basic-s4:
fail   -> SKIP   (shard-hsw) fdo#103375

fdo#103821 https://bugs.freedesktop.org/show_bug.cgi?id=103821
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375

shard-hswtotal:2642 pass:1500 dwarn:1   dfail:0   fail:8   skip:1132 
time:8994s
shard-snbtotal:2692 pass:1292 dwarn:1   dfail:0   fail:13  skip:1385 
time:7901s
Blacklisted hosts:
shard-kbltotal:2712 pass:1799 dwarn:2   dfail:0   fail:31  skip:880 
time:11005s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_682/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH i-g-t] intel_vbt_decode: Typo fixes

2017-12-15 Thread Adam Jackson
Signed-off-by: Adam Jackson 
---
 tools/intel_vbt_decode.c | 4 ++--
 tools/intel_vbt_defs.h   | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
index 9d90c69d..ce7da2c0 100644
--- a/tools/intel_vbt_decode.c
+++ b/tools/intel_vbt_decode.c
@@ -309,8 +309,8 @@ static const struct {
{ DEVICE_TYPE_COMPOSITE_OUTPUT, "Composite output" },
{ DEVICE_TYPE_DUAL_CHANNEL, "Dual channel" },
{ 1 << 7, "Content protection" },
-   { DEVICE_TYPE_HIGH_SPEED_LINK, "High speel link" },
-   { DEVICE_TYPE_LVDS_SINGALING, "LVDS signaling" },
+   { DEVICE_TYPE_HIGH_SPEED_LINK, "High speed link" },
+   { DEVICE_TYPE_LVDS_SIGNALING, "LVDS signaling" },
{ DEVICE_TYPE_TMDS_DVI_SIGNALING, "TMDS/DVI signaling" },
{ DEVICE_TYPE_VIDEO_SIGNALING, "Video signaling" },
{ DEVICE_TYPE_DISPLAYPORT_OUTPUT, "DisplayPort output" },
diff --git a/tools/intel_vbt_defs.h b/tools/intel_vbt_defs.h
index 404569c9..e388f9ad 100644
--- a/tools/intel_vbt_defs.h
+++ b/tools/intel_vbt_defs.h
@@ -227,7 +227,7 @@ struct bdb_general_features {
 #define DEVICE_TYPE_COMPOSITE_OUTPUT   (1 << 9)
 #define DEVICE_TYPE_DUAL_CHANNEL   (1 << 8)
 #define DEVICE_TYPE_HIGH_SPEED_LINK(1 << 6)
-#define DEVICE_TYPE_LVDS_SINGALING (1 << 5)
+#define DEVICE_TYPE_LVDS_SIGNALING (1 << 5)
 #define DEVICE_TYPE_TMDS_DVI_SIGNALING (1 << 4)
 #define DEVICE_TYPE_VIDEO_SIGNALING(1 << 3)
 #define DEVICE_TYPE_DISPLAYPORT_OUTPUT (1 << 2)
@@ -243,7 +243,7 @@ struct bdb_general_features {
 DEVICE_TYPE_MIPI_OUTPUT |  \
 DEVICE_TYPE_COMPOSITE_OUTPUT | \
 DEVICE_TYPE_DUAL_CHANNEL | \
-DEVICE_TYPE_LVDS_SINGALING |   \
+DEVICE_TYPE_LVDS_SIGNALING |   \
 DEVICE_TYPE_TMDS_DVI_SIGNALING |   \
 DEVICE_TYPE_VIDEO_SIGNALING |  \
 DEVICE_TYPE_DISPLAYPORT_OUTPUT |   \
@@ -253,7 +253,7 @@ struct bdb_general_features {
(DEVICE_TYPE_INTERNAL_CONNECTOR |   \
 DEVICE_TYPE_MIPI_OUTPUT |  \
 DEVICE_TYPE_COMPOSITE_OUTPUT | \
-DEVICE_TYPE_LVDS_SINGALING |   \
+DEVICE_TYPE_LVDS_SIGNALING |   \
 DEVICE_TYPE_TMDS_DVI_SIGNALING |   \
 DEVICE_TYPE_VIDEO_SIGNALING |  \
 DEVICE_TYPE_DISPLAYPORT_OUTPUT |   \
-- 
2.14.3

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t 2/4] tests: Move gem_bad_address to hw-tests

2017-12-15 Thread Antonio Argenziano



On 13/12/17 05:26, Chris Wilson wrote:

Quoting Petri Latvala (2017-12-13 12:58:14)

Since the test is considered to be HW focused, meaning that it doesn't
really exercise the driver but rather an HW feature, it is placed in
tests/hw-tests.


Do we really want to keep this test at all? It's an interesting debate


This test has been around for a long time now so I think keeping it 
around would not be a problem, plus it actually gets fixed in this series.


-Antonio


whether we want to show how trivial it is to subvert the kernel and HW
(in some circumstances). > -Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.IGT: failure for igt/perf_pmu: Tighten busy measurement

2017-12-15 Thread Patchwork
== Series Details ==

Series: igt/perf_pmu: Tighten busy measurement
URL   : https://patchwork.freedesktop.org/series/35412/
State : failure

== Summary ==

Test kms_flip:
Subgroup flip-vs-panning-vs-hang:
dmesg-warn -> PASS   (shard-snb) fdo#103821
Subgroup vblank-vs-suspend:
incomplete -> PASS   (shard-hsw) fdo#103375
Subgroup blt-wf_vblank-vs-modeset-interruptible:
incomplete -> PASS   (shard-hsw)
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
fail   -> PASS   (shard-snb) fdo#101623 +1
Subgroup fbc-rgb101010-draw-pwrite:
pass   -> SKIP   (shard-hsw)
Test kms_busy:
Subgroup extended-pageflip-modeset-hang-oldfb-render-c:
pass   -> SKIP   (shard-hsw)
Subgroup extended-modeset-hang-newfb-render-a:
pass   -> SKIP   (shard-hsw)
Test gem_ppgtt:
Subgroup blt-vs-render-ctxn:
pass   -> INCOMPLETE (shard-snb)

fdo#103821 https://bugs.freedesktop.org/show_bug.cgi?id=103821
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623

shard-hswtotal:2712 pass:1534 dwarn:1   dfail:0   fail:10  skip:1167 
time:9377s
shard-snbtotal:2668 pass:1287 dwarn:1   dfail:0   fail:10  skip:1369 
time:7756s
Blacklisted hosts:
shard-apltotal:2712 pass:1680 dwarn:1   dfail:0   fail:30  skip:1001 
time:14042s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_681/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for tests/gem_ctx_param: Update invalid param

2017-12-15 Thread Patchwork
== Series Details ==

Series: tests/gem_ctx_param: Update invalid param
URL   : https://patchwork.freedesktop.org/series/35438/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
c0be3310715e2f744b892c51f09e62273bcc8e57 tests/kms_frontbuffer_tracking: 
Correctly handle debugfs errors

with latest DRM-Tip kernel build CI_DRM_3524
d4fa2d8c0c1d drm-tip: 2017y-12m-15d-18h-22m-22s UTC integration manifest

Testlist changes:
+igt@gem_ctx_param@root-set-priority
+igt@gem_ctx_param@root-set-priority-invalid-value
+igt@gem_ctx_param@user-set-priority
+igt@gem_ctx_param@user-set-priority-invalid-value

Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
fail   -> PASS   (fi-gdg-551) fdo#102575
Test gem_sync:
Subgroup basic-all:
dmesg-fail -> FAIL   (fi-blb-e6850) fdo#104259
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS   (fi-snb-2520m) fdo#103713
Test kms_psr_sink_crc:
Subgroup psr_basic:
pass   -> DMESG-WARN (fi-skl-6700hq) fdo#101144

fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#104259 https://bugs.freedesktop.org/show_bug.cgi?id=104259
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:435s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:442s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:0   fail:1   skip:64  
time:389s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:507s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:278s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:495s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:498s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:490s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:470s
fi-elk-e7500 total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551   total:288  pass:179  dwarn:1   dfail:0   fail:0   skip:108 
time:264s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:537s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:406s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:413s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:472s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:428s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:481s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:520s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:474s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:523s
fi-pnv-d510  total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:594s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:453s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:531s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:557s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:507s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:448s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:556s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:414s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:588s
fi-cnl-y total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:624s
fi-glk-dsi   total:288  pass:257  dwarn:0   dfail:0   fail:1   skip:30  
time:489s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:509s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_688/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for trace.pl: handle request tracepoint fields regardless of their order

2017-12-15 Thread Patchwork
== Series Details ==

Series: trace.pl: handle request tracepoint fields regardless of their order
URL   : https://patchwork.freedesktop.org/series/35434/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
c0be3310715e2f744b892c51f09e62273bcc8e57 tests/kms_frontbuffer_tracking: 
Correctly handle debugfs errors

with latest DRM-Tip kernel build CI_DRM_3524
d4fa2d8c0c1d drm-tip: 2017y-12m-15d-18h-22m-22s UTC integration manifest

No testlist changes.

Test gem_exec_suspend:
Subgroup basic-s4-devices:
dmesg-warn -> PASS   (fi-elk-e7500) fdo#103989
Test gem_sync:
Subgroup basic-all:
dmesg-fail -> FAIL   (fi-blb-e6850) fdo#104259

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#104259 https://bugs.freedesktop.org/show_bug.cgi?id=104259

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:433s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:444s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:0   fail:1   skip:64  
time:390s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:511s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:279s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:496s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:502s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:487s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:473s
fi-elk-e7500 total:224  pass:164  dwarn:14  dfail:0   fail:0   skip:45 
fi-gdg-551   total:288  pass:178  dwarn:1   dfail:0   fail:1   skip:108 
time:269s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:533s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:415s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:482s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:427s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:481s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:519s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:469s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:528s
fi-pnv-d510  total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:599s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:444s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:537s
fi-skl-6700hqtotal:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:558s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:501s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:452s
fi-snb-2520m total:245  pass:211  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:412s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:598s
fi-cnl-y total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:621s
fi-glk-dsi   total:151  pass:137  dwarn:0   dfail:0   fail:0   skip:13 
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:509s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_687/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH v4 3/5] drm/i915/guc: Implement dynamic WOPCM partitioning

2017-12-15 Thread Yaodong Li

On 12/15/2017 02:21 AM, Joonas Lahtinen wrote:

On Thu, 2017-12-14 at 20:55 -0800, Yaodong Li wrote:

On 12/14/2017 03:43 AM, Joonas Lahtinen wrote:

On Wed, 2017-12-13 at 14:59 -0800, Yaodong Li wrote:

On 12/13/2017 01:34 PM, Michal Wajdeczko wrote:

On Wed, 13 Dec 2017 19:19:06 +0100, Yaodong Li 
wrote:


On 12/13/2017 01:11 AM, Joonas Lahtinen wrote:

On Tue, 2017-12-12 at 14:56 -0800, Jackie Li wrote:

Hardware may have specific restrictions on GuC WOPCM partition
size versus HuC firmware size. With static WOPCM partitioning,
there's no way to adjust the GuC WOPCM partition size based on
the actual HuC firmware size, so that GuC/HuC loading failure
would occur even if there was enough WOPCM space for both
GuC and HuC firmware.

WOPCM being a shared feature of the hardware, it should not go under
intel_guc_ prefix.

There should be a clear division of what is specific to GuC feature
only and what is just a feature that happens to be used by GuC (and
equally can be used by HuC too).

the intel_guc_wopcm here only refers to the wopcm used by
GuC, this structure only defines the GuC related wopcm info.
(wopcm partition for GuC). We only need to set these values
(defined in this structure) to GuC registers. And this structure
should never be touched if GuC was disabled. so it should be
a part of GuC.


But note that yours intel_guc_wopcm is just one of many wopcm partitions.
I think it would be a good idea to create "intel_wopcm.c|h" and keep
all related code and data there (including verification of early setup
done by bios, wopcpm reporting, partitioning).

Then we can do rest of the programming right there or just take values
that
will be programmed individually by interested components (but former is
preferred to avoid spreading single feature code over too many places)


The KMD only needs to take care of the setup of the GuC WOPCM partition.
Other
HW WOPCM (e.g HuC) usages are all transparent to kernel driver. Plus,
the GuC WOPM
partitioning is needed only when GuC is enabled and uc firmwares are
loaded correctly.
The only reason for us to have an intel_wopcm is to maintain the overall
WOPCM info
such as WOPCM size and base. However, it's not necessary since we can
reuse existing
driver code to get these info.

I'd go with Michal here, the WOPCM is its own entity in existence.
Partitioning defintely sounds like it should be intel_wopcm stuff,
which may yield intel_wopcm_partition under "guc", so then you are
still able to reference "guc->wopcm.base" where it makes sense.

And how that partition is programmed to GuC registers for it to be
used, is then stuff to go under intel_guc. And then you have another
intel_wopcm_partition for "huc".

We should avoid incorrect abstractions, just to avoid a few lines of
code. That's how the hardware features seem to exist, that's how we
should map them in the code.

Thanks for your comments. but I have some different opinions.

Agreed that wopcm exists no matter GuC is enabled or not. And we
can reuse existing code to get/verify related info we need for driver level
description of wopcm. that one reason I don't think we need intel_wopcm.

Regarding the partitioning - We need it only when GuC was enabled. In this
case, it makes sense to do it at least in uc level. Plus, from HW point
of view,
HW only relies on GuC wopcm offset and size to determine the layout
(or say partitions) of the wopcm. In this case, a good abstraction of
the HW
interface would be:
struct guc_wopcm {
  u32 offset;
  u32 size;
};
guc_wopcm_setup() - which does actual HW status check and GuC wopcm
setup.
guc_wopcm_init() - which init/verify the offset and size values
required by HW.
That's the second reason I think use of intel_guc_wopcm.c is more accurate
since it reflected the actual HW interface and could be enabled/disabled
along with GuC code.

Regarding the generic abstraction of intel_wopcm_partition for both GuC
& HuC.
I am not sure what's the benefit of such an abstraction. For two reasons:
a) HW is only aware of the GuC WOPCM boundaries and doesn't provide any
interface
  to configure the partition for HuC, which means we even won't use
these info in
  the rest of the driver code.
b) For debugging and tracking propose, we can easily get overall layout
of WOPCM
  by just using overall wopcm description and GuC wopcm usage.


It's literally an entity called WOPCM, which is partitioned and one of
the partitions is used for GuC. I don't see how many more resons you
need for intel_wopcm prefix, struct intel_wopcm_partition abstraction
and struct intel_wopcm_partition instance for GuC?

Why would we try to make the naming scheme to imply something else,
it'll make the developer's life harder when trying to look at it. I had
to go look at the spec to make any sense of this, so let's try to avoid
that for the next developer.

Actually I started the patch with both intel_wopcm and intel_wopcm_partition
defined and implemented. The 

[Intel-gfx] [PATCH i-g-t] tests/gem_ctx_param: Update invalid param

2017-12-15 Thread Antonio Argenziano
Since commit: drm/i915/scheduler: Support user-defined priorities, the
driver support an extra context param to set context's priority. Add
tests for that interface and update invalid tests.

Signed-off-by: Antonio Argenziano 
Cc: Chris Wilson 
Cc: Michal Winiarski 
---
 tests/gem_ctx_param.c | 77 ++-
 1 file changed, 76 insertions(+), 1 deletion(-)

diff --git a/tests/gem_ctx_param.c b/tests/gem_ctx_param.c
index c20ae1ee..9a222e60 100644
--- a/tests/gem_ctx_param.c
+++ b/tests/gem_ctx_param.c
@@ -25,6 +25,7 @@
  */
 
 #include "igt.h"
+#include 
 
 IGT_TEST_DESCRIPTION("Basic test for context set/get param input validation.");
 
@@ -136,11 +137,85 @@ igt_main
gem_context_set_param(fd, );
}
 
+#define MAX_PRIO 1023
+#define MIN_PRIO -MAX_PRIO
+#define DEF_PRIO 0
+
+   arg.param = I915_CONTEXT_PARAM_PRIORITY;
+
+   igt_subtest("root-set-priority") {
+   arg.ctx_id = ctx;
+   arg.size = 0;
+
+   for (int i = MIN_PRIO; i <= MAX_PRIO; i += 1023) {
+   arg.value = i;
+   gem_context_set_param(fd, );
+
+   gem_context_get_param(fd, );
+   igt_assert(arg.value == i); /* Verify prio was set */
+   }
+   }
+
+   igt_subtest("root-set-priority-invalid-value") {
+   int prio_levels[] = {INT_MIN, MIN_PRIO - 1, MAX_PRIO + 1, 
INT_MAX};
+   int old_value;
+   arg.ctx_id = ctx;
+
+   gem_context_get_param(fd, );
+   old_value = arg.value;
+
+   for (int i = 0; i < (sizeof(prio_levels) / sizeof(int)); i++) {
+   arg.value = prio_levels[i];
+   igt_assert_eq(__gem_context_set_param(fd, ), 
-EINVAL);
+
+   gem_context_get_param(fd, );
+   igt_assert(arg.value == old_value); /* Verify prio was 
not set */
+   }
+   }
+
+   igt_subtest("user-set-priority") {
+   arg.size = 0;
+
+   igt_fork(child, 1) {
+   igt_drop_root();
+   for (int i = MIN_PRIO; i <= DEF_PRIO; i += 1023) {
+   arg.value = i;
+   gem_context_set_param(fd, );
+
+   gem_context_get_param(fd, );
+   igt_assert(arg.value == i); /* Verify prio was 
set */
+   }
+   }
+
+   igt_waitchildren();
+   }
+
+   igt_subtest("user-set-priority-invalid-value") {
+   int prio_levels[] = {DEF_PRIO + 1, MAX_PRIO};
+   arg.ctx_id = ctx;
+   arg.size = 0;
+
+   igt_fork(child, 1) {
+   igt_drop_root();
+
+   for (int i = 0; i < (sizeof(prio_levels) / 
sizeof(int)); i++) {
+   arg.value = prio_levels[i];
+   igt_assert_eq(__gem_context_set_param(fd, 
), -EPERM);
+
+   gem_context_get_param(fd, );
+   igt_assert(arg.value == DEF_PRIO); /* Verify 
prio was not set */
+   }
+   }
+
+   igt_waitchildren();
+   }
+
+
/* NOTE: This testcase intentionally tests for the next free parameter
 * to catch ABI extensions. Don't "fix" this testcase without adding all
 * the tests for the new param first.
 */
-   arg.param = I915_CONTEXT_PARAM_BANNABLE + 1;
+   arg.param = I915_CONTEXT_PARAM_PRIORITY + 1;
 
igt_subtest("invalid-param-get") {
arg.ctx_id = ctx;
-- 
2.14.2

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.IGT: success for igt: Exercise creating context with shared GTT

2017-12-15 Thread Patchwork
== Series Details ==

Series: igt: Exercise creating context with shared GTT
URL   : https://patchwork.freedesktop.org/series/35406/
State : success

== Summary ==

Warning: bzip IGTPW_680/shard-snb5/results13.json.bz2 wasn't in correct JSON 
format
Test gem_exec_suspend:
Subgroup basic-s3:
incomplete -> PASS   (shard-hsw) fdo#103540
Test gem_tiled_swapping:
Subgroup non-threaded:
pass   -> INCOMPLETE (shard-hsw) fdo#104218
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-blt:
fail   -> PASS   (shard-snb) fdo#101623
Test drv_module_reload:
Subgroup basic-reload-inject:
pass   -> DMESG-WARN (shard-snb) fdo#102707

fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#102707 https://bugs.freedesktop.org/show_bug.cgi?id=102707

shard-hswtotal:2666 pass:1504 dwarn:1   dfail:0   fail:10  skip:1150 
time:9348s
shard-snbtotal:2646 pass:1276 dwarn:3   dfail:0   fail:12  skip:1355 
time:8027s
Blacklisted hosts:
shard-apltotal:2723 pass:1685 dwarn:1   dfail:0   fail:25  skip:1012 
time:13955s
shard-kbltotal:2723 pass:1805 dwarn:2   dfail:0   fail:26  skip:890 
time:11149s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_680/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/trace: add hw_id to gem requests trace points (rev2)

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915/trace: add hw_id to gem requests trace points (rev2)
URL   : https://patchwork.freedesktop.org/series/35420/
State : success

== Summary ==

Series 35420v2 drm/i915/trace: add hw_id to gem requests trace points
https://patchwork.freedesktop.org/api/1.0/series/35420/revisions/2/mbox/

Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS   (fi-snb-2520m) fdo#103713
pass   -> DMESG-WARN (fi-kbl-r) fdo#104172 +1
Test kms_psr_sink_crc:
Subgroup psr_basic:
dmesg-warn -> PASS   (fi-skl-6700hq) fdo#101144

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:434s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:440s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:1   fail:0   skip:64  
time:395s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:506s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:281s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:491s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:502s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:487s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:483s
fi-elk-e7500 total:224  pass:163  dwarn:14  dfail:1   fail:0   skip:45 
fi-gdg-551   total:288  pass:178  dwarn:1   dfail:0   fail:1   skip:108 
time:266s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:528s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:408s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:417s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:390s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:483s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:427s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:482s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:525s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:470s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:526s
fi-pnv-d510  total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:598s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:446s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:534s
fi-skl-6700hqtotal:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:558s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:493s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:449s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:559s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:424s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:600s
fi-cnl-y total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:620s
fi-glk-dsi   total:288  pass:257  dwarn:0   dfail:0   fail:1   skip:30  
time:489s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:509s

84ac2c35b2ab5cb0326911fdea3bfb5f7e479b3b drm-tip: 2017y-12m-15d-15h-36m-28s UTC 
integration manifest
8248caf04938 drm/i915/trace: add hw_id to gem requests trace points

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7510/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH igt] igt/perf_pmu: Speed up frequency measurement

2017-12-15 Thread Tvrtko Ursulin


On 15/12/2017 17:05, Chris Wilson wrote:

Use the normal batch_duration_ns and display the sampled frequency:

Frequency: min=100, max=750, boost=750 MHz
Min frequency: requested 100.0, actual 100.0
Max frequency: requested 755.6, actual 755.6

Signed-off-by: Chris Wilson 
Cc: Tvrtko Ursulin 
---
  tests/perf_pmu.c | 40 +---
  1 file changed, 25 insertions(+), 15 deletions(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index d88287c17..61ae96d9a 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -931,9 +931,10 @@ test_interrupts(int gem_fd)
  static void
  test_frequency(int gem_fd)
  {
-   const uint64_t duration_ns = 2e9;


I think I remember why it was this long - because in the early days test 
was actually applying load, not modifying frequencies directly, so had 
to wait for the frequency to ramp up.



uint32_t min_freq, max_freq, boost_freq;
-   uint64_t min[2], max[2], start[2];
+   uint64_t val[2], start[2];
+   double min[2], max[2];
+   unsigned long slept;
igt_spin_t *spin;
int fd, sysfs;
  
@@ -962,17 +963,19 @@ test_frequency(int gem_fd)

igt_require(igt_sysfs_set_u32(sysfs, "gt_boost_freq_mhz", min_freq));
igt_require(igt_sysfs_get_u32(sysfs, "gt_boost_freq_mhz") == min_freq);
  
+	gem_quiescent_gpu(gem_fd); /* Idle to be sure the change takes effect */

+   spin = igt_spin_batch_new(gem_fd, 0, I915_EXEC_RENDER, 0);
pmu_read_multi(fd, 2, start);
  
-	spin = igt_spin_batch_new(gem_fd, 0, I915_EXEC_RENDER, 0);

-   igt_spin_batch_set_timeout(spin, duration_ns);
-   gem_sync(gem_fd, spin->handle);
+   slept = measured_usleep(batch_duration_ns / 1000);


Wouldn't it be more precise to read the pmu at this point?


+   igt_spin_batch_end(spin);
  
-	pmu_read_multi(fd, 2, min);

-   min[0] -= start[0];
-   min[1] -= start[1];
+   pmu_read_multi(fd, 2, val);
+   min[0] = 1e9*(val[0] - start[0]) / slept;
+   min[1] = 1e9*(val[1] - start[1]) / slept;
  
  	igt_spin_batch_free(gem_fd, spin);

+   gem_quiescent_gpu(gem_fd); /* Don't leak busy bo into the next phase */
  
  	usleep(1e6);
  
@@ -987,17 +990,19 @@ test_frequency(int gem_fd)

igt_require(igt_sysfs_set_u32(sysfs, "gt_min_freq_mhz", max_freq));
igt_require(igt_sysfs_get_u32(sysfs, "gt_min_freq_mhz") == max_freq);
  
+	gem_quiescent_gpu(gem_fd);

+   spin = igt_spin_batch_new(gem_fd, 0, I915_EXEC_RENDER, 0);
pmu_read_multi(fd, 2, start);
  
-	spin = igt_spin_batch_new(gem_fd, 0, I915_EXEC_RENDER, 0);

-   igt_spin_batch_set_timeout(spin, duration_ns);
-   gem_sync(gem_fd, spin->handle);
+   slept = measured_usleep(batch_duration_ns / 1000);
+   igt_spin_batch_end(spin);
  
-	pmu_read_multi(fd, 2, max);

-   max[0] -= start[0];
-   max[1] -= start[1];
+   pmu_read_multi(fd, 2, val);
+   max[0] = 1e9*(val[0] - start[0]) / slept;
+   max[1] = 1e9*(val[1] - start[1]) / slept;
  
  	igt_spin_batch_free(gem_fd, spin);

+   gem_quiescent_gpu(gem_fd);


Ah I see.. only for the spin batch. Why not then gem_sync or maybe we 
should add igt_spin_batch_free_sync?


Regards,

Tvrtko

  
  	/*

 * Restore min/max.
@@ -1008,8 +1013,13 @@ test_frequency(int gem_fd)
 min_freq, igt_sysfs_get_u32(sysfs, "gt_min_freq_mhz"));
close(fd);
  
+	igt_info("Min frequency: requested %.1f, actual %.1f\n",

+min[0], min[1]);
+   igt_info("Max frequency: requested %.1f, actual %.1f\n",
+max[0], max[1]);
igt_assert(min[0] < max[0]);
-   igt_assert(min[1] < max[1]);
+   igt_assert(min[1] <= min[0]);
+   igt_assert(max[1] <= max[0]);
  }
  
  static bool wait_for_rc6(int fd)



___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.BAT: warning for igt/perf_pmu: Speed up frequency measurement

2017-12-15 Thread Patchwork
== Series Details ==

Series: igt/perf_pmu: Speed up frequency measurement
URL   : https://patchwork.freedesktop.org/series/35429/
State : warning

== Summary ==

IGT patchset tested on top of latest successful build
c0be3310715e2f744b892c51f09e62273bcc8e57 tests/kms_frontbuffer_tracking: 
Correctly handle debugfs errors

with latest DRM-Tip kernel build CI_DRM_3523
84ac2c35b2ab drm-tip: 2017y-12m-15d-15h-36m-28s UTC integration manifest

No testlist changes.

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test gem_ringfill:
Subgroup basic-default:
pass   -> SKIP   (fi-bsw-n3050)
Test gem_sync:
Subgroup basic-all:
dmesg-fail -> FAIL   (fi-blb-e6850) fdo#104259
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS   (fi-snb-2520m) fdo#103713
Subgroup suspend-read-crc-pipe-c:
dmesg-warn -> PASS   (fi-kbl-r) fdo#104172
Test kms_psr_sink_crc:
Subgroup psr_basic:
dmesg-warn -> PASS   (fi-skl-6700hq) fdo#101144

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#104259 https://bugs.freedesktop.org/show_bug.cgi?id=104259
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:436s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:442s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:0   fail:1   skip:64  
time:389s
fi-bsw-n3050 total:288  pass:241  dwarn:0   dfail:0   fail:0   skip:47  
time:509s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:280s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:497s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:496s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:487s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:475s
fi-elk-e7500 total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551   total:288  pass:178  dwarn:1   dfail:0   fail:1   skip:108 
time:265s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:529s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:409s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:413s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:391s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:482s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:428s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:474s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:524s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:464s
fi-kbl-r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:522s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:444s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:531s
fi-skl-6700hqtotal:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:563s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:487s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:446s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:554s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:412s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:596s
fi-cnl-y total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:649s
fi-glk-dsi   total:288  pass:257  dwarn:0   dfail:0   fail:1   skip:30  
time:487s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:519s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_686/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH igt v2 1/4] igt/perf_pmu: Tighten busy measurement

2017-12-15 Thread Tvrtko Ursulin


On 15/12/2017 16:10, Chris Wilson wrote:

Sleep for a known duration. In particular, CI once saw a measurement for
busyness greater than the intended batch_duration!

v2: Go back to starting pmu sampling outside of spinner; the GPU should
be idle.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104241
Signed-off-by: Chris Wilson 
Cc: Tvrtko Ursulin 
---
  tests/perf_pmu.c | 22 ++
  1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index db7696115..38fd05dc9 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -103,7 +103,7 @@ static void pmu_read_multi(int fd, unsigned int num, 
uint64_t *val)
igt_assert_f((double)(x) <= (1.0 + (tolerance)) * (double)(ref) && \
 (double)(x) >= (1.0 - (tolerance)) * (double)(ref), \
 "'%s' != '%s' (%f not within %f%% tolerance of %f)\n",\
-#x, #ref, (double)(x), (tolerance) * 100.0, (double)ref)
+#x, #ref, (double)(x), (tolerance) * 100.0, (double)(ref))
  
  /*

   * Helper for cases where we assert on time spent sleeping (directly or
@@ -133,30 +133,28 @@ static unsigned int e2ring(int gem_fd, const struct 
intel_execution_engine2 *e)
  static void
  single(int gem_fd, const struct intel_execution_engine2 *e, bool busy)
  {
-   double ref = busy ? batch_duration_ns : 0.0f;
+   unsigned long slept;
igt_spin_t *spin;
uint64_t val;
int fd;
  
  	fd = open_pmu(I915_PMU_ENGINE_BUSY(e->class, e->instance));
  
-	if (busy) {

+   if (busy)
spin = igt_spin_batch_new(gem_fd, 0, e2ring(gem_fd, e), 0);
-   igt_spin_batch_set_timeout(spin, batch_duration_ns);
-   } else {
-   usleep(batch_duration_ns / 1000);
-   }
+   else
+   spin = NULL;
  
-	if (busy)

-   gem_sync(gem_fd, spin->handle);
+   slept = measured_usleep(batch_duration_ns / 1000);
+   igt_spin_batch_end(spin);
  
  	val = pmu_read_single(fd);
  
-	if (busy)

-   igt_spin_batch_free(gem_fd, spin);
+   igt_spin_batch_free(gem_fd, spin);
close(fd);
  
-	assert_within_epsilon(val, ref, tolerance);

+   assert_within_epsilon(val, busy ? slept : 0.f, tolerance);
+   gem_quiescent_gpu(gem_fd);


Why you think it is needed to quiescent after each subtest? It would 
make more sense to do so at the beginning of each, if needed, but I 
thought it wasn't.


Regards,

Tvrtko


  }
  
  static void log_busy(int fd, unsigned int num_engines, uint64_t *val)



___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/userptr: Probe vma range before gup (rev5)

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915/userptr: Probe vma range before gup (rev5)
URL   : https://patchwork.freedesktop.org/series/35394/
State : success

== Summary ==

Test kms_frontbuffer_tracking:
Subgroup fbc-suspend:
pass   -> INCOMPLETE (shard-hsw) fdo#103540 +2
Subgroup fbc-1p-offscren-pri-shrfb-draw-blt:
fail   -> PASS   (shard-snb) fdo#101623
Test gem_softpin:
Subgroup noreloc-s3:
pass   -> SKIP   (shard-snb) fdo#102365 +1
Test gem_eio:
Subgroup in-flight-contexts:
dmesg-warn -> PASS   (shard-snb) fdo#104058

fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058

shard-hswtotal:2658 pass:1508 dwarn:1   dfail:0   fail:10  skip:1138 
time:9232s
shard-snbtotal:2712 pass:1306 dwarn:1   dfail:0   fail:13  skip:1392 
time:7879s
Blacklisted hosts:
shard-apltotal:2712 pass:1685 dwarn:1   dfail:0   fail:24  skip:1001 
time:13867s
shard-kbltotal:2712 pass:1804 dwarn:1   dfail:0   fail:28  skip:879 
time:11010s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7508/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH v2] drm/i915/trace: add hw_id to gem requests trace points

2017-12-15 Thread Lionel Landwerlin
When monitoring the GPU with i915 perf, reports are tagged with a hw
id. When also tracking the requests using the kernel tracepoints, if
we include the hw_id from i915_gem_context, this allows us to
correlate a process with hw id fields in the OA reports.

v2: Place hw_id at the end of the tracepoint to not disrupt too much
existing tools (Chris)

Signed-off-by: Lionel Landwerlin 
---
 drivers/gpu/drm/i915/i915_trace.h | 18 --
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_trace.h 
b/drivers/gpu/drm/i915/i915_trace.h
index 4e76768ffa95..aa842596996d 100644
--- a/drivers/gpu/drm/i915/i915_trace.h
+++ b/drivers/gpu/drm/i915/i915_trace.h
@@ -620,6 +620,7 @@ TRACE_EVENT(i915_gem_request_queue,
 __field(u32, ctx)
 __field(u32, seqno)
 __field(u32, flags)
+__field(u32, hw_id)
 ),
 
TP_fast_assign(
@@ -628,11 +629,12 @@ TRACE_EVENT(i915_gem_request_queue,
   __entry->ctx = req->fence.context;
   __entry->seqno = req->fence.seqno;
   __entry->flags = flags;
+  __entry->hw_id = req->ctx->hw_id;
   ),
 
-   TP_printk("dev=%u, ring=%u, ctx=%u, seqno=%u, flags=0x%x",
+   TP_printk("dev=%u, ring=%u, ctx=%u, seqno=%u, flags=0x%x, hw_id=%u",
  __entry->dev, __entry->ring, __entry->ctx, __entry->seqno,
- __entry->flags)
+ __entry->flags, __entry->hw_id)
 );
 
 DECLARE_EVENT_CLASS(i915_gem_request,
@@ -645,6 +647,7 @@ DECLARE_EVENT_CLASS(i915_gem_request,
 __field(u32, ring)
 __field(u32, seqno)
 __field(u32, global)
+__field(u32, hw_id)
 ),
 
TP_fast_assign(
@@ -653,11 +656,12 @@ DECLARE_EVENT_CLASS(i915_gem_request,
   __entry->ctx = req->fence.context;
   __entry->seqno = req->fence.seqno;
   __entry->global = req->global_seqno;
+  __entry->hw_id = req->ctx->hw_id;
   ),
 
-   TP_printk("dev=%u, ring=%u, ctx=%u, seqno=%u, global=%u",
+   TP_printk("dev=%u, ring=%u, ctx=%u, seqno=%u, global=%u, hw_id=%u",
  __entry->dev, __entry->ring, __entry->ctx, __entry->seqno,
- __entry->global)
+ __entry->global, __entry->hw_id)
 );
 
 DEFINE_EVENT(i915_gem_request, i915_gem_request_add,
@@ -688,6 +692,7 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw,
 __field(u32, global_seqno)
 __field(u32, ctx)
 __field(u32, port)
+__field(u32, hw_id)
),
 
TP_fast_assign(
@@ -697,12 +702,13 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw,
   __entry->seqno = req->fence.seqno;
   __entry->global_seqno = req->global_seqno;
   __entry->port = port;
+  __entry->hw_id = req->ctx->hw_id;
  ),
 
-   TP_printk("dev=%u, ring=%u, ctx=%u, seqno=%u, global=%u, 
port=%u",
+   TP_printk("dev=%u, ring=%u, ctx=%u, seqno=%u, global=%u, 
port=%u, hw_id=%u",
  __entry->dev, __entry->ring, __entry->ctx,
  __entry->seqno, __entry->global_seqno,
- __entry->port)
+ __entry->port, __entry->hw_id)
 );
 
 DEFINE_EVENT(i915_gem_request_hw, i915_gem_request_in,
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH i-g-t] trace.pl: handle request tracepoint fields regardless of their order

2017-12-15 Thread Lionel Landwerlin
It doesn't look like tracepoint have any guarantee to have always the
same ordering of their parameter. Instead of relying on a predefined
regexp, let's split the parameters on commas and access the values
through a map.

Signed-off-by: Lionel Landwerlin 
---
 scripts/trace.pl | 30 --
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/scripts/trace.pl b/scripts/trace.pl
index aed9b20d..41b1ae46 100755
--- a/scripts/trace.pl
+++ b/scripts/trace.pl
@@ -302,15 +302,25 @@ die if scalar(@args);
 
 @ARGV = @args;
 
+sub params_to_map
+{
+my @arr = split /,\s*/, $_;
+my %keyvals = ();
+foreach my $el (@arr) {
+my @keyval = split /=/, $el;
+$keyvals{$keyval[0]} = $keyval[1];
+}
+return %keyvals;
+}
+
 sub parse_req
 {
my ($line, $tp) = @_;
-   state %cache;
-
-   $cache{$tp} = qr/(\d+)\.(\d+):.*$tp.*ring=(\d+), ctx=(\d+), 
seqno=(\d+), global(?:_seqno)?=(\d+)/ unless exists $cache{$tp};
 
-   if ($line =~ $cache{$tp}) {
-   return ($1, $2, $3, $4, $5, $6);
+   if ($line =~ /(\d+)\.(\d+):.*$tp:\s*(.*)/) {
+   my %params = params_to_map($3);
+   return ($1, $2, $params{"ring"}, $params{"ctx"}, 
$params{"seqno"},
+   exists $params{"global"} ? $params{"global"} : 
$params{"global_seqno"});
} else {
return undef;
}
@@ -319,12 +329,12 @@ sub parse_req
 sub parse_req_hw
 {
my ($line, $tp) = @_;
-   state %cache;
-
-   $cache{$tp} = qr/(\d+)\.(\d+):.*$tp.*ring=(\d+), ctx=(\d+), 
seqno=(\d+), global(?:_seqno)?=(\d+), port=(\d+)/ unless exists $cache{$tp};
 
-   if ($line =~ $cache{$tp}) {
-   return ($1, $2, $3, $4, $5, $6, $7);
+   if ($line =~ /(\d+)\.(\d+):.*$tp:\s*(.*)/) {
+   my %params = params_to_map($3);
+   return ($1, $2, $params{"ring"}, $params{"ctx"}, 
$params{"seqno"},
+   exists $params{"global"} ? $params{"global"} : 
$params{"global_seqno"},
+   $params{"port"});
} else {
return undef;
}
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v2,1/4] igt/perf_pmu: Tighten busy measurement

2017-12-15 Thread Patchwork
== Series Details ==

Series: series starting with [v2,1/4] igt/perf_pmu: Tighten busy measurement
URL   : https://patchwork.freedesktop.org/series/35421/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
c0be3310715e2f744b892c51f09e62273bcc8e57 tests/kms_frontbuffer_tracking: 
Correctly handle debugfs errors

with latest DRM-Tip kernel build CI_DRM_3523
84ac2c35b2ab drm-tip: 2017y-12m-15d-15h-36m-28s UTC integration manifest

No testlist changes.

Test kms_frontbuffer_tracking:
Subgroup basic:
incomplete -> SKIP   (fi-elk-e7500) fdo#103989 +1
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass   -> DMESG-WARN (fi-kbl-r) fdo#104172 +1
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS   (fi-snb-2520m) fdo#103713
Test kms_psr_sink_crc:
Subgroup psr_basic:
dmesg-warn -> PASS   (fi-skl-6700hq) fdo#101144

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:435s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:441s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:1   fail:0   skip:64  
time:401s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:512s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:278s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:496s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:500s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:492s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:482s
fi-elk-e7500 total:229  pass:167  dwarn:14  dfail:1   fail:0   skip:46 
fi-gdg-551   total:288  pass:178  dwarn:1   dfail:0   fail:1   skip:108 
time:269s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:541s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:413s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:414s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:393s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:471s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:429s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:470s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:528s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:476s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:524s
fi-pnv-d510  total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:593s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:447s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:529s
fi-skl-6700hqtotal:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:558s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:486s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:445s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:548s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:427s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:591s
fi-cnl-y total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:635s
fi-glk-dsi   total:288  pass:177  dwarn:1   dfail:4   fail:0   skip:106 
time:345s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:507s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_685/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.BAT: failure for igt/perf_pmu: Measure the reference batch for all-busy-check-all

2017-12-15 Thread Patchwork
== Series Details ==

Series: igt/perf_pmu: Measure the reference batch for all-busy-check-all
URL   : https://patchwork.freedesktop.org/series/35417/
State : failure

== Summary ==

IGT patchset tested on top of latest successful build
c0be3310715e2f744b892c51f09e62273bcc8e57 tests/kms_frontbuffer_tracking: 
Correctly handle debugfs errors

with latest DRM-Tip kernel build CI_DRM_3523
84ac2c35b2ab drm-tip: 2017y-12m-15d-15h-36m-28s UTC integration manifest

No testlist changes.

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test gem_exec_suspend:
Subgroup basic-s3:
pass   -> INCOMPLETE (fi-kbl-r)
Test gem_sync:
Subgroup basic-all:
dmesg-fail -> FAIL   (fi-blb-e6850) fdo#104259
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS   (fi-snb-2520m) fdo#103713
Test kms_psr_sink_crc:
Subgroup psr_basic:
dmesg-warn -> PASS   (fi-skl-6700hq) fdo#101144

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#104259 https://bugs.freedesktop.org/show_bug.cgi?id=104259
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:435s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:439s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:0   fail:1   skip:64  
time:395s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:515s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:279s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:494s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:498s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:492s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:473s
fi-elk-e7500 total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551   total:288  pass:178  dwarn:1   dfail:0   fail:1   skip:108 
time:264s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:533s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:409s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:413s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:390s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:484s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:431s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:479s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:525s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:473s
fi-kbl-r total:108  pass:96   dwarn:0   dfail:0   fail:0   skip:11 
fi-pnv-d510  total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:591s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:440s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:532s
fi-skl-6700hqtotal:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:558s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:491s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:448s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:547s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:424s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:592s
fi-glk-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:481s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:511s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_684/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.BAT: failure for igt/perf_pmu: Measure the reference batch for busy-check-all

2017-12-15 Thread Patchwork
== Series Details ==

Series: igt/perf_pmu: Measure the reference batch for busy-check-all
URL   : https://patchwork.freedesktop.org/series/35416/
State : failure

== Summary ==

IGT patchset tested on top of latest successful build
c0be3310715e2f744b892c51f09e62273bcc8e57 tests/kms_frontbuffer_tracking: 
Correctly handle debugfs errors

with latest DRM-Tip kernel build CI_DRM_3523
84ac2c35b2ab drm-tip: 2017y-12m-15d-15h-36m-28s UTC integration manifest

No testlist changes.

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test gem_exec_reloc:
Subgroup basic-gtt-read-noreloc:
pass   -> INCOMPLETE (fi-byt-j1900)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass   -> DMESG-WARN (fi-kbl-r) fdo#104172 +1
Test kms_psr_sink_crc:
Subgroup psr_basic:
dmesg-warn -> PASS   (fi-skl-6700hq) fdo#101144

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:438s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:449s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:1   fail:0   skip:64  
time:397s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:509s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:280s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:496s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:500s
fi-byt-j1900 total:85   pass:75   dwarn:0   dfail:0   fail:0   skip:9  
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:482s
fi-elk-e7500 total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551   total:288  pass:178  dwarn:1   dfail:0   fail:1   skip:108 
time:268s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:532s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:407s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:418s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:391s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:467s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:433s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:483s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:517s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:466s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:524s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:447s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:533s
fi-skl-6700hqtotal:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:554s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:487s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:446s
fi-snb-2520m total:245  pass:211  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:414s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:585s
fi-glk-dsi   total:288  pass:175  dwarn:2   dfail:5   fail:0   skip:106 
time:348s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:510s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_683/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Unifying debugfs return codes for unsupported features (rev2)

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915: Unifying debugfs return codes for unsupported features (rev2)
URL   : https://patchwork.freedesktop.org/series/34552/
State : failure

== Summary ==

Test gem_exec_suspend:
Subgroup basic-s3:
incomplete -> PASS   (shard-hsw) fdo#103540
Test kms_fbcon_fbt:
Subgroup fbc-suspend:
pass   -> INCOMPLETE (shard-hsw)
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
fail   -> PASS   (shard-snb) fdo#101623
Test gem_eio:
Subgroup in-flight-contexts:
dmesg-warn -> PASS   (shard-snb) fdo#104058
Test kms_flip:
Subgroup vblank-vs-dpms-suspend-interruptible:
pass   -> SKIP   (shard-snb) fdo#102365

fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365

shard-hswtotal:2664 pass:1508 dwarn:1   dfail:0   fail:10  skip:1144 
time:9073s
shard-snbtotal:2712 pass:1307 dwarn:1   dfail:0   fail:12  skip:1392 
time:7953s
Blacklisted hosts:
shard-apltotal:2712 pass:1685 dwarn:1   dfail:0   fail:24  skip:1001 
time:13875s
shard-kbltotal:2712 pass:1805 dwarn:1   dfail:0   fail:26  skip:880 
time:11145s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7507/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/trace: add hw_id to gem requests trace points

2017-12-15 Thread Tvrtko Ursulin


On 15/12/2017 16:18, Lionel Landwerlin wrote:

On 15/12/17 16:08, Chris Wilson wrote:

Quoting Lionel Landwerlin (2017-12-15 15:51:36)

When monitoring the GPU with i915 perf, reports are tagged with a hw
id. When also tracking the requests using the kernel tracepoints, if
we include the hw_id from i915_gem_context, this allows us to
correlate a process with hw id fields in the OA reports.

Maybe, but don't split the fence.context and fence.seqno. You should
also update the igt tools using the tracepoints.
-Chris


I would have thought the tools could deal with a different ordering :(


At least as a benefit you get to refresh your Perl skills. ;)

trace.pl and intel-gpu-overlay I think are the only two.

I guess it would be possible to smarten both up to detect where the 
fields they need are located but maybe too much work.


Regards,

Tvrtko
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for igt/perf_pmu: Tighten measurements for most-busy

2017-12-15 Thread Patchwork
== Series Details ==

Series: igt/perf_pmu: Tighten measurements for most-busy
URL   : https://patchwork.freedesktop.org/series/35414/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
c0be3310715e2f744b892c51f09e62273bcc8e57 tests/kms_frontbuffer_tracking: 
Correctly handle debugfs errors

with latest DRM-Tip kernel build CI_DRM_3523
84ac2c35b2ab drm-tip: 2017y-12m-15d-15h-36m-28s UTC integration manifest

No testlist changes.

Test gem_sync:
Subgroup basic-all:
dmesg-fail -> FAIL   (fi-blb-e6850) fdo#104259
Test kms_busy:
Subgroup basic-flip-a:
dmesg-warn -> PASS   (fi-elk-e7500) fdo#103989
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass   -> DMESG-WARN (fi-kbl-r) fdo#104172 +1
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS   (fi-snb-2520m) fdo#103713
Test kms_psr_sink_crc:
Subgroup psr_basic:
dmesg-warn -> PASS   (fi-skl-6700hq) fdo#101144

fdo#104259 https://bugs.freedesktop.org/show_bug.cgi?id=104259
fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:440s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:438s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:0   fail:1   skip:64  
time:389s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:510s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:281s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:497s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:501s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:494s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:470s
fi-elk-e7500 total:224  pass:164  dwarn:13  dfail:1   fail:0   skip:45 
fi-gdg-551   total:288  pass:178  dwarn:1   dfail:0   fail:1   skip:108 
time:267s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:536s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:406s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:424s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:392s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:482s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:431s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:479s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:522s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:470s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:523s
fi-pnv-d510  total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:599s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:447s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:533s
fi-skl-6700hqtotal:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:556s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:489s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:448s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:546s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:414s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:593s
fi-glk-dsi   total:288  pass:257  dwarn:0   dfail:0   fail:1   skip:30  
time:498s
fi-skl-6700k2total:288  pass:263  dwarn:0   dfail:0   fail:1   skip:24  
time:512s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_682/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH igt] igt/perf_pmu: Speed up frequency measurement

2017-12-15 Thread Chris Wilson
Use the normal batch_duration_ns and display the sampled frequency:

Frequency: min=100, max=750, boost=750 MHz
Min frequency: requested 100.0, actual 100.0
Max frequency: requested 755.6, actual 755.6

Signed-off-by: Chris Wilson 
Cc: Tvrtko Ursulin 
---
 tests/perf_pmu.c | 40 +---
 1 file changed, 25 insertions(+), 15 deletions(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index d88287c17..61ae96d9a 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -931,9 +931,10 @@ test_interrupts(int gem_fd)
 static void
 test_frequency(int gem_fd)
 {
-   const uint64_t duration_ns = 2e9;
uint32_t min_freq, max_freq, boost_freq;
-   uint64_t min[2], max[2], start[2];
+   uint64_t val[2], start[2];
+   double min[2], max[2];
+   unsigned long slept;
igt_spin_t *spin;
int fd, sysfs;
 
@@ -962,17 +963,19 @@ test_frequency(int gem_fd)
igt_require(igt_sysfs_set_u32(sysfs, "gt_boost_freq_mhz", min_freq));
igt_require(igt_sysfs_get_u32(sysfs, "gt_boost_freq_mhz") == min_freq);
 
+   gem_quiescent_gpu(gem_fd); /* Idle to be sure the change takes effect */
+   spin = igt_spin_batch_new(gem_fd, 0, I915_EXEC_RENDER, 0);
pmu_read_multi(fd, 2, start);
 
-   spin = igt_spin_batch_new(gem_fd, 0, I915_EXEC_RENDER, 0);
-   igt_spin_batch_set_timeout(spin, duration_ns);
-   gem_sync(gem_fd, spin->handle);
+   slept = measured_usleep(batch_duration_ns / 1000);
+   igt_spin_batch_end(spin);
 
-   pmu_read_multi(fd, 2, min);
-   min[0] -= start[0];
-   min[1] -= start[1];
+   pmu_read_multi(fd, 2, val);
+   min[0] = 1e9*(val[0] - start[0]) / slept;
+   min[1] = 1e9*(val[1] - start[1]) / slept;
 
igt_spin_batch_free(gem_fd, spin);
+   gem_quiescent_gpu(gem_fd); /* Don't leak busy bo into the next phase */
 
usleep(1e6);
 
@@ -987,17 +990,19 @@ test_frequency(int gem_fd)
igt_require(igt_sysfs_set_u32(sysfs, "gt_min_freq_mhz", max_freq));
igt_require(igt_sysfs_get_u32(sysfs, "gt_min_freq_mhz") == max_freq);
 
+   gem_quiescent_gpu(gem_fd);
+   spin = igt_spin_batch_new(gem_fd, 0, I915_EXEC_RENDER, 0);
pmu_read_multi(fd, 2, start);
 
-   spin = igt_spin_batch_new(gem_fd, 0, I915_EXEC_RENDER, 0);
-   igt_spin_batch_set_timeout(spin, duration_ns);
-   gem_sync(gem_fd, spin->handle);
+   slept = measured_usleep(batch_duration_ns / 1000);
+   igt_spin_batch_end(spin);
 
-   pmu_read_multi(fd, 2, max);
-   max[0] -= start[0];
-   max[1] -= start[1];
+   pmu_read_multi(fd, 2, val);
+   max[0] = 1e9*(val[0] - start[0]) / slept;
+   max[1] = 1e9*(val[1] - start[1]) / slept;
 
igt_spin_batch_free(gem_fd, spin);
+   gem_quiescent_gpu(gem_fd);
 
/*
 * Restore min/max.
@@ -1008,8 +1013,13 @@ test_frequency(int gem_fd)
 min_freq, igt_sysfs_get_u32(sysfs, "gt_min_freq_mhz"));
close(fd);
 
+   igt_info("Min frequency: requested %.1f, actual %.1f\n",
+min[0], min[1]);
+   igt_info("Max frequency: requested %.1f, actual %.1f\n",
+max[0], max[1]);
igt_assert(min[0] < max[0]);
-   igt_assert(min[1] < max[1]);
+   igt_assert(min[1] <= min[0]);
+   igt_assert(max[1] <= max[0]);
 }
 
 static bool wait_for_rc6(int fd)
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for igt/perf_pmu: Tighten busy measurement

2017-12-15 Thread Patchwork
== Series Details ==

Series: igt/perf_pmu: Tighten busy measurement
URL   : https://patchwork.freedesktop.org/series/35412/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
c0be3310715e2f744b892c51f09e62273bcc8e57 tests/kms_frontbuffer_tracking: 
Correctly handle debugfs errors

with latest DRM-Tip kernel build CI_DRM_3523
84ac2c35b2ab drm-tip: 2017y-12m-15d-15h-36m-28s UTC integration manifest

No testlist changes.

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
fail   -> PASS   (fi-gdg-551) fdo#102575
Test gem_sync:
Subgroup basic-all:
dmesg-fail -> FAIL   (fi-blb-e6850) fdo#104259
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
pass   -> DMESG-WARN (fi-kbl-r) fdo#104172 +1

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#104259 https://bugs.freedesktop.org/show_bug.cgi?id=104259
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:438s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:0   fail:1   skip:64  
time:388s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:503s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:279s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:495s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:498s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:483s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:479s
fi-elk-e7500 total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551   total:288  pass:179  dwarn:1   dfail:0   fail:0   skip:108 
time:269s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:536s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:412s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:416s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:391s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:477s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:428s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:477s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:527s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:468s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:523s
fi-pnv-d510  total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:596s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:451s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:533s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:557s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:497s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:448s
fi-snb-2520m total:245  pass:211  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:416s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:591s
fi-cnl-y total:198  pass:186  dwarn:0   dfail:0   fail:0   skip:11 
fi-glk-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:482s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:509s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_681/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Check for fused or unused pipes (rev2)

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915: Check for fused or unused pipes (rev2)
URL   : https://patchwork.freedesktop.org/series/35389/
State : success

== Summary ==

Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
fail   -> PASS   (shard-snb) fdo#101623
Test gem_eio:
Subgroup in-flight-contexts:
dmesg-warn -> PASS   (shard-snb) fdo#104058
Test kms_flip:
Subgroup vblank-vs-suspend:
pass   -> FAIL   (shard-snb) fdo#103375
Subgroup dpms-vs-vblank-race:
pass   -> FAIL   (shard-hsw) fdo#103060
Test gem_exec_suspend:
Subgroup basic-s3:
incomplete -> PASS   (shard-hsw) fdo#103540
Test gem_softpin:
Subgroup noreloc-s3:
pass   -> SKIP   (shard-snb) fdo#102365

fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365

shard-hswtotal:2712 pass:1536 dwarn:1   dfail:0   fail:11  skip:1164 
time:9464s
shard-snbtotal:2712 pass:1306 dwarn:1   dfail:0   fail:13  skip:1392 
time:7937s
Blacklisted hosts:
shard-apltotal:2712 pass:1682 dwarn:1   dfail:0   fail:28  skip:1001 
time:14141s
shard-kbltotal:2694 pass:1787 dwarn:1   dfail:0   fail:27  skip:878 
time:10943s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7506/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH v2] x86/gpu: add CFL to early quirks

2017-12-15 Thread Ingo Molnar

* Lucas De Marchi  wrote:

> CFL was missing from intel_early_ids[]. The PCI ID needs to be there to
> allow the memory region to be stolen, otherwise we could have RAM being
> arbitrarily overwritten if for example we keep using the UEFI framebuffer,
> depending on how BIOS has set up the e820 map.
> 
> Fixes: b056f8f3d6b9 ("drm/i915/cfl: Add Coffee Lake PCI IDs for S Skus.")
> Signed-off-by: Lucas De Marchi 
> Cc: Rodrigo Vivi 
> Cc: Anusha Srivatsa 
> Cc: Jani Nikula 
> Cc: Joonas Lahtinen 
> Cc: David Airlie 
> Cc: intel-gfx@lists.freedesktop.org
> Cc: dri-de...@lists.freedesktop.org
> Cc: Ingo Molnar 
> Cc: H. Peter Anvin 
> Cc: Thomas Gleixner 
> Cc: x...@kernel.org
> Cc:  # v4.13+ 0890540e21cf drm/i915: add GT number to 
> intel_device_info
> Cc:  # v4.13+ 41693fd52373 drm/i915/kbl: Change a KBL 
> pci id to GT2 from GT1.5
> Cc:  # v4.13+
> Reviewed-by: Rodrigo Vivi 
> ---
> 
> v2: improve commit message, add Fixes tag and CC stable
> 
>  arch/x86/kernel/early-quirks.c | 1 +
>  include/drm/i915_pciids.h  | 6 ++
>  2 files changed, 7 insertions(+)

Acked-by: Ingo Molnar 

Thanks,

Ingo
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/trace: add hw_id to gem requests trace points

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915/trace: add hw_id to gem requests trace points
URL   : https://patchwork.freedesktop.org/series/35420/
State : success

== Summary ==

Series 35420v1 drm/i915/trace: add hw_id to gem requests trace points
https://patchwork.freedesktop.org/api/1.0/series/35420/revisions/1/mbox/

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
fail   -> PASS   (fi-gdg-551) fdo#102575
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass   -> INCOMPLETE (fi-bdw-5557u) fdo#104057
Test kms_psr_sink_crc:
Subgroup psr_basic:
dmesg-warn -> PASS   (fi-skl-6700hq) fdo#101144

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#104057 https://bugs.freedesktop.org/show_bug.cgi?id=104057
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:244  pass:226  dwarn:0   dfail:0   fail:0   skip:17 
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:443s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:1   fail:0   skip:64  
time:396s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:492s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:277s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:494s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:501s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:482s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:468s
fi-elk-e7500 total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551   total:288  pass:179  dwarn:1   dfail:0   fail:0   skip:108 
time:261s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:534s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:404s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:413s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:386s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:478s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:424s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:480s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:525s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:466s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:527s
fi-pnv-d510  total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:596s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:443s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:529s
fi-skl-6700hqtotal:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:553s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:485s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:457s
fi-snb-2520m total:245  pass:211  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:419s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:588s
fi-glk-dsi   total:167  pass:80   dwarn:0   dfail:1   fail:1   skip:84 
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:504s

84ac2c35b2ab5cb0326911fdea3bfb5f7e479b3b drm-tip: 2017y-12m-15d-15h-36m-28s UTC 
integration manifest
d60f96a85ee9 drm/i915/trace: add hw_id to gem requests trace points

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7509/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/trace: add hw_id to gem requests trace points

2017-12-15 Thread Lionel Landwerlin

On 15/12/17 16:08, Chris Wilson wrote:

Quoting Lionel Landwerlin (2017-12-15 15:51:36)

When monitoring the GPU with i915 perf, reports are tagged with a hw
id. When also tracking the requests using the kernel tracepoints, if
we include the hw_id from i915_gem_context, this allows us to
correlate a process with hw id fields in the OA reports.

Maybe, but don't split the fence.context and fence.seqno. You should
also update the igt tools using the tracepoints.
-Chris


I would have thought the tools could deal with a different ordering :(

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH igt v2 2/4] igt/perf_pmu: Tighten measurements for most-busy

2017-12-15 Thread Chris Wilson
Create all the spinners before starting the sampler and then measure how
long we sleep.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104160
Signed-off-by: Chris Wilson 
Cc: Tvrtko Ursulin 
---
 tests/perf_pmu.c | 45 +
 1 file changed, 25 insertions(+), 20 deletions(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index 38fd05dc9..96091b853 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -228,53 +228,58 @@ most_busy_check_all(int gem_fd, const struct 
intel_execution_engine2 *e,
const struct intel_execution_engine2 *e_;
uint64_t val[num_engines];
int fd[num_engines];
-   igt_spin_t *spin[num_engines];
+   unsigned long slept;
+   igt_spin_t *spin = NULL;
unsigned int idle_idx, i;
 
gem_require_engine(gem_fd, e->class, e->instance);
 
i = 0;
-   fd[0] = -1;
for_each_engine_class_instance(fd, e_) {
if (!gem_has_engine(gem_fd, e_->class, e_->instance))
continue;
 
-   fd[i] = open_group(I915_PMU_ENGINE_BUSY(e_->class,
-   e_->instance),
-  fd[0]);
-
if (e == e_) {
idle_idx = i;
+   } else if (spin) {
+   struct drm_i915_gem_exec_object2 obj = {
+   .handle = spin->handle
+   };
+   struct drm_i915_gem_execbuffer2 eb = {
+   .buffer_count = 1,
+   .buffers_ptr = to_user_pointer(),
+   .flags = e2ring(gem_fd, e_),
+   };
+   gem_execbuf(gem_fd, );
} else {
-   spin[i] = igt_spin_batch_new(gem_fd, 0,
-e2ring(gem_fd, e_), 0);
-   igt_spin_batch_set_timeout(spin[i], batch_duration_ns);
+   spin = igt_spin_batch_new(gem_fd, 0,
+ e2ring(gem_fd, e_), 0);
}
 
-   i++;
+   val[i++] = I915_PMU_ENGINE_BUSY(e_->class, e_->instance);
}
+   igt_assert(i == num_engines);
 
-   for (i = 0; i < num_engines; i++) {
-   if (i != idle_idx)
-   gem_sync(gem_fd, spin[i]->handle);
-   }
+   fd[0] = -1;
+   for (i = 0; i < num_engines; i++)
+   fd[i] = open_group(val[i], fd[0]);
+
+   slept = measured_usleep(batch_duration_ns / 1000);
+   igt_spin_batch_end(spin);
 
pmu_read_multi(fd[0], num_engines, val);
log_busy(fd[0], num_engines, val);
 
-   for (i = 0; i < num_engines; i++) {
-   if (i != idle_idx)
-   igt_spin_batch_free(gem_fd, spin[i]);
-   }
+   igt_spin_batch_free(gem_fd, spin);
close(fd[0]);
 
for (i = 0; i < num_engines; i++) {
if (i == idle_idx)
assert_within_epsilon(val[i], 0.0f, tolerance);
else
-   assert_within_epsilon(val[i], batch_duration_ns,
- tolerance);
+   assert_within_epsilon(val[i], slept, tolerance);
}
+   gem_quiescent_gpu(gem_fd);
 }
 
 static void
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH igt v2 4/4] igt/perf_pmu: Measure the reference batch for all-busy-check-all

2017-12-15 Thread Chris Wilson
Don't rely on the timer being precise when we can sleep for a known
duration.

Signed-off-by: Chris Wilson 
Cc: Tvrtko Ursulin 
---
 tests/perf_pmu.c | 38 ++
 1 file changed, 26 insertions(+), 12 deletions(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index b3b289656..d88287c17 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -288,36 +288,50 @@ all_busy_check_all(int gem_fd, const unsigned int 
num_engines)
const struct intel_execution_engine2 *e;
uint64_t val[num_engines];
int fd[num_engines];
-   igt_spin_t *spin[num_engines];
+   unsigned long slept;
+   igt_spin_t *spin = NULL;
unsigned int i;
 
i = 0;
-   fd[0] = -1;
for_each_engine_class_instance(fd, e) {
if (!gem_has_engine(gem_fd, e->class, e->instance))
continue;
 
-   fd[i] = open_group(I915_PMU_ENGINE_BUSY(e->class, e->instance),
-  fd[0]);
-
-   spin[i] = igt_spin_batch_new(gem_fd, 0, e2ring(gem_fd, e), 0);
-   igt_spin_batch_set_timeout(spin[i], batch_duration_ns);
+   if (spin) {
+   struct drm_i915_gem_exec_object2 obj = {
+   .handle = spin->handle
+   };
+   struct drm_i915_gem_execbuffer2 eb = {
+   .buffer_count = 1,
+   .buffers_ptr = to_user_pointer(),
+   .flags = e2ring(gem_fd, e),
+   };
+   gem_execbuf(gem_fd, );
+   } else {
+   spin = igt_spin_batch_new(gem_fd, 0,
+ e2ring(gem_fd, e), 0);
+   }
 
-   i++;
+   val[i++] = I915_PMU_ENGINE_BUSY(e->class, e->instance);
}
+   igt_assert(i == num_engines);
 
+   fd[0] = -1;
for (i = 0; i < num_engines; i++)
-   gem_sync(gem_fd, spin[i]->handle);
+   fd[i] = open_group(val[i], fd[0]);
+
+   slept = measured_usleep(batch_duration_ns / 1000);
+   igt_spin_batch_end(spin);
 
pmu_read_multi(fd[0], num_engines, val);
log_busy(fd[0], num_engines, val);
 
-   for (i = 0; i < num_engines; i++)
-   igt_spin_batch_free(gem_fd, spin[i]);
+   igt_spin_batch_free(gem_fd, spin);
close(fd[0]);
 
for (i = 0; i < num_engines; i++)
-   assert_within_epsilon(val[i], batch_duration_ns, tolerance);
+   assert_within_epsilon(val[i], slept, tolerance);
+   gem_quiescent_gpu(gem_fd);
 }
 
 static void
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH igt v2 1/4] igt/perf_pmu: Tighten busy measurement

2017-12-15 Thread Chris Wilson
Sleep for a known duration. In particular, CI once saw a measurement for
busyness greater than the intended batch_duration!

v2: Go back to starting pmu sampling outside of spinner; the GPU should
be idle.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104241
Signed-off-by: Chris Wilson 
Cc: Tvrtko Ursulin 
---
 tests/perf_pmu.c | 22 ++
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index db7696115..38fd05dc9 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -103,7 +103,7 @@ static void pmu_read_multi(int fd, unsigned int num, 
uint64_t *val)
igt_assert_f((double)(x) <= (1.0 + (tolerance)) * (double)(ref) && \
 (double)(x) >= (1.0 - (tolerance)) * (double)(ref), \
 "'%s' != '%s' (%f not within %f%% tolerance of %f)\n",\
-#x, #ref, (double)(x), (tolerance) * 100.0, (double)ref)
+#x, #ref, (double)(x), (tolerance) * 100.0, (double)(ref))
 
 /*
  * Helper for cases where we assert on time spent sleeping (directly or
@@ -133,30 +133,28 @@ static unsigned int e2ring(int gem_fd, const struct 
intel_execution_engine2 *e)
 static void
 single(int gem_fd, const struct intel_execution_engine2 *e, bool busy)
 {
-   double ref = busy ? batch_duration_ns : 0.0f;
+   unsigned long slept;
igt_spin_t *spin;
uint64_t val;
int fd;
 
fd = open_pmu(I915_PMU_ENGINE_BUSY(e->class, e->instance));
 
-   if (busy) {
+   if (busy)
spin = igt_spin_batch_new(gem_fd, 0, e2ring(gem_fd, e), 0);
-   igt_spin_batch_set_timeout(spin, batch_duration_ns);
-   } else {
-   usleep(batch_duration_ns / 1000);
-   }
+   else
+   spin = NULL;
 
-   if (busy)
-   gem_sync(gem_fd, spin->handle);
+   slept = measured_usleep(batch_duration_ns / 1000);
+   igt_spin_batch_end(spin);
 
val = pmu_read_single(fd);
 
-   if (busy)
-   igt_spin_batch_free(gem_fd, spin);
+   igt_spin_batch_free(gem_fd, spin);
close(fd);
 
-   assert_within_epsilon(val, ref, tolerance);
+   assert_within_epsilon(val, busy ? slept : 0.f, tolerance);
+   gem_quiescent_gpu(gem_fd);
 }
 
 static void log_busy(int fd, unsigned int num_engines, uint64_t *val)
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH igt v2 3/4] igt/perf_pmu: Measure the reference batch for busy-check-all

2017-12-15 Thread Chris Wilson
Don't rely on the timer being precise when we can sleep for a known
duration.

Signed-off-by: Chris Wilson 
Cc: Tvrtko Ursulin 
---
 tests/perf_pmu.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index 96091b853..b3b289656 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -183,6 +183,7 @@ busy_check_all(int gem_fd, const struct 
intel_execution_engine2 *e,
const struct intel_execution_engine2 *e_;
uint64_t val[num_engines];
int fd[num_engines];
+   unsigned long slept;
igt_spin_t *spin;
unsigned int busy_idx, i;
 
@@ -202,9 +203,8 @@ busy_check_all(int gem_fd, const struct 
intel_execution_engine2 *e,
igt_assert_eq(i, num_engines);
 
spin = igt_spin_batch_new(gem_fd, 0, e2ring(gem_fd, e), 0);
-   igt_spin_batch_set_timeout(spin, batch_duration_ns);
-
-   gem_sync(gem_fd, spin->handle);
+   slept = measured_usleep(batch_duration_ns / 1000);
+   igt_spin_batch_end(spin);
 
pmu_read_multi(fd[0], num_engines, val);
log_busy(fd[0], num_engines, val);
@@ -212,13 +212,13 @@ busy_check_all(int gem_fd, const struct 
intel_execution_engine2 *e,
igt_spin_batch_free(gem_fd, spin);
close(fd[0]);
 
-   assert_within_epsilon(val[busy_idx], batch_duration_ns, tolerance);
+   assert_within_epsilon(val[busy_idx], slept, tolerance);
for (i = 0; i < num_engines; i++) {
if (i == busy_idx)
continue;
assert_within_epsilon(val[i], 0.0f, tolerance);
}
-
+   gem_quiescent_gpu(gem_fd);
 }
 
 static void
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/trace: add hw_id to gem requests trace points

2017-12-15 Thread Chris Wilson
Quoting Lionel Landwerlin (2017-12-15 15:51:36)
> When monitoring the GPU with i915 perf, reports are tagged with a hw
> id. When also tracking the requests using the kernel tracepoints, if
> we include the hw_id from i915_gem_context, this allows us to
> correlate a process with hw id fields in the OA reports.

Maybe, but don't split the fence.context and fence.seqno. You should
also update the igt tools using the tracepoints.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for igt: Exercise creating context with shared GTT

2017-12-15 Thread Patchwork
== Series Details ==

Series: igt: Exercise creating context with shared GTT
URL   : https://patchwork.freedesktop.org/series/35406/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
c0be3310715e2f744b892c51f09e62273bcc8e57 tests/kms_frontbuffer_tracking: 
Correctly handle debugfs errors

with latest DRM-Tip kernel build CI_DRM_3522
d2a96c2d31af drm-tip: 2017y-12m-15d-13h-58m-44s UTC integration manifest

Testlist changes:
+igt@gem_ctx_shared@create-shared-gtt
+igt@gem_ctx_shared@detached-shared-gtt
+igt@gem_ctx_shared@exec-shared-gtt-blt
+igt@gem_ctx_shared@exec-shared-gtt-bsd
+igt@gem_ctx_shared@exec-shared-gtt-bsd1
+igt@gem_ctx_shared@exec-shared-gtt-bsd2
+igt@gem_ctx_shared@exec-shared-gtt-default
+igt@gem_ctx_shared@exec-shared-gtt-render
+igt@gem_ctx_shared@exec-shared-gtt-vebox
+igt@gem_ctx_shared@exhaust-shared-gtt
+igt@gem_ctx_shared@exhaust-shared-gtt-lrc

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> PASS   (fi-elk-e7500) fdo#103989 +1
Test gem_sync:
Subgroup basic-all:
fail   -> DMESG-FAIL (fi-blb-e6850) fdo#104259

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#104259 https://bugs.freedesktop.org/show_bug.cgi?id=104259

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:443s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:445s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:1   fail:0   skip:64  
time:392s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:518s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:279s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:503s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:502s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:485s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:469s
fi-elk-e7500 total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551   total:288  pass:178  dwarn:1   dfail:0   fail:1   skip:108 
time:268s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:534s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:404s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:421s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:389s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:482s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:430s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:485s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:520s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:469s
fi-pnv-d510  total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:598s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:456s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:534s
fi-skl-6700hqtotal:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:557s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:495s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:460s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:551s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:415s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:608s
fi-cnl-y total:219  pass:198  dwarn:0   dfail:0   fail:0   skip:20 
fi-glk-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:489s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:509s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_680/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915/trace: add hw_id to gem requests trace points

2017-12-15 Thread Lionel Landwerlin
When monitoring the GPU with i915 perf, reports are tagged with a hw
id. When also tracking the requests using the kernel tracepoints, if
we include the hw_id from i915_gem_context, this allows us to
correlate a process with hw id fields in the OA reports.

Signed-off-by: Lionel Landwerlin 
---
 drivers/gpu/drm/i915/i915_trace.h | 24 +++-
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_trace.h 
b/drivers/gpu/drm/i915/i915_trace.h
index 4e76768ffa95..e4c7b6a368bd 100644
--- a/drivers/gpu/drm/i915/i915_trace.h
+++ b/drivers/gpu/drm/i915/i915_trace.h
@@ -618,6 +618,7 @@ TRACE_EVENT(i915_gem_request_queue,
 __field(u32, dev)
 __field(u32, ring)
 __field(u32, ctx)
+__field(u32, hw_id)
 __field(u32, seqno)
 __field(u32, flags)
 ),
@@ -626,13 +627,14 @@ TRACE_EVENT(i915_gem_request_queue,
   __entry->dev = req->i915->drm.primary->index;
   __entry->ring = req->engine->id;
   __entry->ctx = req->fence.context;
+  __entry->hw_id = req->ctx->hw_id;
   __entry->seqno = req->fence.seqno;
   __entry->flags = flags;
   ),
 
-   TP_printk("dev=%u, ring=%u, ctx=%u, seqno=%u, flags=0x%x",
- __entry->dev, __entry->ring, __entry->ctx, __entry->seqno,
- __entry->flags)
+   TP_printk("dev=%u, ring=%u, ctx=%u, hw_id=%u, seqno=%u, flags=0x%x",
+ __entry->dev, __entry->ring, __entry->ctx, __entry->hw_id,
+ __entry->seqno, __entry->flags)
 );
 
 DECLARE_EVENT_CLASS(i915_gem_request,
@@ -642,6 +644,7 @@ DECLARE_EVENT_CLASS(i915_gem_request,
TP_STRUCT__entry(
 __field(u32, dev)
 __field(u32, ctx)
+__field(u32, hw_id)
 __field(u32, ring)
 __field(u32, seqno)
 __field(u32, global)
@@ -651,13 +654,14 @@ DECLARE_EVENT_CLASS(i915_gem_request,
   __entry->dev = req->i915->drm.primary->index;
   __entry->ring = req->engine->id;
   __entry->ctx = req->fence.context;
+  __entry->hw_id = req->ctx->hw_id;
   __entry->seqno = req->fence.seqno;
   __entry->global = req->global_seqno;
   ),
 
-   TP_printk("dev=%u, ring=%u, ctx=%u, seqno=%u, global=%u",
- __entry->dev, __entry->ring, __entry->ctx, __entry->seqno,
- __entry->global)
+   TP_printk("dev=%u, ring=%u, ctx=%u, hw_id=%u, seqno=%u, global=%u",
+ __entry->dev, __entry->ring, __entry->ctx, __entry->hw_id,
+ __entry->seqno, __entry->global)
 );
 
 DEFINE_EVENT(i915_gem_request, i915_gem_request_add,
@@ -687,6 +691,7 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw,
 __field(u32, seqno)
 __field(u32, global_seqno)
 __field(u32, ctx)
+__field(u32, hw_id)
 __field(u32, port)
),
 
@@ -694,15 +699,16 @@ DECLARE_EVENT_CLASS(i915_gem_request_hw,
   __entry->dev = req->i915->drm.primary->index;
   __entry->ring = req->engine->id;
   __entry->ctx = req->fence.context;
+  __entry->hw_id = req->ctx->hw_id;
   __entry->seqno = req->fence.seqno;
   __entry->global_seqno = req->global_seqno;
   __entry->port = port;
  ),
 
-   TP_printk("dev=%u, ring=%u, ctx=%u, seqno=%u, global=%u, 
port=%u",
+   TP_printk("dev=%u, ring=%u, ctx=%u, hw_id=%u, seqno=%u, 
global=%u, port=%u",
  __entry->dev, __entry->ring, __entry->ctx,
- __entry->seqno, __entry->global_seqno,
- __entry->port)
+ __entry->hw_id, __entry->seqno,
+ __entry->global_seqno, __entry->port)
 );
 
 DEFINE_EVENT(i915_gem_request_hw, i915_gem_request_in,
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/userptr: Probe vma range before gup (rev5)

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915/userptr: Probe vma range before gup (rev5)
URL   : https://patchwork.freedesktop.org/series/35394/
State : success

== Summary ==

Series 35394v5 drm/i915/userptr: Probe vma range before gup
https://patchwork.freedesktop.org/api/1.0/series/35394/revisions/5/mbox/

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
pass   -> INCOMPLETE (fi-snb-2520m) fdo#103713
Test kms_psr_sink_crc:
Subgroup psr_basic:
pass   -> DMESG-WARN (fi-skl-6700hq) fdo#101144

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:436s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:439s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:0   fail:1   skip:64  
time:391s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:507s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:279s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:496s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:497s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:478s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:485s
fi-elk-e7500 total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551   total:288  pass:178  dwarn:1   dfail:0   fail:1   skip:108 
time:265s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:536s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:404s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:413s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:395s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:478s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:425s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:479s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:521s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:465s
fi-pnv-d510  total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:583s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:446s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:532s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:559s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:488s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:450s
fi-snb-2520m total:3pass:2dwarn:0   dfail:0   fail:0   skip:0  
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:413s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:585s
fi-cnl-y total:216  pass:195  dwarn:0   dfail:0   fail:0   skip:20 
fi-glk-dsi   total:195  pass:123  dwarn:0   dfail:1   fail:0   skip:70 
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:504s

d2a96c2d31af5cf964f9bb9b9c2cb453f6194954 drm-tip: 2017y-12m-15d-13h-58m-44s UTC 
integration manifest
066961b7b6fa drm/i915/userptr: Probe vma range before gup

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7508/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH igt] igt/perf_pmu: Measure the reference batch for all-busy-check-all

2017-12-15 Thread Chris Wilson
Don't rely on the timer being precise when we can sleep for a known
duration.

Signed-off-by: Chris Wilson 
Cc: Tvrtko Ursulin 
---
 tests/perf_pmu.c | 36 
 1 file changed, 24 insertions(+), 12 deletions(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index 1197cae4e..dabcc03a9 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -282,36 +282,48 @@ all_busy_check_all(int gem_fd, const unsigned int 
num_engines)
const struct intel_execution_engine2 *e;
uint64_t val[num_engines];
int fd[num_engines];
-   igt_spin_t *spin[num_engines];
+   unsigned long slept;
+   igt_spin_t *spin = NULL;
unsigned int i;
 
i = 0;
-   fd[0] = -1;
for_each_engine_class_instance(fd, e) {
if (!gem_has_engine(gem_fd, e->class, e->instance))
continue;
 
-   fd[i] = open_group(I915_PMU_ENGINE_BUSY(e->class, e->instance),
-  fd[0]);
-
-   spin[i] = igt_spin_batch_new(gem_fd, 0, e2ring(gem_fd, e), 0);
-   igt_spin_batch_set_timeout(spin[i], batch_duration_ns);
+   if (spin) {
+   struct drm_i915_gem_exec_object2 obj = {
+   .handle = spin->handle
+   };
+   struct drm_i915_gem_execbuffer2 eb = {
+   .buffer_count = 1,
+   .buffers_ptr = to_user_pointer(),
+   .flags = e2ring(gem_fd, e),
+   };
+   gem_execbuf(gem_fd, );
+   } else {
+   spin = igt_spin_batch_new(gem_fd, 0,
+ e2ring(gem_fd, e), 0);
+   }
 
-   i++;
+   val[i++] = I915_PMU_ENGINE_BUSY(e->class, e->instance);
}
+   igt_assert(i == num_engines);
 
+   fd[0] = -1;
for (i = 0; i < num_engines; i++)
-   gem_sync(gem_fd, spin[i]->handle);
+   fd[i] = open_group(val[i], fd[0]);
+
+   slept = measured_usleep(batch_duration_ns / 1000);
 
pmu_read_multi(fd[0], num_engines, val);
log_busy(fd[0], num_engines, val);
 
-   for (i = 0; i < num_engines; i++)
-   igt_spin_batch_free(gem_fd, spin[i]);
+   igt_spin_batch_free(gem_fd, spin);
close(fd[0]);
 
for (i = 0; i < num_engines; i++)
-   assert_within_epsilon(val[i], batch_duration_ns, tolerance);
+   assert_within_epsilon(val[i], slept, tolerance);
 }
 
 static void
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH v2] drm/i915: Check for fused or unused pipes

2017-12-15 Thread Jani Nikula
On Fri, 15 Dec 2017, Mika Kahola  wrote:
> We may have fused or unused pipes in our system. Let's check that the pipe
> in question is within limits of accessible pipes. In case, that we are not
> able to access the pipe, we return early with a warning.
>
> v2: Rephrasing of the commit message (Jani)
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103206
> Reported-by: Thomas Gleixner 
> Signed-off-by: Jani Nikula 

Please just change that to:

Suggested-by: Jani Nikula 
Reviewed-by: Jani Nikula 

BR,
Jani.


> Signed-off-by: Mika Kahola 
> ---
>  drivers/gpu/drm/i915/intel_audio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_audio.c 
> b/drivers/gpu/drm/i915/intel_audio.c
> index f1502a0..522d54f 100644
> --- a/drivers/gpu/drm/i915/intel_audio.c
> +++ b/drivers/gpu/drm/i915/intel_audio.c
> @@ -779,7 +779,7 @@ static struct intel_encoder *get_saved_enc(struct 
> drm_i915_private *dev_priv,
>  {
>   struct intel_encoder *encoder;
>  
> - if (WARN_ON(pipe >= INTEL_INFO(dev_priv)->num_pipes))
> + if (WARN_ON(pipe >= ARRAY_SIZE(dev_priv->av_enc_map)))
>   return NULL;
>  
>   /* MST */

-- 
Jani Nikula, Intel Open Source Technology Center
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Extend CREATE_CONTEXT to allow inheritance ala clone()

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915: Extend CREATE_CONTEXT to allow inheritance ala clone()
URL   : https://patchwork.freedesktop.org/series/35405/
State : success

== Summary ==

Test gem_tiled_swapping:
Subgroup non-threaded:
dmesg-warn -> PASS   (shard-hsw) fdo#104218 +1
Test drv_suspend:
Subgroup fence-restore-tiled2untiled-hibernate:
fail   -> SKIP   (shard-hsw) fdo#103375 +1
Test kms_plane:
Subgroup plane-panning-bottom-right-suspend-pipe-a-planes:
pass   -> INCOMPLETE (shard-hsw) fdo#103540
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
fail   -> PASS   (shard-snb) fdo#101623

fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623

shard-hswtotal:2652 pass:1503 dwarn:1   dfail:0   fail:9   skip:1138 
time:9224s
shard-snbtotal:2712 pass:1309 dwarn:1   dfail:0   fail:11  skip:1391 
time:8048s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7505/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH igt] igt/perf_pmu: Measure the reference batch for busy-check-all

2017-12-15 Thread Chris Wilson
Don't rely on the timer being precise when we can sleep for a known
duration.

Signed-off-by: Chris Wilson 
Cc: Tvrtko Ursulin 
---
 tests/perf_pmu.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index e35aca899..1197cae4e 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -179,9 +179,12 @@ busy_check_all(int gem_fd, const struct 
intel_execution_engine2 *e,
const struct intel_execution_engine2 *e_;
uint64_t val[num_engines];
int fd[num_engines];
+   unsigned long slept;
igt_spin_t *spin;
unsigned int busy_idx, i;
 
+   spin = igt_spin_batch_new(gem_fd, 0, e2ring(gem_fd, e), 0);
+
i = 0;
fd[0] = -1;
for_each_engine_class_instance(fd, e_) {
@@ -197,10 +200,7 @@ busy_check_all(int gem_fd, const struct 
intel_execution_engine2 *e,
 
igt_assert_eq(i, num_engines);
 
-   spin = igt_spin_batch_new(gem_fd, 0, e2ring(gem_fd, e), 0);
-   igt_spin_batch_set_timeout(spin, batch_duration_ns);
-
-   gem_sync(gem_fd, spin->handle);
+   slept = measured_usleep(batch_duration_ns / 1000);
 
pmu_read_multi(fd[0], num_engines, val);
log_busy(fd[0], num_engines, val);
@@ -208,7 +208,7 @@ busy_check_all(int gem_fd, const struct 
intel_execution_engine2 *e,
igt_spin_batch_free(gem_fd, spin);
close(fd[0]);
 
-   assert_within_epsilon(val[busy_idx], batch_duration_ns, tolerance);
+   assert_within_epsilon(val[busy_idx], slept, tolerance);
for (i = 0; i < num_engines; i++) {
if (i == busy_idx)
continue;
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.IGT: success for kms_sysfs_edid timing and hack to run for BAT

2017-12-15 Thread Patchwork
== Series Details ==

Series: kms_sysfs_edid timing and hack to run for BAT
URL   : https://patchwork.freedesktop.org/series/35404/
State : success

== Summary ==

Test gem_tiled_swapping:
Subgroup non-threaded:
dmesg-warn -> PASS   (shard-hsw) fdo#104218 +1
Test kms_flip:
Subgroup vblank-vs-suspend:
incomplete -> PASS   (shard-hsw) fdo#103375
Subgroup vblank-vs-modeset-suspend-interruptible:
pass   -> INCOMPLETE (shard-hsw) fdo#103540
Test drv_selftest:
Subgroup live_hangcheck:
pass   -> INCOMPLETE (shard-snb) fdo#103880

fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103880 https://bugs.freedesktop.org/show_bug.cgi?id=103880

shard-hswtotal:2672 pass:1511 dwarn:1   dfail:0   fail:10  skip:1149 
time:9039s
shard-snbtotal:2694 pass:1289 dwarn:1   dfail:0   fail:12  skip:1391 
time:7948s
Blacklisted hosts:
shard-apltotal:2712 pass:1684 dwarn:1   dfail:0   fail:26  skip:1001 
time:14005s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_679/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Unifying debugfs return codes for unsupported features (rev2)

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915: Unifying debugfs return codes for unsupported features (rev2)
URL   : https://patchwork.freedesktop.org/series/34552/
State : success

== Summary ==

Series 34552v2 drm/i915: Unifying debugfs return codes for unsupported features
https://patchwork.freedesktop.org/api/1.0/series/34552/revisions/2/mbox/

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
fail   -> PASS   (fi-gdg-551) fdo#102575
Test kms_psr_sink_crc:
Subgroup psr_basic:
pass   -> DMESG-WARN (fi-skl-6700hq) fdo#101144

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:432s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:439s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:0   fail:1   skip:64  
time:394s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:501s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:277s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:495s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:501s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:479s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:470s
fi-elk-e7500 total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551   total:288  pass:179  dwarn:1   dfail:0   fail:0   skip:108 
time:265s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:533s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:409s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:417s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:393s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:475s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:429s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:478s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:519s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:464s
fi-pnv-d510  total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:588s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:449s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:525s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:555s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:487s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:444s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:548s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:416s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:599s
fi-cnl-y total:215  pass:194  dwarn:0   dfail:0   fail:0   skip:20 
fi-glk-dsi   total:288  pass:185  dwarn:1   dfail:4   fail:0   skip:98  
time:392s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:508s

d2a96c2d31af5cf964f9bb9b9c2cb453f6194954 drm-tip: 2017y-12m-15d-13h-58m-44s UTC 
integration manifest
be07869991fb drm/i915: Unifying debugfs return codes for unsupported features

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7507/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH igt] igt/perf_pmu: Tighten measurements for most-busy

2017-12-15 Thread Chris Wilson
Create all the spinners before starting the sampler and then measure how
long we sleep.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104160
Signed-off-by: Chris Wilson 
Cc: Tvrtko Ursulin 
---
 tests/perf_pmu.c | 43 +++
 1 file changed, 23 insertions(+), 20 deletions(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index 93df4520b..66d1a196d 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -224,52 +224,55 @@ most_busy_check_all(int gem_fd, const struct 
intel_execution_engine2 *e,
const struct intel_execution_engine2 *e_;
uint64_t val[num_engines];
int fd[num_engines];
-   igt_spin_t *spin[num_engines];
+   unsigned long slept;
+   igt_spin_t *spin = NULL;
unsigned int idle_idx, i;
 
gem_require_engine(gem_fd, e->class, e->instance);
 
i = 0;
-   fd[0] = -1;
for_each_engine_class_instance(fd, e_) {
if (!gem_has_engine(gem_fd, e_->class, e_->instance))
continue;
 
-   fd[i] = open_group(I915_PMU_ENGINE_BUSY(e_->class,
-   e_->instance),
-  fd[0]);
-
if (e == e_) {
idle_idx = i;
+   } else if (spin) {
+   struct drm_i915_gem_exec_object2 obj = {
+   .handle = spin->handle
+   };
+   struct drm_i915_gem_execbuffer2 eb = {
+   .buffer_count = 1,
+   .buffers_ptr = to_user_pointer(),
+   .flags = e2ring(gem_fd, e_),
+   };
+   gem_execbuf(gem_fd, );
} else {
-   spin[i] = igt_spin_batch_new(gem_fd, 0,
-e2ring(gem_fd, e_), 0);
-   igt_spin_batch_set_timeout(spin[i], batch_duration_ns);
+   spin = igt_spin_batch_new(gem_fd, 0,
+ e2ring(gem_fd, e_), 0);
}
 
-   i++;
+   val[i++] = I915_PMU_ENGINE_BUSY(e_->class, e_->instance);
}
+   igt_assert(i == num_engines);
 
-   for (i = 0; i < num_engines; i++) {
-   if (i != idle_idx)
-   gem_sync(gem_fd, spin[i]->handle);
-   }
+   fd[0] = -1;
+   for (i = 0; i < num_engines; i++)
+   fd[i] = open_group(val[i], fd[0]);
+
+   slept = measured_usleep(batch_duration_ns / 1000);
 
pmu_read_multi(fd[0], num_engines, val);
log_busy(fd[0], num_engines, val);
 
-   for (i = 0; i < num_engines; i++) {
-   if (i != idle_idx)
-   igt_spin_batch_free(gem_fd, spin[i]);
-   }
+   igt_spin_batch_free(gem_fd, spin);
close(fd[0]);
 
for (i = 0; i < num_engines; i++) {
if (i == idle_idx)
assert_within_epsilon(val[i], 0.0f, tolerance);
else
-   assert_within_epsilon(val[i], batch_duration_ns,
- tolerance);
+   assert_within_epsilon(val[i], slept, tolerance);
}
 }
 
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Check for fused or unused pipes (rev2)

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915: Check for fused or unused pipes (rev2)
URL   : https://patchwork.freedesktop.org/series/35389/
State : success

== Summary ==

Series 35389v2 drm/i915: Check for fused or unused pipes
https://patchwork.freedesktop.org/api/1.0/series/35389/revisions/2/mbox/

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
pass   -> INCOMPLETE (fi-snb-2520m) fdo#103713
Test gem_sync:
Subgroup basic-all:
fail   -> DMESG-FAIL (fi-blb-e6850) fdo#104259

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104259 https://bugs.freedesktop.org/show_bug.cgi?id=104259

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:433s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:438s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:1   fail:0   skip:64  
time:391s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:507s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:276s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:489s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:498s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:482s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:466s
fi-elk-e7500 total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551   total:288  pass:178  dwarn:1   dfail:0   fail:1   skip:108 
time:267s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:535s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:402s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:415s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:389s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:470s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:432s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:483s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:520s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:466s
fi-pnv-d510  total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:592s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:440s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:540s
fi-skl-6700hqtotal:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:556s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:490s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:443s
fi-snb-2520m total:3pass:2dwarn:0   dfail:0   fail:0   skip:0  
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:413s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:590s
fi-cnl-y total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:638s
fi-glk-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:482s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:508s

d2a96c2d31af5cf964f9bb9b9c2cb453f6194954 drm-tip: 2017y-12m-15d-13h-58m-44s UTC 
integration manifest
c0359a9e589e drm/i915: Check for fused or unused pipes

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7506/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH igt] igt/perf_pmu: Tighten busy measurement

2017-12-15 Thread Chris Wilson
Start the spinner first; before starting the measurement, and sleep for
a known duration. In particular, CI once saw a measurement for busyness
greater than the intended batch_duration!

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104241
Signed-off-by: Chris Wilson 
Cc: Tvrtko Ursulin 
---
 tests/perf_pmu.c | 22 --
 1 file changed, 8 insertions(+), 14 deletions(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index db7696115..93df4520b 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -133,30 +133,24 @@ static unsigned int e2ring(int gem_fd, const struct 
intel_execution_engine2 *e)
 static void
 single(int gem_fd, const struct intel_execution_engine2 *e, bool busy)
 {
-   double ref = busy ? batch_duration_ns : 0.0f;
+   unsigned long slept;
igt_spin_t *spin;
uint64_t val;
int fd;
 
-   fd = open_pmu(I915_PMU_ENGINE_BUSY(e->class, e->instance));
-
-   if (busy) {
-   spin = igt_spin_batch_new(gem_fd, 0, e2ring(gem_fd, e), 0);
-   igt_spin_batch_set_timeout(spin, batch_duration_ns);
-   } else {
-   usleep(batch_duration_ns / 1000);
-   }
-
if (busy)
-   gem_sync(gem_fd, spin->handle);
+   spin = igt_spin_batch_new(gem_fd, 0, e2ring(gem_fd, e), 0);
+   else
+   spin = NULL;
 
+   fd = open_pmu(I915_PMU_ENGINE_BUSY(e->class, e->instance));
+   slept = measured_usleep(batch_duration_ns / 1000);
val = pmu_read_single(fd);
 
-   if (busy)
-   igt_spin_batch_free(gem_fd, spin);
+   igt_spin_batch_free(gem_fd, spin);
close(fd);
 
-   assert_within_epsilon(val, ref, tolerance);
+   assert_within_epsilon(val, busy ? slept : 0.f, tolerance);
 }
 
 static void log_busy(int fd, unsigned int num_engines, uint64_t *val)
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH v5] drm/i915/userptr: Probe vma range before gup

2017-12-15 Thread Chris Wilson
We want to exclude any GGTT objects from being present on our internal
lists to avoid the deadlock we may run into with our requirement for
struct_mutex during invalidate. However, if the gup_fast fails, we put
the userptr onto the workqueue and mark it as active, so that we
remember to serialise the worker upon mmu_invalidate.

v2: Hold mmap_sem to prevent modifications to the mm while we probe and
add ourselves to the interval-tree for notificiation.
v3: Rely on mmap_sem for a simpler patch.
v4: Mark up the mmap_sem nesting
v5: Don't deactivate on -EAGAIN as that means the worker is queued

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104209
Signed-off-by: Chris Wilson 
Cc: Tvrtko Ursulin 
Cc: Michał Winiarski 
---
 drivers/gpu/drm/i915/i915_gem_userptr.c | 55 +++--
 1 file changed, 45 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_userptr.c 
b/drivers/gpu/drm/i915/i915_gem_userptr.c
index 382a77a1097e..b16b8e226e40 100644
--- a/drivers/gpu/drm/i915/i915_gem_userptr.c
+++ b/drivers/gpu/drm/i915/i915_gem_userptr.c
@@ -598,13 +598,43 @@ __i915_gem_userptr_get_pages_schedule(struct 
drm_i915_gem_object *obj)
return ERR_PTR(-EAGAIN);
 }
 
+static int
+probe_range(struct mm_struct *mm, unsigned long addr, unsigned long len)
+{
+   const unsigned long end = addr + len;
+   struct vm_area_struct *vma;
+   int ret = -EFAULT;
+
+   for (vma = find_vma(mm, addr); vma; vma = vma->vm_next) {
+   if (vma->vm_start > addr)
+   break;
+
+   /*
+* Exclude any VMA that is backed only by struct_page, i.e.
+* IO regions that include our own GGTT mmaps. We cannot handle
+* such ranges, as we may encounter deadlocks around our
+* struct_mutex on mmu_invalidate_range.
+*/
+   if (vma->vm_flags & (VM_PFNMAP | VM_MIXEDMAP))
+   break;
+
+   if (vma->vm_end >= end) {
+   ret = 0;
+   break;
+   }
+
+   addr = vma->vm_end;
+   }
+
+   return ret;
+}
+
 static int i915_gem_userptr_get_pages(struct drm_i915_gem_object *obj)
 {
const int num_pages = obj->base.size >> PAGE_SHIFT;
struct mm_struct *mm = obj->userptr.mm->mm;
struct page **pvec;
struct sg_table *pages;
-   bool active;
int pinned;
 
/* If userspace should engineer that these pages are replaced in
@@ -634,7 +664,6 @@ static int i915_gem_userptr_get_pages(struct 
drm_i915_gem_object *obj)
 
pvec = NULL;
pinned = 0;
-
if (mm == current->mm) {
pvec = kvmalloc_array(num_pages, sizeof(struct page *),
  GFP_KERNEL |
@@ -647,19 +676,25 @@ static int i915_gem_userptr_get_pages(struct 
drm_i915_gem_object *obj)
   pvec);
}
 
-   active = false;
+   down_read_nested(>mmap_sem, SINGLE_DEPTH_NESTING);
if (pinned < 0) {
pages = ERR_PTR(pinned);
pinned = 0;
-   } else if (pinned < num_pages) {
-   pages = __i915_gem_userptr_get_pages_schedule(obj);
-   active = pages == ERR_PTR(-EAGAIN);
+   } else if (pinned < num_pages &&
+  probe_range(mm, obj->userptr.ptr, obj->base.size)) {
+   pages = ERR_PTR(-EFAULT);
+   } else  if (__i915_gem_userptr_set_active(obj, true)) {
+   pages = ERR_PTR(-EAGAIN);
} else {
-   pages = __i915_gem_userptr_alloc_pages(obj, pvec, num_pages);
-   active = !IS_ERR(pages);
+   if (pinned < num_pages)
+   pages = __i915_gem_userptr_get_pages_schedule(obj);
+   else
+   pages = __i915_gem_userptr_alloc_pages(obj,
+  pvec, num_pages);
+   if (IS_ERR(pages) && pages != ERR_PTR(-EAGAIN))
+   __i915_gem_userptr_set_active(obj, false);
}
-   if (active)
-   __i915_gem_userptr_set_active(obj, true);
+   up_read(>mmap_sem);
 
if (IS_ERR(pages))
release_pages(pvec, pinned);
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH v2] drm/i915: Unifying debugfs return codes for unsupported features

2017-12-15 Thread Michal Wajdeczko
Instead of trying different seq_puts messages, lets use common
-ENODEV error code to indicate missing/unsupported feature.

v2: don't forget about guc_log_control fops (Sagar)

Suggested-by: Chris Wilson 
Signed-off-by: Michal Wajdeczko 
Cc: Chris Wilson 
Cc: Joonas Lahtinen 
Cc: Sagar Arun Kamble 
Cc: Sujaritha Sundaresan 
---
 drivers/gpu/drm/i915/i915_debugfs.c | 76 +++--
 1 file changed, 31 insertions(+), 45 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c 
b/drivers/gpu/drm/i915/i915_debugfs.c
index d8c6ec3..0ddce72 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1602,10 +1602,8 @@ static int i915_fbc_status(struct seq_file *m, void 
*unused)
 {
struct drm_i915_private *dev_priv = node_to_i915(m->private);
 
-   if (!HAS_FBC(dev_priv)) {
-   seq_puts(m, "FBC unsupported on this chipset\n");
-   return 0;
-   }
+   if (!HAS_FBC(dev_priv))
+   return -ENODEV;
 
intel_runtime_pm_get(dev_priv);
mutex_lock(_priv->fbc.lock);
@@ -1681,10 +1679,8 @@ static int i915_ips_status(struct seq_file *m, void 
*unused)
 {
struct drm_i915_private *dev_priv = node_to_i915(m->private);
 
-   if (!HAS_IPS(dev_priv)) {
-   seq_puts(m, "not supported\n");
-   return 0;
-   }
+   if (!HAS_IPS(dev_priv))
+   return -ENODEV;
 
intel_runtime_pm_get(dev_priv);
 
@@ -1770,10 +1766,8 @@ static int i915_ring_freq_table(struct seq_file *m, void 
*unused)
int gpu_freq, ia_freq;
unsigned int max_gpu_freq, min_gpu_freq;
 
-   if (!HAS_LLC(dev_priv)) {
-   seq_puts(m, "unsupported on this chipset\n");
-   return 0;
-   }
+   if (!HAS_LLC(dev_priv))
+   return -ENODEV;
 
intel_runtime_pm_get(dev_priv);
 
@@ -2253,8 +2247,8 @@ static int i915_huc_load_status_info(struct seq_file *m, 
void *data)
struct drm_i915_private *dev_priv = node_to_i915(m->private);
struct drm_printer p;
 
-   if (!HAS_HUC_UCODE(dev_priv))
-   return 0;
+   if (!HAS_HUC(dev_priv))
+   return -ENODEV;
 
p = drm_seq_file_printer(m);
intel_uc_fw_dump(_priv->huc.fw, );
@@ -2272,8 +2266,8 @@ static int i915_guc_load_status_info(struct seq_file *m, 
void *data)
struct drm_printer p;
u32 tmp, i;
 
-   if (!HAS_GUC_UCODE(dev_priv))
-   return 0;
+   if (!HAS_GUC(dev_priv))
+   return -ENODEV;
 
p = drm_seq_file_printer(m);
intel_uc_fw_dump(_priv->guc.fw, );
@@ -2346,29 +2340,16 @@ static void i915_guc_client_info(struct seq_file *m,
seq_printf(m, "\tTotal: %llu\n", tot);
 }
 
-static bool check_guc_submission(struct seq_file *m)
-{
-   struct drm_i915_private *dev_priv = node_to_i915(m->private);
-   const struct intel_guc *guc = _priv->guc;
-
-   if (!guc->execbuf_client) {
-   seq_printf(m, "GuC submission %s\n",
-  HAS_GUC_SCHED(dev_priv) ?
-  "disabled" :
-  "not supported");
-   return false;
-   }
-
-   return true;
-}
-
 static int i915_guc_info(struct seq_file *m, void *data)
 {
struct drm_i915_private *dev_priv = node_to_i915(m->private);
const struct intel_guc *guc = _priv->guc;
 
-   if (!check_guc_submission(m))
-   return 0;
+   if (!USES_GUC_SUBMISSION(dev_priv))
+   return -ENODEV;
+
+   GEM_BUG_ON(!guc->execbuf_client);
+   GEM_BUG_ON(!guc->preempt_client);
 
seq_printf(m, "Doorbell map:\n");
seq_printf(m, "\t%*pb\n", GUC_NUM_DOORBELLS, guc->doorbell_bitmap);
@@ -2395,8 +2376,8 @@ static int i915_guc_stage_pool(struct seq_file *m, void 
*data)
unsigned int tmp;
int index;
 
-   if (!check_guc_submission(m))
-   return 0;
+   if (!USES_GUC_SUBMISSION(dev_priv))
+   return -ENODEV;
 
for (index = 0; index < GUC_MAX_STAGE_DESCRIPTORS; index++, desc++) {
struct intel_engine_cs *engine;
@@ -2449,6 +2430,9 @@ static int i915_guc_log_dump(struct seq_file *m, void 
*data)
u32 *log;
int i = 0;
 
+   if (!HAS_GUC(dev_priv))
+   return -ENODEV;
+
if (dump_load_err)
obj = dev_priv->guc.load_err_log;
else if (dev_priv->guc.log.vma)
@@ -2480,6 +2464,9 @@ static int i915_guc_log_control_get(void *data, u64 *val)
 {
struct drm_i915_private *dev_priv = data;
 
+   if (!HAS_GUC(dev_priv))
+   return -ENODEV;
+
if (!dev_priv->guc.log.vma)
return -EINVAL;
 
@@ -2493,6 +2480,9 @@ static int 

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/userptr: Probe vma range before gup (rev4)

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915/userptr: Probe vma range before gup (rev4)
URL   : https://patchwork.freedesktop.org/series/35394/
State : failure

== Summary ==

Test gem_userptr_blits:
Subgroup map-fixed-invalidate-overlap-busy-gup:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Subgroup map-fixed-invalidate-gup:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw) fdo#104209
Subgroup sync-unmap-cycles:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Subgroup map-fixed-invalidate-overlap-gup:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Subgroup sync-unmap:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Subgroup map-fixed-invalidate-busy-gup:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Test kms_flip:
Subgroup vblank-vs-suspend:
incomplete -> PASS   (shard-hsw) fdo#103375
Subgroup vblank-vs-dpms-suspend:
pass   -> INCOMPLETE (shard-hsw) fdo#103540
Test gem_tiled_swapping:
Subgroup non-threaded:
pass   -> INCOMPLETE (shard-snb) fdo#104218 +1
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
fail   -> PASS   (shard-snb) fdo#101623 +1
Test gem_eio:
Subgroup in-flight-contexts:
pass   -> DMESG-WARN (shard-snb) fdo#104058

fdo#104209 https://bugs.freedesktop.org/show_bug.cgi?id=104209
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058

shard-hswtotal:2603 pass:1464 dwarn:1   dfail:0   fail:16  skip:1120 
time:8957s
shard-snbtotal:2645 pass:1265 dwarn:2   dfail:0   fail:18  skip:1359 
time:7873s
Blacklisted hosts:
shard-kbltotal:2645 pass:1749 dwarn:1   dfail:0   fail:38  skip:856 
time:10821s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7504/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] Warning in i915/intel_audio.c

2017-12-15 Thread Mika Kahola
On Fri, 2017-12-15 at 19:20 +0530, Jaswinder Singh Rajput wrote:
> On Fri, 2017-12-15 at 14:44 +0200, Mika Kahola wrote:
> > 
> > Hi,
> > 
> > This is a known issue. Could you try out this patch to see if that
> > would fix this issue for you?
> > 
> > https://patchwork.freedesktop.org/series/35389/
> > 
> Yes, Thanks. It works :-)
Great that it worked for you!

> 
> When this patch will merge with linus kernel.
If you can, you may add a Tested-by tag on the patch. It will help the
review process. This patch needs a review before its merged to our drm-
tip tree and eventually further on to Linus tree.

> 
> Thanks,
> --
> Jaswinder Singh Rajput
>  
> > 
> > On Fri, 2017-12-15 at 17:08 +0530, Jaswinder Singh Rajput wrote:
> > > 
> > > 
> > > Hello friends,
> > > 
> > > I am getting multiple warnings in i915/intel_audio.c . I am
> > > attaching 
> > > dmesg, config and lsmod for your reference.
> > > 
> > > 
> > > [0.390606] WARN_ON(pipe >= intel_info((dev_priv))->num_pipes)
> > > [0.390619] WARNING: CPU: 1 PID: 1051 at 
> > > drivers/gpu/drm/i915/intel_audio.c:757 get_saved_enc+0x74/0x80
> > > [0.390620] Modules linked in:
> > > [0.390621] CPU: 1 PID: 1051 Comm: kworker/1:2 Not tainted 
> > > 4.15.0-rc3+ #13
> > > [0.390622] Hardware name: Gigabyte Technology Co., Ltd. 
> > > H81M-S/H81M-S, BIOS F2 08/19/2015
> > > [0.390624] Workqueue: events azx_probe_work
> > > [0.390625] RIP: 0010:get_saved_enc+0x74/0x80
> > > [0.390626] RSP: 0018:9b650061fba8 EFLAGS: 00010292
> > > [0.390627] RAX: 0032 RBX: 888e17384cb8 RCX: 
> > > 
> > > [0.390627] RDX: 0001 RSI: 0002 RDI: 
> > > 97032bb0
> > > [0.390627] RBP: 888e1738 R08: 0032 R09: 
> > > 0032
> > > [0.390628] R10: 888e19cc3840 R11: 000344e0 R12: 
> > > 0100
> > > [0.390628] R13: 0001 R14: 888e168fba08 R15: 
> > > 888e168fba10
> > > [0.390629] FS:  ()
> > > GS:888e1f30() 
> > > knlGS:
> > > [0.390629] CS:  0010 DS:  ES:  CR0: 80050033
> > > [0.390630] CR2: 7f7dd01c6914 CR3: 3da0a001 CR4: 
> > > 000606e0
> > > [0.390630] Call Trace:
> > > [0.390633]  i915_audio_component_get_eld+0x43/0xe0
> > > [0.390635]  hdmi_present_sense+0x95/0x330
> > > [0.390636]  generic_hdmi_build_controls+0x143/0x1e0
> > > [0.390638]  snd_hda_codec_build_controls+0x178/0x1c0
> > > [0.390639]  ? snd_hda_codec_build_pcms+0x14f/0x1a0
> > > [0.390641]  hda_codec_driver_probe+0x76/0x100
> > > [0.390644]  driver_probe_device+0x27d/0x310
> > > [0.390645]  ? __driver_attach+0xa0/0xa0
> > > [0.390646]  bus_for_each_drv+0x50/0x80
> > > [0.390647]  __device_attach+0xb0/0x110
> > > [0.390649]  bus_probe_device+0x82/0x90
> > > [0.390650]  device_add+0x2dc/0x570
> > > [0.390652]  snd_hdac_device_register+0xd/0x40
> > > [0.390654]  snd_hda_codec_configure+0x32/0x120
> > > [0.390655]  azx_codec_configure+0x2a/0x60
> > > [0.390656]  azx_probe_work+0x40c/0x860
> > > [0.390659]  process_one_work+0x1d2/0x3c0
> > > [0.390660]  worker_thread+0x42/0x3e0
> > > [0.390661]  kthread+0xf0/0x130
> > > [0.390663]  ? trace_event_raw_event_workqueue_work+0x80/0x80
> > > [0.390664]  ? kthread_create_worker_on_cpu+0x40/0x40
> > > [0.390665]  ? call_usermodehelper_exec_async+0x11c/0x120
> > > [0.390667]  ret_from_fork+0x1f/0x30
> > > [0.390668] Code: 83 c2 01 39 d1 7f e0 31 c0 c3 83 78 70 0b 74
> > > f9
> > > 31 
> > > c0 85 d2 74 cb eb f1 48 c7 c6 d0 c0 df 96 48 c7 c7 57 dd db 96 e8
> > > 9c
> > > 2d 
> > > bf ff <0f> ff 31 c0 c3 0f 1f 80 00 00 00 00 41 57 4d 89 c7 41 56
> > > 49
> > > 89
> > > [0.390679] ---[ end trace 9a14f34c58dc94ff ]---
> > > 
> > > 
> > > Thanks,
> > > --
> > > Jaswinder Singh Rajput
> > > 
-- 
Mika Kahola - Intel OTC

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Extend CREATE_CONTEXT to allow inheritance ala clone()

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915: Extend CREATE_CONTEXT to allow inheritance ala clone()
URL   : https://patchwork.freedesktop.org/series/35405/
State : success

== Summary ==

Series 35405v1 drm/i915: Extend CREATE_CONTEXT to allow inheritance ala clone()
https://patchwork.freedesktop.org/api/1.0/series/35405/revisions/1/mbox/

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> PASS   (fi-elk-e7500) fdo#103989 +2
incomplete -> PASS   (fi-snb-2520m) fdo#103713
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
fail   -> PASS   (fi-gdg-551) fdo#102575
Test gem_sync:
Subgroup basic-all:
dmesg-fail -> FAIL   (fi-blb-e6850) fdo#104259
Subgroup basic-each:
skip   -> PASS   (fi-blb-e6850)
Subgroup basic-many-each:
skip   -> PASS   (fi-blb-e6850)
Subgroup basic-store-all:
skip   -> PASS   (fi-blb-e6850)
Subgroup basic-store-each:
skip   -> PASS   (fi-blb-e6850)
Test gem_tiled_blits:
Subgroup basic:
skip   -> PASS   (fi-blb-e6850)
Test gem_tiled_fence_blits:
Subgroup basic:
skip   -> PASS   (fi-blb-e6850)
Test gem_wait:
Subgroup basic-busy-all:
skip   -> PASS   (fi-blb-e6850)
Subgroup basic-wait-all:
skip   -> PASS   (fi-blb-e6850)
Subgroup basic-await-all:
skip   -> PASS   (fi-blb-e6850)
Test kms_busy:
Subgroup basic-flip-a:
skip   -> PASS   (fi-blb-e6850)
Subgroup basic-flip-b:
skip   -> PASS   (fi-blb-e6850)
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-legacy:
skip   -> PASS   (fi-blb-e6850)

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#104259 https://bugs.freedesktop.org/show_bug.cgi?id=104259

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:437s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:444s
fi-blb-e6850 total:288  pass:222  dwarn:1   dfail:0   fail:1   skip:64  
time:390s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:509s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:278s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:509s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:502s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:485s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:471s
fi-elk-e7500 total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551   total:288  pass:179  dwarn:1   dfail:0   fail:0   skip:108 
time:265s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:535s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:413s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:418s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:392s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:468s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:428s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:480s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:524s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:467s
fi-pnv-d510  total:288  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:588s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:448s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:536s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:557s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:495s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:440s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:554s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:415s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:587s
fi-cnl-y total:217  pass:196  dwarn:0   dfail:0   fail:0   skip:20 
fi-glk-dsi   total:285  pass:140  dwarn:114 dfail:0   fail:1   skip:29 
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:507s


Re: [Intel-gfx] [PATCH] drm/i915/lpe: Remove double-encapsulation of info string

2017-12-15 Thread Chris Wilson
Quoting Pandiyan, Dhinakaran (2017-12-14 22:03:49)
> On Wed, 2017-12-13 at 18:28 +, Chris Wilson wrote:
> > Just printk the string, or at least do not double up on the newlines!
> > 
> 
> Reviewed-by: Dhinakaran Pandiyan 

And pushed, thanks for the review.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH v2] drm/i915: Check for fused or unused pipes

2017-12-15 Thread Mika Kahola
We may have fused or unused pipes in our system. Let's check that the pipe
in question is within limits of accessible pipes. In case, that we are not
able to access the pipe, we return early with a warning.

v2: Rephrasing of the commit message (Jani)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103206
Reported-by: Thomas Gleixner 
Signed-off-by: Jani Nikula 
Signed-off-by: Mika Kahola 
---
 drivers/gpu/drm/i915/intel_audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_audio.c 
b/drivers/gpu/drm/i915/intel_audio.c
index f1502a0..522d54f 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -779,7 +779,7 @@ static struct intel_encoder *get_saved_enc(struct 
drm_i915_private *dev_priv,
 {
struct intel_encoder *encoder;
 
-   if (WARN_ON(pipe >= INTEL_INFO(dev_priv)->num_pipes))
+   if (WARN_ON(pipe >= ARRAY_SIZE(dev_priv->av_enc_map)))
return NULL;
 
/* MST */
-- 
2.7.4

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for kms_sysfs_edid timing and hack to run for BAT

2017-12-15 Thread Patchwork
== Series Details ==

Series: kms_sysfs_edid timing and hack to run for BAT
URL   : https://patchwork.freedesktop.org/series/35404/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
c0be3310715e2f744b892c51f09e62273bcc8e57 tests/kms_frontbuffer_tracking: 
Correctly handle debugfs errors

with latest DRM-Tip kernel build CI_DRM_3521
ad43db157c69 drm-tip: 2017y-12m-14d-20h-09m-53s UTC integration manifest

No testlist changes.

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989 +1
incomplete -> PASS   (fi-snb-2520m) fdo#103713
Test gem_sync:
Subgroup basic-all:
dmesg-fail -> FAIL   (fi-blb-e6850) fdo#104259
Subgroup basic-each:
skip   -> PASS   (fi-blb-e6850)
Subgroup basic-many-each:
skip   -> PASS   (fi-blb-e6850)
Subgroup basic-store-all:
skip   -> PASS   (fi-blb-e6850)
Subgroup basic-store-each:
skip   -> PASS   (fi-blb-e6850)
Test gem_tiled_blits:
Subgroup basic:
skip   -> PASS   (fi-blb-e6850)
Test gem_tiled_fence_blits:
Subgroup basic:
skip   -> PASS   (fi-blb-e6850)
Test gem_wait:
Subgroup basic-busy-all:
skip   -> PASS   (fi-blb-e6850)
Subgroup basic-wait-all:
skip   -> PASS   (fi-blb-e6850)
Subgroup basic-await-all:
skip   -> PASS   (fi-blb-e6850)
Test kms_busy:
Subgroup basic-flip-a:
skip   -> PASS   (fi-blb-e6850)
Subgroup basic-flip-b:
skip   -> PASS   (fi-blb-e6850)
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-legacy:
skip   -> PASS   (fi-blb-e6850)
Test kms_psr_sink_crc:
Subgroup psr_basic:
dmesg-warn -> PASS   (fi-skl-6700hq) fdo#101144

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104259 https://bugs.freedesktop.org/show_bug.cgi?id=104259
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:289  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:437s
fi-bdw-gvtdvmtotal:289  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:440s
fi-blb-e6850 total:289  pass:223  dwarn:1   dfail:0   fail:1   skip:64  
time:391s
fi-bsw-n3050 total:289  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:511s
fi-bwr-2160  total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:282s
fi-bxt-dsi   total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  
time:501s
fi-bxt-j4205 total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  
time:510s
fi-byt-j1900 total:289  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:490s
fi-byt-n2820 total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:479s
fi-elk-e7500 total:225  pass:164  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551   total:289  pass:178  dwarn:1   dfail:0   fail:1   skip:108 
time:274s
fi-glk-1 total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  
time:527s
fi-hsw-4770  total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:410s
fi-hsw-4770r total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  
time:421s
fi-ilk-650   total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  
time:392s
fi-ivb-3520m total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:482s
fi-ivb-3770  total:289  pass:256  dwarn:0   dfail:0   fail:0   skip:33  
time:432s
fi-kbl-7500u total:289  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:483s
fi-kbl-7560u total:289  pass:269  dwarn:1   dfail:0   fail:0   skip:19  
time:522s
fi-kbl-7567u total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:472s
fi-kbl-r total:289  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:530s
fi-pnv-d510  total:289  pass:221  dwarn:1   dfail:0   fail:1   skip:65  
time:594s
fi-skl-6260u total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:448s
fi-skl-6600u total:289  pass:261  dwarn:1   dfail:0   fail:0   skip:27  
time:537s
fi-skl-6700hqtotal:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  
time:561s
fi-skl-6770hqtotal:289  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:491s
fi-skl-gvtdvmtotal:289  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:445s
fi-snb-2520m total:289  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:555s
fi-snb-2600  total:289  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:420s
Blacklisted hosts:
fi-cfl-s2total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:603s
fi-cnl-y total:253  pass:226  dwarn:0   dfail:0   fail:0   

[Intel-gfx] [PATCH igt] igt: Exercise creating context with shared GTT

2017-12-15 Thread Chris Wilson
Signed-off-by: Chris Wilson 
Cc: Joonas Lahtinen 
Cc: Tvrtko Ursulin 
Cc: Mika Kuoppala 
---
 tests/Makefile.sources |   1 +
 tests/gem_ctx_shared.c | 294 +
 2 files changed, 295 insertions(+)
 create mode 100644 tests/gem_ctx_shared.c

diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index e4e06d01d..48b3f4625 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -58,6 +58,7 @@ TESTS_progs = \
gem_ctx_create \
gem_ctx_exec \
gem_ctx_param \
+   gem_ctx_shared \
gem_ctx_switch \
gem_ctx_thrash \
gem_double_irq_loop \
diff --git a/tests/gem_ctx_shared.c b/tests/gem_ctx_shared.c
new file mode 100644
index 0..2262fda47
--- /dev/null
+++ b/tests/gem_ctx_shared.c
@@ -0,0 +1,294 @@
+/*
+ * Copyright © 2017 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+#include "igt.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+IGT_TEST_DESCRIPTION("Test shared contexts.");
+
+struct local_i915_gem_context_create_v2 {
+   uint32_t ctx_id;
+   uint32_t flags;
+#define I915_GEM_CONTEXT_SHARE_GTT 0x1
+   uint32_t share_ctx;
+   uint32_t pad;
+};
+
+#define LOCAL_IOCTL_I915_GEM_CONTEXT_CREATE   DRM_IOWR (DRM_COMMAND_BASE + 
DRM_I915_GEM_CONTEXT_CREATE, struct local_i915_gem_context_create_v2)
+
+static int
+__gem_context_create_shared(int i915, uint32_t share, unsigned int flags,
+   uint32_t *out)
+{
+   struct local_i915_gem_context_create_v2 arg = {
+   .flags = flags,
+   .share_ctx = share,
+   };
+   int err = 0;
+
+   if (igt_ioctl(i915, LOCAL_IOCTL_I915_GEM_CONTEXT_CREATE, ))
+   err = -errno;
+
+   *out = arg.ctx_id;
+
+   errno = 0;
+   return err;
+}
+
+static uint32_t
+gem_context_create_shared(int i915, uint32_t share, unsigned int flags)
+{
+   uint32_t ctx;
+
+   igt_assert_eq(__gem_context_create_shared(i915, share, flags, ), 0);
+
+   return ctx;
+}
+
+static void create_shared_gtt(int i915, unsigned int flags)
+#define DETACHED 0x1
+{
+   const uint32_t bbe = MI_BATCH_BUFFER_END;
+   struct drm_i915_gem_exec_object2 obj = {
+   .handle = gem_create(i915, 4096),
+   };
+   struct drm_i915_gem_execbuffer2 execbuf = {
+   .buffers_ptr = to_user_pointer(),
+   .buffer_count = 1,
+   };
+   uint32_t parent, child;
+
+   gem_write(i915, obj.handle, 0, , sizeof(bbe));
+   gem_execbuf(i915, );
+   gem_sync(i915, obj.handle);
+
+   child = flags & DETACHED ? gem_context_create(i915) : 0;
+   igt_until_timeout(2) {
+   parent = flags & DETACHED ? child : 0;
+   child = gem_context_create_shared(i915, parent,
+ I915_GEM_CONTEXT_SHARE_GTT);
+   execbuf.rsvd1 = child;
+   gem_execbuf(i915, );
+
+   if (flags & DETACHED) {
+   gem_context_destroy(i915, parent);
+   gem_execbuf(i915, );
+   } else {
+   parent = child;
+   gem_context_destroy(i915, parent);
+   }
+
+   execbuf.rsvd1 = parent;
+   igt_assert_eq(__gem_execbuf(i915, ), -ENOENT);
+   igt_assert_eq(__gem_context_create_shared(i915, parent,
+ 
I915_GEM_CONTEXT_SHARE_GTT,
+ ), -ENOENT);
+   }
+   if (flags & DETACHED)
+   gem_context_destroy(i915, child);
+
+   

[Intel-gfx] [RFC] drm/i915: Extend CREATE_CONTEXT to allow inheritance ala clone()

2017-12-15 Thread Chris Wilson
A context encompasses the driver's view of process related state, and
encapsulates the logical GPU state where available. Each context is
currently equivalent to a process in CPU terms. Like with processes,
sometimes the user wants a lighter encapsulation that shares some state
with the parent process, for example two threads have unique register
state but share the virtual memory mappings. We can support exactly the
same principle using contexts where we may share the GTT but keep the
logical GPU state distinct. This allows quicker switching between those
contexts, and for userspace to allocate a single offset in the GTT and
use it across multiple contexts. Like with clone(), in the future we may
wish to allow userspace to select more features to copy across from the
parent, but for now we only allow sharing of the GTT.

Note that if full per-process GTT is not supported on the harder, the
GTT are already implicitly shared between contexts, and this request
to create contexts with shared GTT fails. With full ppGTT, every fd
(i.e. every process) is allocated a unique GTT so this request cannot be
used to share GTT between processes/fds, it can only share GTT belonging
to this fd.

Testcase: igt/gem_ctx_shared
Signed-off-by: Chris Wilson 
Cc: Joonas Lahtinen 
Cc: Tvrtko Ursulin 
Cc: Mika Kuoppala 
Cc: Michał Winiarski 
---
 drivers/gpu/drm/i915/i915_gem_context.c   |  62 --
 drivers/gpu/drm/i915/i915_gem_gtt.c   |   4 +-
 drivers/gpu/drm/i915/i915_gem_gtt.h   |   1 -
 drivers/gpu/drm/i915/selftests/huge_pages.c   |   1 -
 drivers/gpu/drm/i915/selftests/i915_gem_context.c | 234 +-
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c |   1 -
 drivers/gpu/drm/i915/selftests/mock_context.c |   2 +-
 include/uapi/drm/i915_drm.h   |  11 +-
 8 files changed, 241 insertions(+), 75 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_context.c 
b/drivers/gpu/drm/i915/i915_gem_context.c
index 648e7536ff51..3e480b22cc44 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -109,6 +109,8 @@ static void lut_close(struct i915_gem_context *ctx)
struct i915_vma *vma = rcu_dereference_raw(*slot);
 
radix_tree_iter_delete(>handles_vma, , slot);
+
+   vma->open_count--;
__i915_gem_object_release_unless_active(vma->obj);
}
rcu_read_unlock();
@@ -201,8 +203,6 @@ static void context_close(struct i915_gem_context *ctx)
 * the ppgtt).
 */
lut_close(ctx);
-   if (ctx->ppgtt)
-   i915_ppgtt_close(>ppgtt->base);
 
ctx->file_priv = ERR_PTR(-EBADF);
i915_gem_context_put(ctx);
@@ -338,6 +338,8 @@ static void __destroy_hw_context(struct i915_gem_context 
*ctx,
context_close(ctx);
 }
 
+#define CREATE_VM BIT(0)
+
 /**
  * The default context needs to exist per ring that uses contexts. It stores 
the
  * context state of the GPU for applications that don't utilize HW contexts, as
@@ -345,7 +347,8 @@ static void __destroy_hw_context(struct i915_gem_context 
*ctx,
  */
 static struct i915_gem_context *
 i915_gem_create_context(struct drm_i915_private *dev_priv,
-   struct drm_i915_file_private *file_priv)
+   struct drm_i915_file_private *file_priv,
+   unsigned int flags)
 {
struct i915_gem_context *ctx;
 
@@ -358,7 +361,7 @@ i915_gem_create_context(struct drm_i915_private *dev_priv,
if (IS_ERR(ctx))
return ctx;
 
-   if (USES_FULL_PPGTT(dev_priv)) {
+   if (flags & CREATE_VM && USES_FULL_PPGTT(dev_priv)) {
struct i915_hw_ppgtt *ppgtt;
 
ppgtt = i915_ppgtt_create(dev_priv, file_priv, ctx->name);
@@ -423,7 +426,7 @@ i915_gem_context_create_kernel(struct drm_i915_private 
*i915, int prio)
 {
struct i915_gem_context *ctx;
 
-   ctx = i915_gem_create_context(i915, NULL);
+   ctx = i915_gem_create_context(i915, NULL, CREATE_VM);
if (IS_ERR(ctx))
return ctx;
 
@@ -545,7 +548,7 @@ int i915_gem_context_open(struct drm_i915_private *i915,
idr_init(_priv->context_idr);
 
mutex_lock(>drm.struct_mutex);
-   ctx = i915_gem_create_context(i915, file_priv);
+   ctx = i915_gem_create_context(i915, file_priv, CREATE_VM);
mutex_unlock(>drm.struct_mutex);
if (IS_ERR(ctx)) {
idr_destroy(_priv->context_idr);
@@ -642,10 +645,12 @@ int i915_gem_context_create_ioctl(struct drm_device *dev, 
void *data,
  struct drm_file *file)
 {
struct drm_i915_private *dev_priv = to_i915(dev);
-   struct drm_i915_gem_context_create *args = data;
+   struct drm_i915_gem_context_create_v2 *args = 

[Intel-gfx] [PATCH i-g-t v2 2/2] HACK to get kms_sysfs_edid_timing run on more machines

2017-12-15 Thread Marta Lofstedt
Signed-off-by: Marta Lofstedt 
---
 tests/intel-ci/fast-feedback.testlist | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/intel-ci/fast-feedback.testlist 
b/tests/intel-ci/fast-feedback.testlist
index f71a16bc..a6c3f614 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -1,5 +1,5 @@
 # Keep alphabetically sorted by default
-
+igt@kms_sysfs_edid_timing 
 igt@core_auth@basic-auth
 igt@core_prop_blob@basic
 igt@debugfs_test@read_all_entries
-- 
2.11.0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH i-g-t v2 0/2] kms_sysfs_edid timing and hack to run for BAT

2017-12-15 Thread Marta Lofstedt
It is possoble to get very mysterious results from kms_sysfs_edid timing
Since there is no try-bot for IGT I am using IGT PW to get more data.

Marta Lofstedt (2):
  test/kms_sysfs_edid_timing : Increase THRESHOLD_PER_CONNECTOR and
THRESHOLD_TOTAL
  HACK to get kms_sysfs_edid_timing run on more machines

 tests/intel-ci/fast-feedback.testlist |  2 +-
 tests/kms_sysfs_edid_timing.c | 14 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

-- 
2.11.0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH i-g-t v2 1/2] test/kms_sysfs_edid_timing : Increase THRESHOLD_PER_CONNECTOR and THRESHOLD_TOTAL

2017-12-15 Thread Marta Lofstedt
The discussion on how to fix the issues has been stagnant for a
long time, see the Bugzilla below and:
https://patchwork.freedesktop.org/patch/170429/

After only changing display cable the result of my machine went
from always failing to hit a WARN. This is also illustrated on
CI-shards, where the shard-apl flip-flop between pass and WARN
and the shard-kbl always fail. This made me realize that the
THRESHOLD_PER_CONNECTOR also needed to be updated, while previous
discussion only touched the THRESHOLD_TOTAL. As discussed in
provided links the motivation for this test is to discover big
anomalies in edid timings, but with the current tight thresholds
we are hitting the issues too often.

V2: increased thresholds further after patchwork results.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100047
Signed-off-by: Marta Lofstedt 
---
 tests/kms_sysfs_edid_timing.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tests/kms_sysfs_edid_timing.c b/tests/kms_sysfs_edid_timing.c
index 12013881..53d96c1c 100644
--- a/tests/kms_sysfs_edid_timing.c
+++ b/tests/kms_sysfs_edid_timing.c
@@ -26,8 +26,8 @@
 #include 
 #include 
 
-#define THRESHOLD_PER_CONNECTOR10
-#define THRESHOLD_TOTAL50
+#define THRESHOLD_PER_CONNECTOR20
+#define THRESHOLD_TOTAL150
 #define CHECK_TIMES15
 
 IGT_TEST_DESCRIPTION("This check the time we take to read the content of all "
@@ -75,21 +75,21 @@ igt_simple_main
close(fd);
}
 
-   igt_debug("%s: mean.max %.2fns, %.2fus, %.2fms, "
+   igt_info("%s: mean.max %.2fns, %.2fus, %.2fms, "
  "mean.avg %.2fns, %.2fus, %.2fms\n",
  de->d_name,
  mean.max, mean.max / 1e3, mean.max / 1e6,
  mean.mean, mean.mean / 1e3, mean.mean / 1e6);
 
if (mean.max > (THRESHOLD_PER_CONNECTOR * 1e6)) {
-   igt_warn("%s: probe time exceed 10ms, "
+   igt_warn("%s: probe time exceed %ims, "
 "max=%.2fms, avg=%.2fms\n", de->d_name,
-mean.max / 1e6, mean.mean / 1e6);
+THRESHOLD_PER_CONNECTOR, mean.max / 1e6, 
mean.mean / 1e6);
}
igt_assert_f(mean.mean < (THRESHOLD_TOTAL * 1e6),
-"%s: average probe time exceeded 50ms, "
+"%s: average probe time exceeded %ims, "
 "max=%.2fms, avg=%.2fms\n", de->d_name,
-mean.max / 1e6, mean.mean / 1e6);
+THRESHOLD_TOTAL, mean.max / 1e6, mean.mean / 1e6);
 
}
closedir(dirp);
-- 
2.11.0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Correctly handle debugfs errors

2017-12-15 Thread Chris Wilson
Quoting Joonas Lahtinen (2017-12-04 10:45:13)
> On Tue, 2017-11-28 at 17:29 +, Chris Wilson wrote:
> > Quoting Michal Wajdeczko (2017-11-28 17:01:15)
> > > In commit 3f6ae7b19 ("igt/kms_frontbuffer_tracking: Keep the debugfs
> > > dir around") we introduced custom variant of __igt_debugfs_read function
> > > that fires assert when debugfs returns an error. Replace that assert
> > > with proper error handling to allow use of errors like -ENODEV.
> > 
> > Like ENODEV or just ENODEV?
> > 
> > Oh, it appears I goofed in c5da0662d1c0 and didn't change the open error
> > from a bool to an int error code. You could also take the opportunity to
> > then return -errno.
> > 
> > And here we can debate whether you want to use
> > 
> > if (len < 0) {
> >   igt_assert_eq(len, -ENODEV);
> >   len = 0;
> > }
> 
> Let's be explicit at this time, can you resend (with the R-b and this
> change), Michal. I'll then merge this and the kernel patch.

And v2 was applied.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Ignore TMDS clock limit for DP++ when EDID override is set (rev2)

2017-12-15 Thread Patchwork
== Series Details ==

Series: drm/i915: Ignore TMDS clock limit for DP++ when EDID override is set 
(rev2)
URL   : https://patchwork.freedesktop.org/series/35338/
State : success

== Summary ==

Test kms_frontbuffer_tracking:
Subgroup fbc-1p-primscrn-cur-indfb-move:
pass   -> SKIP   (shard-hsw) fdo#101623 +1
Test gem_tiled_swapping:
Subgroup non-threaded:
dmesg-warn -> PASS   (shard-hsw) fdo#104218 +1
Test kms_flip:
Subgroup vblank-vs-suspend:
incomplete -> PASS   (shard-hsw) fdo#103375 +2

fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375

shard-hswtotal:2712 pass:1535 dwarn:1   dfail:0   fail:10  skip:1166 
time:9321s
shard-snbtotal:2712 pass:1308 dwarn:1   dfail:0   fail:11  skip:1392 
time:7924s
Blacklisted hosts:
shard-apltotal:2650 pass:1645 dwarn:1   dfail:0   fail:24  skip:979 
time:13349s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7503/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


  1   2   >