[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Fix documentation for __intel_wait_for_register_fw*

2019-08-03 Thread Patchwork
== Series Details ==

Series: drm/i915: Fix documentation for __intel_wait_for_register_fw*
URL   : https://patchwork.freedesktop.org/series/64608/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_6614_full -> Patchwork_13850_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_13850_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_13850_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Possible new issues
---

  Here are the unknown changes that may have been introduced in 
Patchwork_13850_full:

### IGT changes ###

 Possible regressions 

  * igt@kms_cursor_crc@pipe-b-cursor-suspend:
- shard-apl:  [PASS][1] -> [DMESG-WARN][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6614/shard-apl1/igt@kms_cursor_...@pipe-b-cursor-suspend.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13850/shard-apl5/igt@kms_cursor_...@pipe-b-cursor-suspend.html

  
Known issues


  Here are the changes found in Patchwork_13850_full that come from known 
issues:

### IGT changes ###

 Issues hit 

  * igt@gem_exec_balancer@smoke:
- shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#110854])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6614/shard-iclb1/igt@gem_exec_balan...@smoke.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13850/shard-iclb6/igt@gem_exec_balan...@smoke.html

  * igt@gem_exec_create@madvise:
- shard-apl:  [PASS][5] -> [INCOMPLETE][6] ([fdo#103927])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6614/shard-apl7/igt@gem_exec_cre...@madvise.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13850/shard-apl7/igt@gem_exec_cre...@madvise.html

  * igt@gem_exec_parallel@fds:
- shard-glk:  [PASS][7] -> [DMESG-WARN][8] ([fdo#105763] / 
[fdo#106538])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6614/shard-glk1/igt@gem_exec_paral...@fds.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13850/shard-glk2/igt@gem_exec_paral...@fds.html

  * igt@i915_pm_rpm@system-suspend-execbuf:
- shard-iclb: [PASS][9] -> [INCOMPLETE][10] ([fdo#107713] / 
[fdo#108840])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6614/shard-iclb7/igt@i915_pm_...@system-suspend-execbuf.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13850/shard-iclb2/igt@i915_pm_...@system-suspend-execbuf.html

  * igt@i915_suspend@forcewake:
- shard-kbl:  [PASS][11] -> [DMESG-WARN][12] ([fdo#108566]) +1 
similar issue
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6614/shard-kbl4/igt@i915_susp...@forcewake.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13850/shard-kbl4/igt@i915_susp...@forcewake.html

  * igt@kms_cursor_crc@pipe-c-cursor-256x256-sliding:
- shard-skl:  [PASS][13] -> [FAIL][14] ([fdo#103232])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6614/shard-skl5/igt@kms_cursor_...@pipe-c-cursor-256x256-sliding.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13850/shard-skl3/igt@kms_cursor_...@pipe-c-cursor-256x256-sliding.html

  * igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
- shard-hsw:  [PASS][15] -> [FAIL][16] ([fdo#105767])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6614/shard-hsw1/igt@kms_cursor_leg...@2x-long-cursor-vs-flip-legacy.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13850/shard-hsw4/igt@kms_cursor_leg...@2x-long-cursor-vs-flip-legacy.html

  * igt@kms_flip@flip-vs-suspend:
- shard-hsw:  [PASS][17] -> [INCOMPLETE][18] ([fdo#103540])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6614/shard-hsw8/igt@kms_f...@flip-vs-suspend.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13850/shard-hsw4/igt@kms_f...@flip-vs-suspend.html

  * igt@kms_flip@flip-vs-suspend-interruptible:
- shard-skl:  [PASS][19] -> [INCOMPLETE][20] ([fdo#109507])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6614/shard-skl3/igt@kms_f...@flip-vs-suspend-interruptible.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13850/shard-skl7/igt@kms_f...@flip-vs-suspend-interruptible.html
- shard-apl:  [PASS][21] -> [DMESG-WARN][22] ([fdo#108566]) +2 
similar issues
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6614/shard-apl2/igt@kms_f...@flip-vs-suspend-interruptible.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13850/shard-apl4/igt@kms_f...@flip-vs-suspend-interruptible.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-render:
- shard-iclb: [PASS][23] -> [FAIL][24] ([fdo#103167]) +5 similar 

[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/3] drm/i915/execlists: Always clear pending requests on reset (rev3)

2019-08-03 Thread Patchwork
== Series Details ==

Series: series starting with [1/3] drm/i915/execlists: Always clear 
pending requests on reset (rev3)
URL   : https://patchwork.freedesktop.org/series/64426/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6612_full -> Patchwork_13847_full


Summary
---

  **SUCCESS**

  No regressions found.

  

Known issues


  Here are the changes found in Patchwork_13847_full that come from known 
issues:

### IGT changes ###

 Issues hit 

  * igt@kms_cursor_crc@pipe-a-cursor-64x64-offscreen:
- shard-snb:  [PASS][1] -> [SKIP][2] ([fdo#109271])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-snb5/igt@kms_cursor_...@pipe-a-cursor-64x64-offscreen.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13847/shard-snb7/igt@kms_cursor_...@pipe-a-cursor-64x64-offscreen.html

  * igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-apl:  [PASS][3] -> [DMESG-WARN][4] ([fdo#108566]) +2 
similar issues
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-apl1/igt@kms_cursor_...@pipe-c-cursor-suspend.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13847/shard-apl2/igt@kms_cursor_...@pipe-c-cursor-suspend.html

  * igt@kms_flip@flip-vs-expired-vblank:
- shard-skl:  [PASS][5] -> [FAIL][6] ([fdo#105363])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-skl7/igt@kms_f...@flip-vs-expired-vblank.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13847/shard-skl1/igt@kms_f...@flip-vs-expired-vblank.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render:
- shard-iclb: [PASS][7] -> [FAIL][8] ([fdo#103167]) +4 similar 
issues
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-iclb4/igt@kms_frontbuffer_track...@fbc-1p-primscrn-cur-indfb-draw-render.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13847/shard-iclb2/igt@kms_frontbuffer_track...@fbc-1p-primscrn-cur-indfb-draw-render.html

  * igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min:
- shard-skl:  [PASS][9] -> [FAIL][10] ([fdo#108145])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-skl4/igt@kms_plane_alpha_bl...@pipe-b-constant-alpha-min.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13847/shard-skl9/igt@kms_plane_alpha_bl...@pipe-b-constant-alpha-min.html

  * igt@kms_psr@psr2_cursor_blt:
- shard-iclb: [PASS][11] -> [SKIP][12] ([fdo#109441]) +2 similar 
issues
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13847/shard-iclb6/igt@kms_psr@psr2_cursor_blt.html

  * igt@perf@polling:
- shard-skl:  [PASS][13] -> [FAIL][14] ([fdo#110728])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-skl10/igt@p...@polling.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13847/shard-skl1/igt@p...@polling.html

  * igt@perf_pmu@rc6:
- shard-kbl:  [PASS][15] -> [SKIP][16] ([fdo#109271])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-kbl4/igt@perf_...@rc6.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13847/shard-kbl1/igt@perf_...@rc6.html

  
 Possible fixes 

  * igt@gem_ctx_shared@q-smoketest-default:
- shard-iclb: [INCOMPLETE][17] ([fdo#107713]) -> [PASS][18]
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-iclb7/igt@gem_ctx_sha...@q-smoketest-default.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13847/shard-iclb1/igt@gem_ctx_sha...@q-smoketest-default.html

  * igt@gem_exec_balancer@smoke:
- shard-iclb: [SKIP][19] ([fdo#110854]) -> [PASS][20]
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-iclb6/igt@gem_exec_balan...@smoke.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13847/shard-iclb4/igt@gem_exec_balan...@smoke.html

  * igt@i915_pm_rpm@pm-tiling:
- shard-iclb: [INCOMPLETE][21] ([fdo#107713] / [fdo#108840]) -> 
[PASS][22]
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-iclb2/igt@i915_pm_...@pm-tiling.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13847/shard-iclb2/igt@i915_pm_...@pm-tiling.html

  * igt@kms_cursor_crc@pipe-c-cursor-256x256-sliding:
- shard-skl:  [FAIL][23] ([fdo#103232]) -> [PASS][24]
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-skl2/igt@kms_cursor_...@pipe-c-cursor-256x256-sliding.html
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13847/shard-skl5/igt@kms_cursor_...@pipe-c-cursor-256x256-sliding.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-skl:  [FAIL][25] ([fdo#105363]) -> [PASS][26]
   [25]: 

Re: [Intel-gfx] [PATCH v3 1/1] drm/vblank: drop use of DRM_WAIT_ON()

2019-08-03 Thread Sam Ravnborg
Hi all.

On Fri, Jul 26, 2019 at 11:06:58PM +0200, Sam Ravnborg wrote:
> DRM_WAIT_ON() is from the deprecated drm_os_linux header and
> the modern replacement is the wait_event_*.
> 
> The return values differ, so a conversion is needed to
> keep the original interface towards userspace.
> Introduced a switch/case to make code obvious.

Patch passes igt testing, and Michel was happy with it.
It is now applied to drm-misc-next and pushed out.

With this we have one less user of drm_os_linux.h
(only very few remains)

And one less cryptic macro use.

Sam

> 
> Analysis from Michel Dänzer:
> 
> The waiting condition rely on all relevant places where vblank_count
> is modified calls wake_up(>queue).
> 
> drm_handle_vblank():
> - Calls wake_up(>queue)
> 
> drm_vblank_enable():
> - There is no need here because there can be no sleeping waiters
>   in the queue, because vblank->enabled == false immediately
>   terminates any waits.
> 
> drm_crtc_accurate_vblank_count():
> - This is called from interrupt handlers, at least from
>   amdgpu_dm.c:dm_pflip_high_irq(). Not sure it needs to wake up
>   the queue though, the driver should call
>   drm_(crtc_)_handle_vblank anyway.
> 
> drm_vblank_disable_and_save():
> - It can be called from an interrupt, via drm_handle_vblank ->
>   vblank_disable_fn. However, the only place where
>   drm_vblank_disable_and_save can be called with sleeping waiters
>   in the queue is in drm_crtc_vblank_off, which wakes up the queue
>   afterwards (which terminates all waits, because
>   vblank->enabled == false at this point).
> 
> v3:
> - Added analysis to changelog from Michel Dänzer
> - Moved return result handling inside if (req_seq != seq) (Daniel V)
> - Reused more of the former logic - resulting in simpler code
> - Dropped Reviewed-by from Sean Paul as this is a new implmentation
> 
> v2:
> - Fix so the case where req_seq equals seq was handled properly
> - quick hack to check if IGT became happy
> - Only sent to igt, not to dri-devel
> 
> Signed-off-by: Sam Ravnborg 
> Cc: "Michel Dänzer" 
> Cc: Sean Paul 
> Cc: Maarten Lankhorst 
> Cc: Maxime Ripard 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> ---
> 
> This patch survives my testing here.
> vbltest spits out the same value as before, and I can see something on
> the screen.
> Added intel-gfx@lists.freedesktop.org, as IGT have identified troubles
> with this in v1.
> 
>   Sam
> 
>  drivers/gpu/drm/drm_vblank.c | 25 -
>  1 file changed, 20 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
> index 603ab105125d..fd1fbc77871f 100644
> --- a/drivers/gpu/drm/drm_vblank.c
> +++ b/drivers/gpu/drm/drm_vblank.c
> @@ -31,7 +31,6 @@
>  #include 
>  #include 
>  #include 
> -#include 
>  #include 
>  
>  #include "drm_internal.h"
> @@ -1670,12 +1669,28 @@ int drm_wait_vblank_ioctl(struct drm_device *dev, 
> void *data,
>   }
>  
>   if (req_seq != seq) {
> + int wait;
> +
>   DRM_DEBUG("waiting on vblank count %llu, crtc %u\n",
> req_seq, pipe);
> - DRM_WAIT_ON(ret, vblank->queue, 3 * HZ,
> - vblank_passed(drm_vblank_count(dev, pipe),
> -   req_seq) ||
> - !READ_ONCE(vblank->enabled));
> + wait = wait_event_interruptible_timeout(vblank->queue,
> + vblank_passed(drm_vblank_count(dev, pipe), req_seq) ||
> +   !READ_ONCE(vblank->enabled),
> + msecs_to_jiffies(3000));
> +
> + switch (wait) {
> + case 0:
> + /* timeout */
> + ret = -EBUSY;
> + break;
> + case -ERESTARTSYS:
> + /* interrupted by signal */
> + ret = -EINTR;
> + break;
> + default:
> + ret = 0;
> + break;
> + }
>   }
>  
>   if (ret != -EINTR) {
> -- 
> 2.20.1
> 
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
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/pmu: Use GT parked for estimating RC6 while asleep (rev2)

2019-08-03 Thread Patchwork
== Series Details ==

Series: drm/i915/pmu: Use GT parked for estimating RC6 while asleep (rev2)
URL   : https://patchwork.freedesktop.org/series/56583/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6622 -> Patchwork_13864


Summary
---

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13864/

Known issues


  Here are the changes found in Patchwork_13864 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@i915_selftest@live_blt:
- fi-icl-dsi: [PASS][1] -> [INCOMPLETE][2] ([fdo#107713])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6622/fi-icl-dsi/igt@i915_selftest@live_blt.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13864/fi-icl-dsi/igt@i915_selftest@live_blt.html

  * igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u:   [PASS][3] -> [FAIL][4] ([fdo#109485])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6622/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13864/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html

  
 Possible fixes 

  * igt@gem_ctx_create@basic-files:
- fi-cml-u:   [INCOMPLETE][5] ([fdo#110566]) -> [PASS][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6622/fi-cml-u/igt@gem_ctx_cre...@basic-files.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13864/fi-cml-u/igt@gem_ctx_cre...@basic-files.html

  * igt@gem_exec_suspend@basic-s4-devices:
- fi-blb-e6850:   [INCOMPLETE][7] ([fdo#107718]) -> [PASS][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6622/fi-blb-e6850/igt@gem_exec_susp...@basic-s4-devices.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13864/fi-blb-e6850/igt@gem_exec_susp...@basic-s4-devices.html

  * igt@i915_pm_rpm@module-reload:
- fi-icl-u3:  [DMESG-WARN][9] ([fdo#107724]) -> [PASS][10]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6622/fi-icl-u3/igt@i915_pm_...@module-reload.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13864/fi-icl-u3/igt@i915_pm_...@module-reload.html

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
- fi-icl-dsi: [DMESG-WARN][11] ([fdo#106107]) -> [PASS][12]
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6622/fi-icl-dsi/igt@kms_pipe_crc_ba...@nonblocking-crc-pipe-a.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13864/fi-icl-dsi/igt@kms_pipe_crc_ba...@nonblocking-crc-pipe-a.html

  
  {name}: This element is suppressed. This means it is ignored when computing
  the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485
  [fdo#109644]: https://bugs.freedesktop.org/show_bug.cgi?id=109644
  [fdo#110464]: https://bugs.freedesktop.org/show_bug.cgi?id=110464
  [fdo#110566]: https://bugs.freedesktop.org/show_bug.cgi?id=110566


Participating hosts (54 -> 46)
--

  Additional (1): fi-icl-u4 
  Missing(9): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks 
fi-bsw-cyan fi-pnv-d510 fi-icl-y fi-byt-clapper fi-bdw-samus 


Build changes
-

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_6622 -> Patchwork_13864

  CI-20190529: 20190529
  CI_DRM_6622: 6f7f68310b2e85745f568ebab0c17f25d2fccc82 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5120: b3138fbea79d5d7935e53530b90efe3e816236f4 @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_13864: 63e1c3820a83b5fc63b0abe0af87740b67b2e38c @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

63e1c3820a83 drm/i915/pmu: Use GT parked for estimating RC6 while asleep

== Logs ==

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

[Intel-gfx] [PATCH] drm/i915/pmu: Use GT parked for estimating RC6 while asleep

2019-08-03 Thread Chris Wilson
As we track when we put the GT device to sleep upon idling, we can use
that callback to sample the current rc6 counters and record the
timestamp for estimating samples after that point while asleep.

v2: Stick to using ktime_t

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105010
Signed-off-by: Chris Wilson 
Cc: Tvrtko Ursulin 
---
 drivers/gpu/drm/i915/i915_debugfs.c |  21 +++--
 drivers/gpu/drm/i915/i915_pmu.c | 120 ++--
 drivers/gpu/drm/i915/i915_pmu.h |   4 +-
 3 files changed, 69 insertions(+), 76 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c 
b/drivers/gpu/drm/i915/i915_debugfs.c
index 19f156a7f501..80da59b5a1b0 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -39,6 +39,7 @@
 #include "display/intel_psr.h"
 
 #include "gem/i915_gem_context.h"
+#include "gt/intel_gt_pm.h"
 #include "gt/intel_reset.h"
 #include "gt/uc/intel_guc_submission.h"
 
@@ -4063,13 +4064,11 @@ static int i915_sseu_status(struct seq_file *m, void 
*unused)
 static int i915_forcewake_open(struct inode *inode, struct file *file)
 {
struct drm_i915_private *i915 = inode->i_private;
+   struct intel_gt *gt = >gt;
 
-   if (INTEL_GEN(i915) < 6)
-   return 0;
-
-   file->private_data =
-   (void *)(uintptr_t)intel_runtime_pm_get(>runtime_pm);
-   intel_uncore_forcewake_user_get(>uncore);
+   intel_gt_pm_get(gt);
+   if (INTEL_GEN(i915) >= 6)
+   intel_uncore_forcewake_user_get(gt->uncore);
 
return 0;
 }
@@ -4077,13 +4076,11 @@ static int i915_forcewake_open(struct inode *inode, 
struct file *file)
 static int i915_forcewake_release(struct inode *inode, struct file *file)
 {
struct drm_i915_private *i915 = inode->i_private;
+   struct intel_gt *gt = >gt;
 
-   if (INTEL_GEN(i915) < 6)
-   return 0;
-
-   intel_uncore_forcewake_user_put(>uncore);
-   intel_runtime_pm_put(>runtime_pm,
-(intel_wakeref_t)(uintptr_t)file->private_data);
+   if (INTEL_GEN(i915) >= 6)
+   intel_uncore_forcewake_user_put(>uncore);
+   intel_gt_pm_put(gt);
 
return 0;
 }
diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index c2e5f6d5c1e0..61d4fa99e413 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -115,19 +115,51 @@ static bool pmu_needs_timer(struct i915_pmu *pmu, bool 
gpu_active)
return enable;
 }
 
+static u64 __get_rc6(struct intel_gt *gt)
+{
+   struct drm_i915_private *i915 = gt->i915;
+   u64 val;
+
+   val = intel_rc6_residency_ns(i915,
+IS_VALLEYVIEW(i915) ?
+VLV_GT_RENDER_RC6 :
+GEN6_GT_GFX_RC6);
+
+   if (HAS_RC6p(i915))
+   val += intel_rc6_residency_ns(i915, GEN6_GT_GFX_RC6p);
+
+   if (HAS_RC6pp(i915))
+   val += intel_rc6_residency_ns(i915, GEN6_GT_GFX_RC6pp);
+
+   return val;
+}
+
 void i915_pmu_gt_parked(struct drm_i915_private *i915)
 {
struct i915_pmu *pmu = >pmu;
+   u64 val;
 
if (!pmu->base.event_init)
return;
 
spin_lock_irq(>lock);
+
+   val = 0;
+   if (pmu->sample[__I915_SAMPLE_RC6].cur)
+   val = __get_rc6(>gt);
+
+   if (val >= pmu->sample[__I915_SAMPLE_RC6_ESTIMATED].cur) {
+   pmu->sample[__I915_SAMPLE_RC6_ESTIMATED].cur = 0;
+   pmu->sample[__I915_SAMPLE_RC6].cur = val;
+   }
+   pmu->sleep_last = ktime_get();
+
/*
 * Signal sampling timer to stop if only engine events are enabled and
 * GPU went idle.
 */
pmu->timer_enabled = pmu_needs_timer(pmu, false);
+
spin_unlock_irq(>lock);
 }
 
@@ -142,6 +174,11 @@ static void __i915_pmu_maybe_start_timer(struct i915_pmu 
*pmu)
}
 }
 
+static inline s64 ktime_since(const ktime_t kt)
+{
+   return ktime_to_ns(ktime_sub(ktime_get(), kt));
+}
+
 void i915_pmu_gt_unparked(struct drm_i915_private *i915)
 {
struct i915_pmu *pmu = >pmu;
@@ -150,10 +187,22 @@ void i915_pmu_gt_unparked(struct drm_i915_private *i915)
return;
 
spin_lock_irq(>lock);
+
/*
 * Re-enable sampling timer when GPU goes active.
 */
__i915_pmu_maybe_start_timer(pmu);
+
+   /* Estimate how long we slept and accumulate that into rc6 counters */
+   if (pmu->sample[__I915_SAMPLE_RC6].cur) {
+   u64 val;
+
+   val = ktime_since(pmu->sleep_last);
+   val += pmu->sample[__I915_SAMPLE_RC6].cur;
+
+   pmu->sample[__I915_SAMPLE_RC6_ESTIMATED].cur = val;
+   }
+
spin_unlock_irq(>lock);
 }
 
@@ -425,39 +474,18 @@ static int i915_pmu_event_init(struct perf_event *event)
return 0;
 }
 
-static u64 __get_rc6(struct intel_gt *gt)
-{
-   struct 

[Intel-gfx] ✓ Fi.CI.IGT: success for i915/gem_exec_schedule: Check timeslice

2019-08-03 Thread Patchwork
== Series Details ==

Series: i915/gem_exec_schedule: Check timeslice
URL   : https://patchwork.freedesktop.org/series/64600/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6612_full -> IGTPW_3315_full


Summary
---

  **SUCCESS**

  No regressions found.

  External URL: 
https://patchwork.freedesktop.org/api/1.0/series/64600/revisions/1/mbox/

New tests
-

  New tests have been introduced between CI_DRM_6612_full and IGTPW_3315_full:

### New IGT tests (6) ###

  * igt@gem_exec_schedule@preempt-timeslice-blt:
- Statuses : 4 pass(s) 2 skip(s)
- Exec time: [0.0, 0.01] s

  * igt@gem_exec_schedule@preempt-timeslice-bsd:
- Statuses : 3 pass(s) 3 skip(s)
- Exec time: [0.0, 0.01] s

  * igt@gem_exec_schedule@preempt-timeslice-bsd1:
- Statuses : 1 pass(s) 5 skip(s)
- Exec time: [0.0, 0.00] s

  * igt@gem_exec_schedule@preempt-timeslice-bsd2:
- Statuses : 1 pass(s) 5 skip(s)
- Exec time: [0.0, 0.00] s

  * igt@gem_exec_schedule@preempt-timeslice-render:
- Statuses : 4 pass(s) 2 skip(s)
- Exec time: [0.0, 0.01] s

  * igt@gem_exec_schedule@preempt-timeslice-vebox:
- Statuses : 4 pass(s) 2 skip(s)
- Exec time: [0.0, 0.01] s

  

Known issues


  Here are the changes found in IGTPW_3315_full that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@gem_caching@writes:
- shard-iclb: [PASS][1] -> [INCOMPLETE][2] ([fdo#107713])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-iclb8/igt@gem_cach...@writes.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3315/shard-iclb4/igt@gem_cach...@writes.html

  * igt@i915_pm_rpm@i2c:
- shard-hsw:  [PASS][3] -> [FAIL][4] ([fdo#104097])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-hsw8/igt@i915_pm_...@i2c.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3315/shard-hsw2/igt@i915_pm_...@i2c.html

  * igt@kms_cursor_crc@pipe-a-cursor-suspend:
- shard-kbl:  [PASS][5] -> [DMESG-WARN][6] ([fdo#108566]) +1 
similar issue
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-kbl4/igt@kms_cursor_...@pipe-a-cursor-suspend.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3315/shard-kbl1/igt@kms_cursor_...@pipe-a-cursor-suspend.html

  * igt@kms_cursor_crc@pipe-c-cursor-128x128-sliding:
- shard-kbl:  [PASS][7] -> [FAIL][8] ([fdo#103232])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-kbl4/igt@kms_cursor_...@pipe-c-cursor-128x128-sliding.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3315/shard-kbl1/igt@kms_cursor_...@pipe-c-cursor-128x128-sliding.html
- shard-apl:  [PASS][9] -> [FAIL][10] ([fdo#103232])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-apl4/igt@kms_cursor_...@pipe-c-cursor-128x128-sliding.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3315/shard-apl3/igt@kms_cursor_...@pipe-c-cursor-128x128-sliding.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite:
- shard-iclb: [PASS][11] -> [FAIL][12] ([fdo#103167]) +2 similar 
issues
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-iclb1/igt@kms_frontbuffer_track...@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3315/shard-iclb7/igt@kms_frontbuffer_track...@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html

  * igt@kms_psr@psr2_primary_page_flip:
- shard-iclb: [PASS][13] -> [SKIP][14] ([fdo#109441]) +3 similar 
issues
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3315/shard-iclb4/igt@kms_psr@psr2_primary_page_flip.html

  * igt@kms_setmode@basic:
- shard-apl:  [PASS][15] -> [FAIL][16] ([fdo#99912])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-apl4/igt@kms_setm...@basic.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3315/shard-apl8/igt@kms_setm...@basic.html
- shard-kbl:  [PASS][17] -> [FAIL][18] ([fdo#99912])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-kbl1/igt@kms_setm...@basic.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3315/shard-kbl1/igt@kms_setm...@basic.html

  * igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-apl:  [PASS][19] -> [DMESG-WARN][20] ([fdo#108566]) +3 
similar issues
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6612/shard-apl7/igt@kms_vbl...@pipe-c-ts-continuation-suspend.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3315/shard-apl6/igt@kms_vbl...@pipe-c-ts-continuation-suspend.html

  * igt@prime_vgem@basic-wait-default:
- shard-apl:  [PASS][21] -> [FAIL][22] ([fdo#111277])
   [21]: 

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gt: Remove stale kerneldoc for internal MOCS functions

2019-08-03 Thread Patchwork
== Series Details ==

Series: drm/i915/gt: Remove stale kerneldoc for internal MOCS functions
URL   : https://patchwork.freedesktop.org/series/64649/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6622 -> Patchwork_13863


Summary
---

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13863/

Known issues


  Here are the changes found in Patchwork_13863 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@gem_ctx_create@basic-files:
- fi-apl-guc: [PASS][1] -> [INCOMPLETE][2] ([fdo#103927])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6622/fi-apl-guc/igt@gem_ctx_cre...@basic-files.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13863/fi-apl-guc/igt@gem_ctx_cre...@basic-files.html

  * igt@gem_exec_reloc@basic-gtt-cpu:
- fi-icl-u3:  [PASS][3] -> [DMESG-WARN][4] ([fdo#107724])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6622/fi-icl-u3/igt@gem_exec_re...@basic-gtt-cpu.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13863/fi-icl-u3/igt@gem_exec_re...@basic-gtt-cpu.html

  * igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u:   [PASS][5] -> [FAIL][6] ([fdo#109485])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6622/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13863/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html

  
 Possible fixes 

  * igt@gem_ctx_create@basic-files:
- fi-cml-u:   [INCOMPLETE][7] ([fdo#110566]) -> [PASS][8]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6622/fi-cml-u/igt@gem_ctx_cre...@basic-files.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13863/fi-cml-u/igt@gem_ctx_cre...@basic-files.html

  * igt@i915_pm_rpm@module-reload:
- fi-icl-u3:  [DMESG-WARN][9] ([fdo#107724]) -> [PASS][10]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6622/fi-icl-u3/igt@i915_pm_...@module-reload.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13863/fi-icl-u3/igt@i915_pm_...@module-reload.html

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
- fi-icl-dsi: [DMESG-WARN][11] ([fdo#106107]) -> [PASS][12]
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6622/fi-icl-dsi/igt@kms_pipe_crc_ba...@nonblocking-crc-pipe-a.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13863/fi-icl-dsi/igt@kms_pipe_crc_ba...@nonblocking-crc-pipe-a.html

  
  {name}: This element is suppressed. This means it is ignored when computing
  the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485
  [fdo#110566]: https://bugs.freedesktop.org/show_bug.cgi?id=110566


Participating hosts (54 -> 47)
--

  Additional (1): fi-icl-u4 
  Missing(8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks 
fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus 


Build changes
-

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_6622 -> Patchwork_13863

  CI-20190529: 20190529
  CI_DRM_6622: 6f7f68310b2e85745f568ebab0c17f25d2fccc82 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5120: b3138fbea79d5d7935e53530b90efe3e816236f4 @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_13863: d5dd4deb2bbc1220ff945c89d7f72f14ad88bb40 @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

d5dd4deb2bbc drm/i915/gt: Remove stale kerneldoc for internal MOCS functions

== Logs ==

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

Re: [Intel-gfx] [PATCH 2/2] drm/syncobj: Lookup the syncobj with RCU protection

2019-08-03 Thread kbuild test robot
Hi Chris,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[cannot apply to v5.3-rc2 next-20190802]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Chris-Wilson/drm-syncobj-Convert-syncobj_idr-to-XArray/20190803-170547
reproduce: make htmldocs

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All warnings (new ones prefixed by >>):

   include/linux/skbuff.h:893: warning: Function parameter or member 
'reserved_tailroom' not described in 'sk_buff'
   include/linux/skbuff.h:893: warning: Function parameter or member 
'inner_ipproto' not described in 'sk_buff'
   include/net/sock.h:233: warning: Function parameter or member 'skc_addrpair' 
not described in 'sock_common'
   include/net/sock.h:233: warning: Function parameter or member 'skc_portpair' 
not described in 'sock_common'
   include/net/sock.h:233: warning: Function parameter or member 'skc_ipv6only' 
not described in 'sock_common'
   include/net/sock.h:233: warning: Function parameter or member 
'skc_net_refcnt' not described in 'sock_common'
   include/net/sock.h:233: warning: Function parameter or member 'skc_v6_daddr' 
not described in 'sock_common'
   include/net/sock.h:233: warning: Function parameter or member 
'skc_v6_rcv_saddr' not described in 'sock_common'
   include/net/sock.h:233: warning: Function parameter or member 'skc_cookie' 
not described in 'sock_common'
   include/net/sock.h:233: warning: Function parameter or member 'skc_listener' 
not described in 'sock_common'
   include/net/sock.h:233: warning: Function parameter or member 'skc_tw_dr' 
not described in 'sock_common'
   include/net/sock.h:233: warning: Function parameter or member 'skc_rcv_wnd' 
not described in 'sock_common'
   include/net/sock.h:233: warning: Function parameter or member 
'skc_tw_rcv_nxt' not described in 'sock_common'
   include/net/sock.h:515: warning: Function parameter or member 
'sk_rx_skb_cache' not described in 'sock'
   include/net/sock.h:515: warning: Function parameter or member 'sk_wq_raw' 
not described in 'sock'
   include/net/sock.h:515: warning: Function parameter or member 
'tcp_rtx_queue' not described in 'sock'
   include/net/sock.h:515: warning: Function parameter or member 
'sk_tx_skb_cache' not described in 'sock'
   include/net/sock.h:515: warning: Function parameter or member 
'sk_route_forced_caps' not described in 'sock'
   include/net/sock.h:515: warning: Function parameter or member 
'sk_txtime_report_errors' not described in 'sock'
   include/net/sock.h:515: warning: Function parameter or member 
'sk_validate_xmit_skb' not described in 'sock'
   include/net/sock.h:515: warning: Function parameter or member 
'sk_bpf_storage' not described in 'sock'
   include/net/sock.h:2439: warning: Function parameter or member 
'tcp_rx_skb_cache_key' not described in 'DECLARE_STATIC_KEY_FALSE'
   include/net/sock.h:2439: warning: Excess function parameter 'sk' description 
in 'DECLARE_STATIC_KEY_FALSE'
   include/net/sock.h:2439: warning: Excess function parameter 'skb' 
description in 'DECLARE_STATIC_KEY_FALSE'
   include/linux/netdevice.h:2040: warning: Function parameter or member 
'gso_partial_features' not described in 'net_device'
   include/linux/netdevice.h:2040: warning: Function parameter or member 
'l3mdev_ops' not described in 'net_device'
   include/linux/netdevice.h:2040: warning: Function parameter or member 
'xfrmdev_ops' not described in 'net_device'
   include/linux/netdevice.h:2040: warning: Function parameter or member 
'tlsdev_ops' not described in 'net_device'
   include/linux/netdevice.h:2040: warning: Function parameter or member 
'name_assign_type' not described in 'net_device'
   include/linux/netdevice.h:2040: warning: Function parameter or member 
'ieee802154_ptr' not described in 'net_device'
   include/linux/netdevice.h:2040: warning: Function parameter or member 
'mpls_ptr' not described in 'net_device'
   include/linux/netdevice.h:2040: warning: Function parameter or member 
'xdp_prog' not described in 'net_device'
   include/linux/netdevice.h:2040: warning: Function parameter or member 
'gro_flush_timeout' not described in 'net_device'
   include/linux/netdevice.h:2040: warning: Function parameter or member 
'nf_hooks_ingress' not described in 'net_device'
   include/linux/netdevice.h:2040: warning: Function parameter or member 
'cacheline_aligned_in_smp' not described in 'net_device'
   include/linux/netdevice.h:2040: warning: Function parameter or member 
'qdisc_hash' not described in 'net_device'
   include/linux/netdevice.h:2040: warning: Function parameter or member 
'xps_cpus_map' not described in 'net_device'
   include/linux/netdevice.h:2040: warning: Function parameter or member 
'xps_rxqs_map' not described in 'net_device'
   include/linux/phylink.h:56: warning: Function parameter or 

[Intel-gfx] [PULL] drm-misc-next

2019-08-03 Thread Maxime Ripard
Hi Daniel, Dave,

Here is the first (and pretty late) drm-misc-next PR.

It's pretty big due to the lateness, but there's nothing really major
showing up. It's pretty much the usual bunch of reworks, fixes, and
new helpers being introduced.

Thanks!
Maxime

drm-misc-next-2019-08-03:
drm-misc-next for 5.4:

UAPI Changes:

Cross-subsystem Changes:

Core Changes:
 - Continue to rework the include dependencies
 - fb: Remove the unused drm_gem_fbdev_fb_create function
 - drm-dp-helper: Make the link rate calculation more tolerant to
  non-explicitly defined, yet supported, rates
 - fb-helper: Map DRM client buffer only when required, and instanciate a
  shadow buffer when the device has a dirty function or says so
 - connector: Add a helper to link the DDC adapter used by that connector to
  the userspace

Driver Changes:
 - Remove drm_gem_prime_import/export from being defined in the drivers
 - Drop DRM_AUTH usage from drivers
 - Continue to drop drmP.h
 - Convert drivers to the connector ddc helper

 - ingenic: Add support for more panel-related cases
 - komeda: Support for dual-link
 - lima: Reduce logging
 - mpag200: Fix the cursor support
 - panfrost: Export GPU features register to userspace through an ioctl
 - pl111: Remove the CLD pads wiring support from the DT
 - rockchip: Rework to use DRM PSR helpers
 - sun4i: Improve support for color encoding and range
 - tinydrm: Rework SPI support, improve MIPI-DBI support, move to drm/tiny
 - vkms: Rework of the CRC tracking

 - bridges:
   - sii902x: Add support for audio graph card
   - tc358767: Rework AUX data handling code
   - ti-sn65dsi86: Add Debugfs and proper DSI mode flags support

 - panels
   - Support for GiantPlus GPM940B0, Sharp LQ070Y3DG3B, Ortustech
 COM37H3M, Novatek NT39016, Sharp LS020B1DD01D, Raydium RM67191,
 Boe Himax8279d, Sharp LD-D5116Z01B
   - Conversion of the device tree bindings to the YAML description
   - jh057n00900: Rework the enable / disable path

 - fbdev:
   - ssd1307fb: Support more devices based on that controller
The following changes since commit 5f9e832c137075045d15cd6899ab0505cfb2ca4b:

  Linus 5.3-rc1 (2019-07-21 14:05:38 -0700)

are available in the Git repository at:

  git://anongit.freedesktop.org/drm/drm-misc tags/drm-misc-next-2019-08-03

for you to fetch changes up to d6781e490179f7ba710dd924187109da70c185b0:

  drm/pl111: Drop special pads config check (2019-08-03 11:59:54 +0200)


drm-misc-next for 5.4:

UAPI Changes:

Cross-subsystem Changes:

Core Changes:
 - Continue to rework the include dependencies
 - fb: Remove the unused drm_gem_fbdev_fb_create function
 - drm-dp-helper: Make the link rate calculation more tolerant to
  non-explicitly defined, yet supported, rates
 - fb-helper: Map DRM client buffer only when required, and instanciate a
  shadow buffer when the device has a dirty function or says so
 - connector: Add a helper to link the DDC adapter used by that connector to
  the userspace

Driver Changes:
 - Remove drm_gem_prime_import/export from being defined in the drivers
 - Drop DRM_AUTH usage from drivers
 - Continue to drop drmP.h
 - Convert drivers to the connector ddc helper

 - ingenic: Add support for more panel-related cases
 - komeda: Support for dual-link
 - lima: Reduce logging
 - mpag200: Fix the cursor support
 - panfrost: Export GPU features register to userspace through an ioctl
 - pl111: Remove the CLD pads wiring support from the DT
 - rockchip: Rework to use DRM PSR helpers
 - sun4i: Improve support for color encoding and range
 - tinydrm: Rework SPI support, improve MIPI-DBI support, move to drm/tiny
 - vkms: Rework of the CRC tracking

 - bridges:
   - sii902x: Add support for audio graph card
   - tc358767: Rework AUX data handling code
   - ti-sn65dsi86: Add Debugfs and proper DSI mode flags support

 - panels
   - Support for GiantPlus GPM940B0, Sharp LQ070Y3DG3B, Ortustech
 COM37H3M, Novatek NT39016, Sharp LS020B1DD01D, Raydium RM67191,
 Boe Himax8279d, Sharp LD-D5116Z01B
   - Conversion of the device tree bindings to the YAML description
   - jh057n00900: Rework the enable / disable path

 - fbdev:
   - ssd1307fb: Support more devices based on that controller


Ahmad Fatoum (1):
  drm/stm: attach gem fence to atomic state

Anders Roxell (1):
  drm: mali-dp: Mark expected switch fall-through

Andrey Smirnov (15):
  drm/bridge: tc358767: Simplify tc_poll_timeout()
  drm/bridge: tc358767: Simplify polling in tc_main_link_setup()
  drm/bridge: tc358767: Simplify polling in tc_link_training()
  drm/bridge: tc358767: Simplify tc_set_video_mode()
  drm/bridge: tc358767: Drop custom tc_write()/tc_read() accessors
  drm/bridge: tc358767: Simplify AUX data read
  drm/bridge: tc358767: Simplify AUX data write
  

[Intel-gfx] [PATCH] drm/i915/gt: Remove stale kerneldoc for internal MOCS functions

2019-08-03 Thread Chris Wilson
The kerneldoc were stale, generating mismatching parameters warning, but
furthermore they were for internal routines, not part of the MOCS
interface so the instructions were superfluous.

Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/i915/gt/intel_mocs.c | 57 +---
 1 file changed, 2 insertions(+), 55 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_mocs.c 
b/drivers/gpu/drm/i915/gt/intel_mocs.c
index 77ddb307346a..728704bbbe18 100644
--- a/drivers/gpu/drm/i915/gt/intel_mocs.c
+++ b/drivers/gpu/drm/i915/gt/intel_mocs.c
@@ -287,18 +287,6 @@ static const struct drm_i915_mocs_entry 
icelake_mocs_table[] = {
GEN11_MOCS_ENTRIES
 };
 
-/**
- * get_mocs_settings()
- * @gt:gt device
- * @table:  Output table that will be made to point at appropriate
- *   MOCS values for the device.
- *
- * This function will return the values of the MOCS table that needs to
- * be programmed for the platform. It will return the values that need
- * to be programmed and if they need to be programmed.
- *
- * Return: true if there are applicable MOCS settings for the device.
- */
 static bool get_mocs_settings(struct intel_gt *gt,
  struct drm_i915_mocs_table *table)
 {
@@ -420,12 +408,6 @@ void intel_mocs_init_engine(struct intel_engine_cs *engine)
  unused_value);
 }
 
-/**
- * intel_mocs_init_global() - program the global mocs registers
- * gt:  pointer to struct intel_gt
- *
- * This function initializes the MOCS global registers.
- */
 static void intel_mocs_init_global(struct intel_gt *gt)
 {
struct intel_uncore *uncore = gt->uncore;
@@ -456,16 +438,6 @@ static void intel_mocs_init_global(struct intel_gt *gt)
   table.table[0].control_value);
 }
 
-/**
- * emit_mocs_control_table() - emit the mocs control table
- * @rq:Request to set up the MOCS table for.
- * @table: The values to program into the control regs.
- *
- * This function simply emits a MI_LOAD_REGISTER_IMM command for the
- * given table starting at the given address.
- *
- * Return: 0 on success, otherwise the error status.
- */
 static int emit_mocs_control_table(struct i915_request *rq,
   const struct drm_i915_mocs_table *table)
 {
@@ -525,17 +497,6 @@ static inline u32 l3cc_combine(const struct 
drm_i915_mocs_table *table,
return low | high << 16;
 }
 
-/**
- * emit_mocs_l3cc_table() - emit the mocs control table
- * @rq:Request to set up the MOCS table for.
- * @table: The values to program into the control regs.
- *
- * This function simply emits a MI_LOAD_REGISTER_IMM command for the
- * given table starting at the given address. This register set is
- * programmed in pairs.
- *
- * Return: 0 on success, otherwise the error status.
- */
 static int emit_mocs_l3cc_table(struct i915_request *rq,
const struct drm_i915_mocs_table *table)
 {
@@ -584,20 +545,6 @@ static int emit_mocs_l3cc_table(struct i915_request *rq,
return 0;
 }
 
-/**
- * intel_mocs_init_l3cc_table() - program the mocs control table
- * @gt: the intel_gt container
- *
- * This function simply programs the mocs registers for the given table
- * starting at the given address. This register set is  programmed in pairs.
- *
- * These registers may get programmed more than once, it is simpler to
- * re-program 32 registers than maintain the state of when they were 
programmed.
- * We are always reprogramming with the same values and this only on context
- * start.
- *
- * Return: Nothing.
- */
 static void intel_mocs_init_l3cc_table(struct intel_gt *gt)
 {
struct intel_uncore *uncore = gt->uncore;
@@ -639,8 +586,8 @@ static void intel_mocs_init_l3cc_table(struct intel_gt *gt)
 }
 
 /**
- * intel_rcs_context_init_mocs() - program the MOCS register.
- * @rq:Request to set up the MOCS tables for.
+ * intel_mocs_emit() - program the MOCS register.
+ * @rq:Request to use to set up the MOCS tables.
  *
  * This function will emit a batch buffer with the values required for
  * programming the MOCS register values for all the currently supported
-- 
2.23.0.rc0

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

[Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/gem: Make caps.scheduler static

2019-08-03 Thread Patchwork
== Series Details ==

Series: series starting with [1/2] drm/i915/gem: Make caps.scheduler static
URL   : https://patchwork.freedesktop.org/series/64647/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_6621 -> Patchwork_13862


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_13862 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_13862, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13862/

Possible new issues
---

  Here are the unknown changes that may have been introduced in Patchwork_13862:

### IGT changes ###

 Possible regressions 

  * igt@i915_module_load@reload:
- fi-skl-6260u:   [PASS][1] -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6621/fi-skl-6260u/igt@i915_module_l...@reload.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13862/fi-skl-6260u/igt@i915_module_l...@reload.html

  
 Suppressed 

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@i915_selftest@live_hangcheck:
- {fi-icl-u4}:[PASS][3] -> [DMESG-FAIL][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6621/fi-icl-u4/igt@i915_selftest@live_hangcheck.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13862/fi-icl-u4/igt@i915_selftest@live_hangcheck.html

  
Known issues


  Here are the changes found in Patchwork_13862 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@gem_mmap_gtt@basic-short:
- fi-icl-u3:  [PASS][5] -> [DMESG-WARN][6] ([fdo#107724]) +2 
similar issues
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6621/fi-icl-u3/igt@gem_mmap_...@basic-short.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13862/fi-icl-u3/igt@gem_mmap_...@basic-short.html

  * igt@i915_pm_rpm@basic-pci-d3-state:
- fi-skl-6600u:   [PASS][7] -> [FAIL][8] ([fdo#107707])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6621/fi-skl-6600u/igt@i915_pm_...@basic-pci-d3-state.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13862/fi-skl-6600u/igt@i915_pm_...@basic-pci-d3-state.html

  * igt@kms_busy@basic-flip-a:
- fi-kbl-7567u:   [PASS][9] -> [SKIP][10] ([fdo#109271] / [fdo#109278]) 
+2 similar issues
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6621/fi-kbl-7567u/igt@kms_b...@basic-flip-a.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13862/fi-kbl-7567u/igt@kms_b...@basic-flip-a.html

  
 Possible fixes 

  * igt@gem_ctx_create@basic-files:
- fi-icl-dsi: [INCOMPLETE][11] ([fdo#107713] / [fdo#109100]) -> 
[PASS][12]
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6621/fi-icl-dsi/igt@gem_ctx_cre...@basic-files.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13862/fi-icl-dsi/igt@gem_ctx_cre...@basic-files.html

  * {igt@gem_ctx_switch@rcs0}:
- {fi-icl-guc}:   [INCOMPLETE][13] ([fdo#107713]) -> [PASS][14]
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6621/fi-icl-guc/igt@gem_ctx_swi...@rcs0.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13862/fi-icl-guc/igt@gem_ctx_swi...@rcs0.html

  * igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-7567u:   [WARN][15] ([fdo#109380]) -> [PASS][16]
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6621/fi-kbl-7567u/igt@kms_chamel...@common-hpd-after-suspend.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13862/fi-kbl-7567u/igt@kms_chamel...@common-hpd-after-suspend.html

  * igt@kms_pipe_crc_basic@read-crc-pipe-c:
- fi-kbl-7567u:   [SKIP][17] ([fdo#109271]) -> [PASS][18] +23 similar 
issues
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6621/fi-kbl-7567u/igt@kms_pipe_crc_ba...@read-crc-pipe-c.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13862/fi-kbl-7567u/igt@kms_pipe_crc_ba...@read-crc-pipe-c.html

  * igt@prime_vgem@basic-fence-flip:
- fi-kbl-7500u:   [SKIP][19] ([fdo#109271]) -> [PASS][20] +23 similar 
issues
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6621/fi-kbl-7500u/igt@prime_v...@basic-fence-flip.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13862/fi-kbl-7500u/igt@prime_v...@basic-fence-flip.html

  * igt@prime_vgem@basic-fence-read:
- fi-icl-u3:  [DMESG-WARN][21] ([fdo#107724]) -> [PASS][22]
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6621/fi-icl-u3/igt@prime_v...@basic-fence-read.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13862/fi-icl-u3/igt@prime_v...@basic-fence-read.html

  
  {name}: This 

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915/gem: Make caps.scheduler static

2019-08-03 Thread Patchwork
== Series Details ==

Series: series starting with [1/2] drm/i915/gem: Make caps.scheduler static
URL   : https://patchwork.freedesktop.org/series/64647/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
136c5adecffd drm/i915/gem: Make caps.scheduler static
57f5cfd5d696 drm/i915/gt: Move the [class][inst] lookup for engines onto the GT
-:311: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does 
MAINTAINERS need updating?
#311: 
new file mode 100644

-:316: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier 
tag in line 1
#316: FILE: drivers/gpu/drm/i915/gt/intel_engine_user.c:1:
+/*

-:317: WARNING:SPDX_LICENSE_TAG: Misplaced SPDX-License-Identifier tag - use 
line 1 instead
#317: FILE: drivers/gpu/drm/i915/gt/intel_engine_user.c:2:
+ * SPDX-License-Identifier: MIT

-:550: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier 
tag in line 1
#550: FILE: drivers/gpu/drm/i915/gt/intel_engine_user.h:1:
+/*

-:551: WARNING:SPDX_LICENSE_TAG: Misplaced SPDX-License-Identifier tag - use 
line 1 instead
#551: FILE: drivers/gpu/drm/i915/gt/intel_engine_user.h:2:
+ * SPDX-License-Identifier: MIT

-:858: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'engine__' - possible 
side-effects?
#858: FILE: drivers/gpu/drm/i915/i915_drv.h:1926:
+#define for_each_uabi_engine(engine__, i915__) \
+   for ((engine__) = rb_to_uabi_engine(rb_first(&(i915__)->uabi_engines));\
+(engine__); \
+(engine__) = rb_to_uabi_engine(rb_next(&(engine__)->uabi_node)))

total: 0 errors, 5 warnings, 1 checks, 896 lines checked

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

[Intel-gfx] [PATCH 1/2] drm/i915/gem: Make caps.scheduler static

2019-08-03 Thread Chris Wilson
We do not notify userspace when the scheduler capabilities are changed
(due to wedging the driver) and as such userspace will expect the caps
to be static and unchanging. Make it so, and so we only need to compute
our caps once during driver registration.

Signed-off-by: Chris Wilson 
Cc: Tvrtko Ursulin 
---
 drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 16 ++--
 .../gpu/drm/i915/gem/selftests/i915_gem_mman.c   |  4 ++--
 drivers/gpu/drm/i915/gt/intel_reset.c|  5 +
 drivers/gpu/drm/i915/i915_drv.c  |  4 ++--
 drivers/gpu/drm/i915/i915_drv.h  |  6 --
 drivers/gpu/drm/i915/i915_gem.c  | 13 +++--
 drivers/gpu/drm/i915/i915_request.c  |  2 --
 7 files changed, 22 insertions(+), 28 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c 
b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
index 5ab7df53c2a0..edd21d14e64f 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
@@ -459,13 +459,7 @@ i915_gem_shrinker_vmap(struct notifier_block *nb, unsigned 
long event, void *ptr
return NOTIFY_DONE;
 }
 
-/**
- * i915_gem_shrinker_register - Register the i915 shrinker
- * @i915: i915 device
- *
- * This function registers and sets up the i915 shrinker and OOM handler.
- */
-void i915_gem_shrinker_register(struct drm_i915_private *i915)
+void i915_gem_driver_register__shrinker(struct drm_i915_private *i915)
 {
i915->mm.shrinker.scan_objects = i915_gem_shrinker_scan;
i915->mm.shrinker.count_objects = i915_gem_shrinker_count;
@@ -480,13 +474,7 @@ void i915_gem_shrinker_register(struct drm_i915_private 
*i915)
WARN_ON(register_vmap_purge_notifier(>mm.vmap_notifier));
 }
 
-/**
- * i915_gem_shrinker_unregister - Unregisters the i915 shrinker
- * @i915: i915 device
- *
- * This function unregisters the i915 shrinker and OOM handler.
- */
-void i915_gem_shrinker_unregister(struct drm_i915_private *i915)
+void i915_gem_driver_unregister__shrinker(struct drm_i915_private *i915)
 {
WARN_ON(unregister_vmap_purge_notifier(>mm.vmap_notifier));
WARN_ON(unregister_oom_notifier(>mm.oom_notifier));
diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c 
b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
index 01857c12f12f..50aa7e95124d 100644
--- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
@@ -382,7 +382,7 @@ static bool assert_mmap_offset(struct drm_i915_private 
*i915,
 
 static void disable_retire_worker(struct drm_i915_private *i915)
 {
-   i915_gem_shrinker_unregister(i915);
+   i915_gem_driver_unregister__shrinker(i915);
 
intel_gt_pm_get(>gt);
 
@@ -398,7 +398,7 @@ static void restore_retire_worker(struct drm_i915_private 
*i915)
igt_flush_test(i915, I915_WAIT_LOCKED);
mutex_unlock(>drm.struct_mutex);
 
-   i915_gem_shrinker_register(i915);
+   i915_gem_driver_register__shrinker(i915);
 }
 
 static void mmap_offset_lock(struct drm_i915_private *i915)
diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c 
b/drivers/gpu/drm/i915/gt/intel_reset.c
index 98c071fe532b..cdba6cd29327 100644
--- a/drivers/gpu/drm/i915/gt/intel_reset.c
+++ b/drivers/gpu/drm/i915/gt/intel_reset.c
@@ -757,11 +757,8 @@ static void __intel_gt_set_wedged(struct intel_gt *gt)
if (!INTEL_INFO(gt->i915)->gpu_reset_clobbers_display)
__intel_gt_reset(gt, ALL_ENGINES);
 
-   for_each_engine(engine, gt->i915, id) {
+   for_each_engine(engine, gt->i915, id)
engine->submit_request = nop_submit_request;
-   engine->schedule = NULL;
-   }
-   gt->i915->caps.scheduler = 0;
 
/*
 * Make sure no request can slip through without getting completed by
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 8aba6c3d50f9..3c8b3146d2c4 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1713,7 +1713,7 @@ static void i915_driver_register(struct drm_i915_private 
*dev_priv)
 {
struct drm_device *dev = _priv->drm;
 
-   i915_gem_shrinker_register(dev_priv);
+   i915_gem_driver_register(dev_priv);
i915_pmu_register(dev_priv);
 
/*
@@ -1793,7 +1793,7 @@ static void i915_driver_unregister(struct 
drm_i915_private *dev_priv)
i915_teardown_sysfs(dev_priv);
drm_dev_unplug(_priv->drm);
 
-   i915_gem_shrinker_unregister(dev_priv);
+   i915_gem_driver_unregister(dev_priv);
 }
 
 static void i915_welcome_messages(struct drm_i915_private *dev_priv)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 8931dd847bb5..70691f36ec72 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2483,6 +2483,8 @@ static inline u32 i915_reset_engine_count(struct 
i915_gpu_error *error,
 void 

[Intel-gfx] [PATCH 2/2] drm/i915/gt: Move the [class][inst] lookup for engines onto the GT

2019-08-03 Thread Chris Wilson
To maintain a fast lookup from a GT centric irq handler, we want the
engine lookup tables on the intel_gt. To avoid having multiple copies of
the same multi-dimension lookup table, move the generic user engine
lookup into an rbtree (for fast and flexible indexing).

v2: Split uabi_instance cf uabi_class
v3: Set uabi_class/uabi_instance after collating all engines to provide a
stable uabi across parallel unordered construction.

Signed-off-by: Chris Wilson 
Cc: Tvrtko Ursulin 
Cc: Daniele Ceraolo Spurio 
Reviewed-by: Daniele Ceraolo Spurio  #v2
---
 drivers/gpu/drm/i915/Makefile |   1 +
 drivers/gpu/drm/i915/gem/i915_gem_context.c   |   3 +-
 drivers/gpu/drm/i915/gt/intel_engine.h|   6 -
 drivers/gpu/drm/i915/gt/intel_engine_cs.c | 109 ++---
 drivers/gpu/drm/i915/gt/intel_engine_types.h  |   9 +-
 drivers/gpu/drm/i915/gt/intel_engine_user.c   | 228 ++
 drivers/gpu/drm/i915/gt/intel_engine_user.h   |  23 ++
 drivers/gpu/drm/i915/gt/intel_gt_types.h  |   4 +
 drivers/gpu/drm/i915/gt/selftest_lrc.c|  15 +-
 .../gpu/drm/i915/gt/selftest_workarounds.c|   1 +
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c |   2 +-
 drivers/gpu/drm/i915/i915_cmd_parser.c|   3 +-
 drivers/gpu/drm/i915/i915_debugfs.c   |  23 +-
 drivers/gpu/drm/i915/i915_drv.c   |   1 +
 drivers/gpu/drm/i915/i915_drv.h   |  15 +-
 drivers/gpu/drm/i915/i915_gem.c   |  22 +-
 drivers/gpu/drm/i915/i915_irq.c   |   2 +-
 drivers/gpu/drm/i915/i915_perf.c  |   3 +-
 drivers/gpu/drm/i915/i915_pmu.c   |   8 +-
 drivers/gpu/drm/i915/i915_query.c |   5 +-
 drivers/gpu/drm/i915/i915_trace.h |  10 +-
 21 files changed, 329 insertions(+), 164 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/gt/intel_engine_user.c
 create mode 100644 drivers/gpu/drm/i915/gt/intel_engine_user.h

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 331b19cc8247..22f7eb3d789f 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -73,6 +73,7 @@ gt-y += \
gt/intel_context.o \
gt/intel_engine_cs.o \
gt/intel_engine_pm.o \
+   gt/intel_engine_user.o \
gt/intel_gt.o \
gt/intel_gt_pm.o \
gt/intel_hangcheck.o \
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c 
b/drivers/gpu/drm/i915/gem/i915_gem_context.c
index 64f7a533e886..1c5bc21a80ff 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
@@ -70,6 +70,7 @@
 #include 
 
 #include "gt/intel_lrc_reg.h"
+#include "gt/intel_engine_user.h"
 
 #include "i915_gem_context.h"
 #include "i915_globals.h"
@@ -1729,7 +1730,7 @@ get_engines(struct i915_gem_context *ctx,
 
if (e->engines[n]) {
ci.engine_class = e->engines[n]->engine->uabi_class;
-   ci.engine_instance = e->engines[n]->engine->instance;
+   ci.engine_instance = 
e->engines[n]->engine->uabi_instance;
}
 
if (copy_to_user(>engines[n], , sizeof(ci))) {
diff --git a/drivers/gpu/drm/i915/gt/intel_engine.h 
b/drivers/gpu/drm/i915/gt/intel_engine.h
index db5c73ce86ee..01e8c8a6328a 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine.h
+++ b/drivers/gpu/drm/i915/gt/intel_engine.h
@@ -123,8 +123,6 @@ hangcheck_action_to_str(const enum 
intel_engine_hangcheck_action a)
return "unknown";
 }
 
-void intel_engines_set_scheduler_caps(struct drm_i915_private *i915);
-
 static inline unsigned int
 execlists_num_ports(const struct intel_engine_execlists * const execlists)
 {
@@ -423,7 +421,6 @@ bool intel_engine_is_idle(struct intel_engine_cs *engine);
 bool intel_engines_are_idle(struct intel_gt *gt);
 
 void intel_engines_reset_default_submission(struct intel_gt *gt);
-unsigned int intel_engines_has_context_isolation(struct drm_i915_private 
*i915);
 
 bool intel_engine_can_store_dword(struct intel_engine_cs *engine);
 
@@ -432,9 +429,6 @@ void intel_engine_dump(struct intel_engine_cs *engine,
   struct drm_printer *m,
   const char *header, ...);
 
-struct intel_engine_cs *
-intel_engine_lookup_user(struct drm_i915_private *i915, u8 class, u8 instance);
-
 static inline void intel_engine_context_in(struct intel_engine_cs *engine)
 {
unsigned long flags;
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c 
b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index 8bd9a9adf4a5..465c4cfe78ef 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -32,6 +32,7 @@
 
 #include "intel_engine.h"
 #include "intel_engine_pm.h"
+#include "intel_engine_user.h"
 #include "intel_context.h"
 #include "intel_lrc.h"
 #include "intel_reset.h"
@@ -285,9 +286,7 @@ static void intel_engine_sanitize_mmio(struct 
intel_engine_cs *engine)

Re: [Intel-gfx] [RFC] drm/i915/gt: create a subfolder for GT debugfs

2019-08-03 Thread Chris Wilson
Quoting Daniele Ceraolo Spurio (2019-08-03 02:09:44)
> The idea is to better organize our debugfs entries by moving the
> GT-related ones into their own subfolder, similarly to what we did for
> the kernel code.
> 
> As an example, this patch moves the GuC/HuC and user_forcewake debugfs,
> but a few more files can be moved if we decide to go this way (engine
> status, gt_pm etc). Test updates will also be required to look for the
> file in the correct place.

Quick question, why stop at intel_gt_debugfs.c? Do we not want to pull the
[gh]uc closer to the source i.e. gt/uc/intel_uc_debugfs.c?

I'd also recommend for any future debugfs, we split it between the
debugfs hook and the pretty printer, and spit out yaml :)
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH 10/34] genwqe: convert put_page() to put_user_page*()

2019-08-03 Thread Greg Kroah-Hartman
On Thu, Aug 01, 2019 at 07:19:41PM -0700, john.hubb...@gmail.com wrote:
> From: John Hubbard 
> 
> For pages that were retained via get_user_pages*(), release those pages
> via the new put_user_page*() routines, instead of via put_page() or
> release_pages().
> 
> This is part a tree-wide conversion, as described in commit fc1d8e7cca2d
> ("mm: introduce put_user_page*(), placeholder versions").
> 
> This changes the release code slightly, because each page slot in the
> page_list[] array is no longer checked for NULL. However, that check
> was wrong anyway, because the get_user_pages() pattern of usage here
> never allowed for NULL entries within a range of pinned pages.
> 
> Cc: Frank Haverkamp 
> Cc: "Guilherme G. Piccoli" 
> Cc: Arnd Bergmann 
> Cc: Greg Kroah-Hartman 
> Signed-off-by: John Hubbard 
> ---
>  drivers/misc/genwqe/card_utils.c | 17 +++--
>  1 file changed, 3 insertions(+), 14 deletions(-)

Acked-by: Greg Kroah-Hartman 
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH 15/34] staging/vc04_services: convert put_page() to put_user_page*()

2019-08-03 Thread Greg Kroah-Hartman
On Thu, Aug 01, 2019 at 07:19:46PM -0700, john.hubb...@gmail.com wrote:
> From: John Hubbard 
> 
> For pages that were retained via get_user_pages*(), release those pages
> via the new put_user_page*() routines, instead of via put_page() or
> release_pages().
> 
> This is part a tree-wide conversion, as described in commit fc1d8e7cca2d
> ("mm: introduce put_user_page*(), placeholder versions").
> 
> Cc: Eric Anholt 
> Cc: Stefan Wahren 
> Cc: Greg Kroah-Hartman 
> Cc: Mihaela Muraru 
> Cc: Suniel Mahesh 
> Cc: Al Viro 
> Cc: Sidong Yang 
> Cc: Kishore KP 
> Cc: linux-rpi-ker...@lists.infradead.org
> Cc: linux-arm-ker...@lists.infradead.org
> Cc: de...@driverdev.osuosl.org
> Signed-off-by: John Hubbard 
> ---
>  .../vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 10 ++
>  1 file changed, 2 insertions(+), 8 deletions(-)

Acked-by: Greg Kroah-Hartman 
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx