Re: [Intel-gfx] [PATCH 4/4] drm/i915/intel_dsi: Read back pclk set by GOP and use that as pclk

2018-07-06 Thread Hans de Goede

Hi,

On 07/06/2018 04:16 PM, Ville Syrjälä wrote:

On Tue, Jun 19, 2018 at 10:18:27PM +0200, Hans de Goede wrote:

On BYT and CHT the GOP sometimes initializes the pclk at a (slightly)
different frequency then the pclk which we've calculated.

This commit makes the DSI code read-back the pclk set by the GOP and
if that is within a reasonable margin of the calculated pclk, uses
that instead.

This fixes the first modeset being a full modeset instead of a
fast modeset on systems where the GOP pclk is different.

Signed-off-by: Hans de Goede 
---
  drivers/gpu/drm/i915/intel_dsi_vbt.c | 14 ++
  1 file changed, 14 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_dsi_vbt.c 
b/drivers/gpu/drm/i915/intel_dsi_vbt.c
index 4d6ffa7b3e7b..d4cc6099012c 100644
--- a/drivers/gpu/drm/i915/intel_dsi_vbt.c
+++ b/drivers/gpu/drm/i915/intel_dsi_vbt.c
@@ -517,6 +517,7 @@ bool intel_dsi_vbt_init(struct intel_dsi *intel_dsi, u16 
panel_id)
u32 mul;
u16 burst_mode_ratio;
enum port port;
+   enum pipe pipe;
  
  	DRM_DEBUG_KMS("\n");
  
@@ -583,6 +584,19 @@ bool intel_dsi_vbt_init(struct intel_dsi *intel_dsi, u16 panel_id)

} else
burst_mode_ratio = 100;
  
+	/*

+* On BYT / CRC the GOP sometimes picks a slightly different pclk,
+* read back the GOP configured pclk and prefer it over ours.
+*/
+   if ((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
+   intel_dsi_get_hw_state(&intel_dsi->base, &pipe)) {
+   u32 gop = intel_dsi_get_pclk(&intel_dsi->base, bpp, NULL);
+
+   DRM_DEBUG_KMS("Calculated pclk %d GOP %d\n", pclk, gop);
+   if (gop >= (pclk * 9 / 10) && gop <= (pclk * 11 / 10))
+   pclk = gop;
+   }


Is the gop acually picking a different clock that what we pick in the
end, or is it just that the value in the vbt doesn't quite match what we
(and the gop) end up using on account of limitations of the pll?


I *think* the GOP is picking a different clock, IIRC (*) it is something like
90Mhz for the GOP and the VBT says 87Mhz (and our calculations leave it
unmodified. With this patch which puts pclk at 90Mhz on the specific
tablet I developed this on, the PLL settings calculated by our PLL code
end up being exactly the same as the once chosen by the GOP once we have
the pclk set to 90MHz.

Note I've seen these small (and sometimes somewhat bigger) differences
between GOP and VBT pclk on a lot of devices, not just the one tablet
I developed it on. Since submitting this I've run this on at least
5 different CHT/BYT devices and it works as advertised so far.


For that particular problem I think I had patches long ago to go through
the pll computation during init so that we basically fix up the slightly
bogus clock from the vbt.


We do end up with a slightly different clock then the 87MHhz when going
though the PLL calculations, something like 86.33MHz or some such from
the top of my head, but the problem is not the pclk not matching the
intel_pipe_config_compare() function does not look at it, it looks at
dsi_pll.ctrl dsi_pll.div and those don't match, where as they do match
if we fixup the VBT clock to be the one confgured by the GOP.


Any kind of hack that involves reading out the hardware state should go
into something like intel_sanitize_encoder(). Actually by that time we
have already read out the hw state, so it shouldn't require any
modifications to the existing dsi code itself.


I do not think that intel_sanitize encoder is the right place to do this:

* I don't want to modify the read-back state, I want to modify our
  calculated "new/ideal" state to match the read-back state
* I don't want to directly modify our calculated new/ideal state,
  instead I want to cleanup / sanitize the values we got from the VBT
  so that the initial-modeset *and* any future modesets will use the
  GOP pclk. I believe it is important that if we're going to use the
  GOP pclk we use it for all modesets consistently.
* I only want to do this once, at boot when we are sure the mode was
  set by the GOP and not after suspend/resume when we don't know if the
  GOP will have touched things or not.
* It is DSI specific, whereas sofar intel_sanitize_encoder seems to
  not contain any output specific code.

Regards,

Hans






+
intel_dsi->burst_mode_ratio = burst_mode_ratio;
intel_dsi->pclk = pclk;
  
--

2.17.1




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


Re: [Intel-gfx] [PATCH 0/4] drm/i915/intel_dsi: Read back and use pclk set by the GOP

2018-07-06 Thread Hans de Goede

Hi,

On 07/06/2018 03:14 PM, Jani Nikula wrote:

On Fri, 29 Jun 2018, Hans de Goede  wrote:

Hi,

On 19-06-18 22:18, Hans de Goede wrote:

Hi All,

This patch-set is the result of the work I've been doing recently to
give people a smooth "flickerfree" boot experience where the display
keeps displaying the logo put there by the firmware until it smoothly
fades into the Linux GUI (e.g. gdm).

While testing this on some BYT/CHT devices I noticed the screen going
black for 1 second or so, because the first modeset was not a fast
modeset despite passing i915.fastboot=1 on the kernel commandline.

This is caused by the GOP and the i915 code differing in what they
think the DSI pclk should be. This patch-set fixes this by reading
back the pclk set by the GOP and if it is reasonably close to the
clk calculated by the i915 code, using the GOP set pclk.


Ping? A review of this series would be appreciated.


Sorry, swamped, and I was hoping Ville would chime in. ;)

The first two patches are trivial, ack. But I'd really like to know what
the GOP is doing, and why we're different. Not sure if that's possible.

I'm afraid after much bikeshedding there were some file and function
renames, and no matter what this series needs a rebase. See [1]. Sorry
about the extra effort this causes; I truly appreciate your efforts with
the DSI code, and I regret I haven't given this series the love it
needs.


No problem. I'll pick up those patches and do a rebase, I'm currently
travelling so I don't have access to hardware to test this for a couple of
days. I will post a rebased version when I'm back.

Regards,

Hans





___
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: Flush the WCB following a WC write

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915: Flush the WCB following a WC write
URL   : https://patchwork.freedesktop.org/series/46070/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM__full -> Patchwork_9566_full =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_9566_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_9566_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_9566_full:

  === IGT changes ===

 Possible regressions 

igt@kms_flip_tiling@flip-x-tiled:
  shard-glk:  PASS -> FAIL


 Warnings 

igt@gem_exec_schedule@deep-bsd2:
  shard-kbl:  PASS -> SKIP

igt@gem_exec_schedule@deep-vebox:
  shard-kbl:  SKIP -> PASS +3


== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@drv_selftest@live_gtt:
  shard-kbl:  PASS -> INCOMPLETE (fdo#107127, fdo#103665)

igt@kms_flip@flip-vs-expired-vblank:
  shard-glk:  PASS -> FAIL (fdo#105363)


 Possible fixes 

igt@drv_selftest@live_gtt:
  shard-glk:  FAIL (fdo#107127, fdo#105347) -> PASS

igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
  shard-glk:  FAIL (fdo#106509, fdo#105454) -> PASS

igt@kms_flip@2x-flip-vs-expired-vblank:
  shard-glk:  FAIL (fdo#105363) -> PASS


  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454
  fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
  fdo#107127 https://bugs.freedesktop.org/show_bug.cgi?id=107127


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

* Linux: CI_DRM_ -> Patchwork_9566

  CI_DRM_: b153ce72348cbf6639dc5bd8e5e1bb0c180e9b86 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4540: 78071c2fa53db2f04b8eddc6e6118be4fbc5c2fe @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9566: 1442df0746feea3a7b77ee05f010c728b012d782 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ 
git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9566/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/selftests: Skip live_execlists if the GPU is terminally wedged

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915/selftests: Skip live_execlists if the GPU is terminally wedged
URL   : https://patchwork.freedesktop.org/series/46069/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM__full -> Patchwork_9565_full =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_9565_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_9565_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_9565_full:

  === IGT changes ===

 Possible regressions 

igt@kms_flip_tiling@flip-y-tiled:
  shard-glk:  PASS -> FAIL


 Warnings 

igt@gem_exec_schedule@deep-vebox:
  shard-kbl:  SKIP -> PASS +1

igt@gem_mocs_settings@mocs-rc6-vebox:
  shard-kbl:  PASS -> SKIP +1


== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@drv_selftest@live_gtt:
  shard-kbl:  PASS -> FAIL (fdo#105347, fdo#107127)

igt@drv_suspend@shrink:
  shard-snb:  PASS -> FAIL (fdo#106886)

igt@kms_flip_tiling@flip-to-y-tiled:
  shard-glk:  PASS -> FAIL (fdo#103822)


 Possible fixes 

igt@gem_ppgtt@blt-vs-render-ctxn:
  shard-kbl:  INCOMPLETE (fdo#103665, fdo#106023) -> PASS

igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
  shard-glk:  FAIL (fdo#105454, fdo#106509) -> PASS

igt@kms_flip@2x-flip-vs-expired-vblank:
  shard-glk:  FAIL (fdo#105363) -> PASS


 Warnings 

igt@drv_selftest@live_gtt:
  shard-glk:  FAIL (fdo#105347, fdo#107127) -> INCOMPLETE 
(k.org#198133, fdo#103359, fdo#107127)


  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
  fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454
  fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
  fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
  fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
  fdo#107127 https://bugs.freedesktop.org/show_bug.cgi?id=107127
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

* Linux: CI_DRM_ -> Patchwork_9565

  CI_DRM_: b153ce72348cbf6639dc5bd8e5e1bb0c180e9b86 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4540: 78071c2fa53db2f04b8eddc6e6118be4fbc5c2fe @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9565: 73d62b8b7b7f86fa9d4ba0517b42dcfab85a07c9 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ 
git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9565/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 series starting with [1/2] drm/i915: Record logical context support in driver caps (rev2)

2018-07-06 Thread Patchwork
== Series Details ==

Series: series starting with [1/2] drm/i915: Record logical context support in 
driver caps (rev2)
URL   : https://patchwork.freedesktop.org/series/46065/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM__full -> Patchwork_9563_full =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_9563_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_9563_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_9563_full:

  === IGT changes ===

 Possible regressions 

igt@kms_flip_tiling@flip-to-x-tiled:
  shard-glk:  PASS -> FAIL


 Warnings 

igt@gem_exec_schedule@deep-vebox:
  shard-kbl:  SKIP -> PASS +2

igt@gem_mocs_settings@mocs-rc6-vebox:
  shard-kbl:  PASS -> SKIP +2


== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@drv_selftest@live_gtt:
  shard-kbl:  PASS -> FAIL (fdo#107127, fdo#105347)

igt@gem_exec_await@wide-contexts:
  shard-glk:  PASS -> FAIL (fdo#105900)

igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
  shard-glk:  PASS -> FAIL (fdo#105189)

igt@kms_flip@2x-plain-flip-fb-recreate-interruptible:
  shard-glk:  PASS -> FAIL (fdo#100368)

igt@kms_flip_tiling@flip-yf-tiled:
  shard-glk:  PASS -> DMESG-WARN (fdo#106247)

igt@kms_vblank@pipe-a-accuracy-idle:
  shard-glk:  PASS -> FAIL (fdo#102583)

igt@perf@polling:
  shard-hsw:  PASS -> FAIL (fdo#102252)


 Possible fixes 

igt@kms_flip@2x-flip-vs-expired-vblank:
  shard-glk:  FAIL (fdo#105363) -> PASS


 Warnings 

igt@drv_selftest@live_gtt:
  shard-glk:  FAIL (fdo#107127, fdo#105347) -> INCOMPLETE 
(fdo#103359, fdo#107127, k.org#198133)
  shard-apl:  FAIL (fdo#107127, fdo#105347) -> INCOMPLETE 
(fdo#107127, fdo#103927)


  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
  fdo#102583 https://bugs.freedesktop.org/show_bug.cgi?id=102583
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#105189 https://bugs.freedesktop.org/show_bug.cgi?id=105189
  fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#105900 https://bugs.freedesktop.org/show_bug.cgi?id=105900
  fdo#106247 https://bugs.freedesktop.org/show_bug.cgi?id=106247
  fdo#107127 https://bugs.freedesktop.org/show_bug.cgi?id=107127
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

* Linux: CI_DRM_ -> Patchwork_9563

  CI_DRM_: b153ce72348cbf6639dc5bd8e5e1bb0c180e9b86 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4540: 78071c2fa53db2f04b8eddc6e6118be4fbc5c2fe @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9563: 8d15879d80384022b90a0425b73c0b7534fe714b @ 
git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ 
git://anongit.freedesktop.org/piglit

== Logs ==

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


Re: [Intel-gfx] [PATCH 2/2] drm/i915: use the ICL stolen memory

2018-07-06 Thread Lucas De Marchi
On Fri, May 4, 2018 at 1:33 PM Paulo Zanoni  wrote:
>
> Now that our stolen memory is already reserved by the x86 subsystem
> (since commit "x86/gpu: reserve ICL's graphics stolen memory"), make
> use of it.
>
> Cc: Joonas Lahtinen 
> Cc: Daniele Ceraolo Spurio 
> Cc: x...@kernel.org
> Signed-off-by: Paulo Zanoni 
> ---
>  drivers/gpu/drm/i915/i915_gem_stolen.c | 38 
> +-
>  drivers/gpu/drm/i915/i915_reg.h|  1 +
>  2 files changed, 38 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c 
> b/drivers/gpu/drm/i915/i915_gem_stolen.c
> index ad949cc30928..99556f0dbedc 100644
> --- a/drivers/gpu/drm/i915/i915_gem_stolen.c
> +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
> @@ -343,6 +343,35 @@ static void bdw_get_stolen_reserved(struct 
> drm_i915_private *dev_priv,
> *size = stolen_top - *base;
>  }
>
> +static void icl_get_stolen_reserved(struct drm_i915_private *dev_priv,
> +   resource_size_t *base,
> +   resource_size_t *size)
> +{
> +   u64 reg_val = I915_READ64(GEN6_STOLEN_RESERVED);

are you sure it's still the same address? Either I'm looking to the
wrong place or this needs to be changed.

Lucas De Marchi

> +
> +   DRM_DEBUG_DRIVER("GEN6_STOLEN_RESERVED = 0x%016llx\n", reg_val);
> +
> +   *base = reg_val & GEN11_STOLEN_RESERVED_ADDR_MASK;
> +
> +   switch (reg_val & GEN8_STOLEN_RESERVED_SIZE_MASK) {
> +   case GEN8_STOLEN_RESERVED_1M:
> +   *size = 1024 * 1024;
> +   break;
> +   case GEN8_STOLEN_RESERVED_2M:
> +   *size = 2 * 1024 * 1024;
> +   break;
> +   case GEN8_STOLEN_RESERVED_4M:
> +   *size = 4 * 1024 * 1024;
> +   break;
> +   case GEN8_STOLEN_RESERVED_8M:
> +   *size = 8 * 1024 * 1024;
> +   break;
> +   default:
> +   *size = 8 * 1024 * 1024;
> +   MISSING_CASE(reg_val & GEN8_STOLEN_RESERVED_SIZE_MASK);
> +   }
> +}
> +
>  int i915_gem_init_stolen(struct drm_i915_private *dev_priv)
>  {
> resource_size_t reserved_base, stolen_top;
> @@ -399,7 +428,9 @@ int i915_gem_init_stolen(struct drm_i915_private 
> *dev_priv)
> gen7_get_stolen_reserved(dev_priv,
>  &reserved_base, 
> &reserved_size);
> break;
> -   default:
> +   case 8:
> +   case 9:
> +   case 10:
> if (IS_LP(dev_priv))
> chv_get_stolen_reserved(dev_priv,
> &reserved_base, 
> &reserved_size);
> @@ -407,6 +438,11 @@ int i915_gem_init_stolen(struct drm_i915_private 
> *dev_priv)
> bdw_get_stolen_reserved(dev_priv,
> &reserved_base, 
> &reserved_size);
> break;
> +   case 11:
> +   default:
> +   icl_get_stolen_reserved(dev_priv, &reserved_base,
> +   &reserved_size);
> +   break;
> }
>
> /*
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 15daf3553d40..c5bc7c808e31 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -398,6 +398,7 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)
>  #define GEN8_STOLEN_RESERVED_4M(2 << 7)
>  #define GEN8_STOLEN_RESERVED_8M(3 << 7)
>  #define GEN6_STOLEN_RESERVED_ENABLE(1 << 0)
> +#define GEN11_STOLEN_RESERVED_ADDR_MASK(0xFFFULL << 20)
>
>  /* VGA stuff */
>
> --
> 2.14.3
>
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Lucas De Marchi
___
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: Introduce BITS_PER_TYPE

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915: Introduce BITS_PER_TYPE
URL   : https://patchwork.freedesktop.org/series/46055/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4443_full -> Patchwork_9562_full =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_9562_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_9562_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_9562_full:

  === IGT changes ===

 Warnings 

igt@gem_exec_schedule@deep-render:
  shard-kbl:  SKIP -> PASS

igt@gem_mocs_settings@mocs-rc6-blt:
  shard-kbl:  PASS -> SKIP


== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@drv_selftest@live_gtt:
  shard-kbl:  PASS -> FAIL (fdo#107127, fdo#105347)

igt@drv_selftest@live_hangcheck:
  shard-kbl:  PASS -> DMESG-FAIL (fdo#106947, fdo#106560)

igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy:
  shard-glk:  PASS -> FAIL (fdo#106765)

igt@kms_flip@2x-plain-flip-fb-recreate:
  shard-glk:  PASS -> FAIL (fdo#100368)

igt@kms_flip@2x-plain-flip-ts-check-interruptible:
  shard-hsw:  PASS -> FAIL (fdo#100368)

igt@kms_flip@modeset-vs-vblank-race:
  shard-hsw:  PASS -> FAIL (fdo#103060)

igt@kms_plane_lowres@pipe-c-tiling-none:
  shard-glk:  PASS -> DMESG-WARN (fdo#106247)

igt@kms_setmode@basic:
  shard-kbl:  PASS -> FAIL (fdo#99912)


 Possible fixes 

igt@drv_suspend@shrink:
  shard-snb:  INCOMPLETE (fdo#105411) -> PASS

igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
  shard-glk:  FAIL (fdo#102887) -> PASS

igt@kms_flip@2x-modeset-vs-vblank-race:
  shard-glk:  FAIL (fdo#103060) -> PASS

igt@kms_flip@plain-flip-ts-check-interruptible:
  shard-glk:  FAIL (fdo#100368) -> PASS +1


 Warnings 

igt@drv_selftest@live_gtt:
  shard-apl:  FAIL (fdo#107127, fdo#105347) -> INCOMPLETE 
(fdo#103927, fdo#107127)


  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
  fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#106247 https://bugs.freedesktop.org/show_bug.cgi?id=106247
  fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
  fdo#106765 https://bugs.freedesktop.org/show_bug.cgi?id=106765
  fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
  fdo#107127 https://bugs.freedesktop.org/show_bug.cgi?id=107127
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

* Linux: CI_DRM_4443 -> Patchwork_9562

  CI_DRM_4443: 5c43ea095bbd1469a9c767529537ddf0434acc60 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4539: 8b3cc74c6911e9b2835fe6e160f84bae463a70ef @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9562: c827b8e3ce5f0befe5d34da8c8c7801061519c63 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ 
git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9562/shards.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 i915 HDMI connector status is connected after disconnection

2018-07-06 Thread Patchwork
== Series Details ==

Series: i915 HDMI connector status is connected after disconnection
URL   : https://patchwork.freedesktop.org/series/46108/
State : failure

== Summary ==

Applying: i915 HDMI connector status is connected after disconnection
error: patch fragment without header at line 7: @@ -285,6 +287,45 @@ static 
bool intel_hpd_irq_event(struct drm_device
error: could not build fake ancestor
Patch failed at 0001 i915 HDMI connector status is connected after disconnection
Use 'git am --show-current-patch' to see the failed 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


Re: [Intel-gfx] [BUG] i915 HDMI connector status is connected after disconnection

2018-07-06 Thread Guang Bai
On Fri, 6 Jul 2018 13:38:06 -0700
Rodrigo Vivi  wrote:

> On Fri, Jul 06, 2018 at 10:41:18AM -0700, Guang Bai wrote:
> > On Fri, 6 Jul 2018 14:44:58 +0800
> > Chris Chiu  wrote:
> >   
> > > On Thu, Jul 5, 2018 at 10:40 PM, Ville Syrjälä
> > >  wrote:  
> > > > On Thu, Jul 05, 2018 at 03:58:36PM +0800, Chris Chiu wrote:
> > > >> Hi,
> > > >> We have few ASUS laptops X705FD (The new WiskyLake), X560UD
> > > >> (intel i5-8250U), X530UN (intel i7-8550U) share the same
> > > >> problem, which is the HDMI connector status stays connected
> > > >> even the HDMI cable has been unplugged. Look into the
> > > >> "/sys/class/drm/card0-HDMI-A-1/status" for checking the status
> > > >> while plug/unplug the HDMI, it shows "disconnected" before
> > > >> plug in HDMI cable, then switch to "connected" after plugin,
> > > >> and still stay "connected" after unplug. This would cause the
> > > >> audio output path cannot correctly switch from HDMI to
> > > >> internal speaker after unplugging the HDMI.
> > > >>
> > > >> I then try to verify with the latest kernel 4.18.0-rc3+, the
> > > >> bug still present. The full "dmesg" log is here.
> > > >> https://gist.github.com/mschiu77/d761d7c5cf191b7868d4d7788ae087f1
> > > >>
> > > >> The HDMI cable is plugged in at ~26th second.
> > > >> "[ 26.214371] [drm:drm_detect_monitor_audio [drm]] Monitor has
> > > >> basic audio support"
> > > >> then unplug the HDMI at ~73th second.
> > > >> "[ 73.328361] [drm:drm_detect_monitor_audio [drm]] Monitor has
> > > >> basic audio support"
> > > >>
> > > >> Please advise what I can do to fix this. Thanks
> > > >
> > > > Pull the cable out faster?
> > > >
> > > > I presume this is the same old case of hpd disconnecting
> > > > slightly before ddc and we still manage to read the EDID when
> > > > processing the hpd irq. We kinda tried to fix that with the
> > > > live status check but that thing failed spectacularly.
> > > >
> > > > --
> > > > Ville Syrjälä
> > > > Intel
> > > 
> > > Thanks for the suggestion. I tried pulling the cable out faster,
> > > the status shows correctly. I also tried branch drm-tip of
> > > https://cgit.freedesktop.org/drm/drm-tip
> > > but the symptom persists.
> > > 
> > > Anything I can help here? Or any old commit/patch I can try to do
> > > some experiments?
> > > 
> > > Chris
> > > ___
> > > Intel-gfx mailing list
> > > Intel-gfx@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx  
> > 
> > I'm working on a same issue with HP KBL ThinPro laptop where both
> > 
> > kernel 4.9.79 & 4.15.7 are failing the same way:
> > - Unplug the HDMI cable slowly the connector status is still
> >   "connected"
> > 
> > Debugging shows from kernel 4.9 and up to 4.18 drim/i915 behaves the
> > same way:
> > - When the HDMI calbe is unplugged, there is a transition time when
> >   the DDC lines are still connected and i915 can read back the EDID
> >   and honors "connected" state
> > 
> > This problem does not happen on Windows7 & Windows 10 on the same
> > failing platform - Windows KMD does *not* read the DDC when seeing
> > the corresponding PCH/HPD pins indicating "disconnected" within
> > 300ms-400ms period - This checking is done during bottom-half
> > interrupt routines
> > 
> > I worked patches with both 4.15.7 and 4.17.1 intercepting this
> > Windows KMD logics; It seems these patches work for HP KBL ThinPro
> > laptop - My patches are being tested by HP team - I was just about
> > to post the open discussion on this topic to collect inputs from
> > our community  
> 
> please send them out anyways ;)
> 
> > - Do we have to refactor the HDMI hot-plug handling codes to cope
> > with this long standing issue?  
> 
> What is your proposal for re-work?
> 
> > - Is that OK to add 300ms-500ms delay "msleep(100)" in a loop in the
> >   bottom half of interrupt routines?  
> 
> Well, We fight to add the delays only when they are required by specs,
> rather than experimental on single display/configuration...
> but/however/nevertheless we have cases that we retry aux
> communications 32 times because a specific monitor...
> 
> please show your patch and we discuss on top of it...
> 
> > 
> > Regards,
> > -Guang
> > ___
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx  

Following is my temp/test patch evaluated by customers per this HDMI
hot-plut issue:

From 1b5a3c32bd50c88c22cb375f7815c9462f29eae5 Mon Sep 17 00:00:00 2001
From: Guang Bai 
Date: Fri, 6 Jul 2018 16:46:55 -0700
Subject: [PATCH] drm/i915: Temp/testing codes to address HDMI hot-plug
issue

When slowly unplugging the HDMI cable, some platforms still
show the HDMI "connected" status - This issue happens from
kernel 4.9 and up to 4.17.1 and drm-tip
---
 drivers/gpu/drm/i915/intel_hotplug.c | 45
+++- 1 file changed, 44 insertions(+),

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Use crtc_state->has_psr instead of CAN_PSR for pipe update

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915: Use crtc_state->has_psr instead of CAN_PSR for pipe update
URL   : https://patchwork.freedesktop.org/series/46104/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4449 -> Patchwork_9580 =

== Summary - SUCCESS ==

  No regressions found.

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

== Known issues ==

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

  === IGT changes ===

 Possible fixes 

igt@kms_flip@basic-flip-vs-modeset:
  fi-skl-6700hq:  DMESG-WARN (fdo#105998) -> PASS +2


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


== Participating hosts (46 -> 42) ==

  Additional (1): fi-byt-j1900 
  Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 
fi-hsw-4200u 


== Build changes ==

* Linux: CI_DRM_4449 -> Patchwork_9580

  CI_DRM_4449: e470d2ee915b7c36d73d16da953cca8969d73906 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4543: 366eed37c7c71217e1cb1f3be5e26358a41f0001 @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9580: 27f7762e393dff489b66b9a470107ed65db24e48 @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

27f7762e393d drm/i915: Use crtc_state->has_psr instead of CAN_PSR for pipe 
update

== Logs ==

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


[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Use crtc_state->has_psr instead of CAN_PSR for pipe update

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915: Use crtc_state->has_psr instead of CAN_PSR for pipe update
URL   : https://patchwork.freedesktop.org/series/46104/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
27f7762e393d drm/i915: Use crtc_state->has_psr instead of CAN_PSR for pipe 
update
-:31: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 
'new_crtc_state->has_psr'
#31: FILE: drivers/gpu/drm/i915/intel_sprite.c:121:
+   if ((new_crtc_state->has_psr) && intel_psr_wait_for_idle(dev_priv))

total: 0 errors, 0 warnings, 1 checks, 8 lines checked

___
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: Replace nested subclassing with explicit subclasses

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915: Replace nested subclassing with explicit subclasses
URL   : https://patchwork.freedesktop.org/series/46103/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4449 -> Patchwork_9579 =

== Summary - SUCCESS ==

  No regressions found.

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

== Possible new issues ==

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

  === IGT changes ===

 Possible regressions 

igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
  {fi-cfl-8109u}: PASS -> INCOMPLETE


== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@gem_exec_suspend@basic-s4-devices:
  fi-kbl-7500u:   PASS -> DMESG-WARN (fdo#107139, fdo#105128)

igt@kms_chamelium@dp-edid-read:
  fi-kbl-7500u:   PASS -> FAIL (fdo#103841)

igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
  fi-bxt-dsi: PASS -> INCOMPLETE (fdo#103927)


 Possible fixes 

igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
  fi-skl-6700hq:  DMESG-WARN (fdo#105998) -> PASS


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

  fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
  fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
  fdo#107139 https://bugs.freedesktop.org/show_bug.cgi?id=107139


== Participating hosts (46 -> 42) ==

  Additional (1): fi-byt-j1900 
  Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 
fi-hsw-4200u 


== Build changes ==

* Linux: CI_DRM_4449 -> Patchwork_9579

  CI_DRM_4449: e470d2ee915b7c36d73d16da953cca8969d73906 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4543: 366eed37c7c71217e1cb1f3be5e26358a41f0001 @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9579: 2bbfbe296b3ddf9bc55691f77f063f7de7de3daf @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

2bbfbe296b3d drm/i915: Replace nested subclassing with explicit subclasses

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9579/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 drm/i915/selftests: Avoid warning if runtime pm is disabled

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915/selftests: Avoid warning if runtime pm is disabled
URL   : https://patchwork.freedesktop.org/series/46101/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4449 -> Patchwork_9578 =

== Summary - SUCCESS ==

  No regressions found.

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

== Known issues ==

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

  === IGT changes ===

 Possible fixes 

igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
  fi-skl-6700hq:  DMESG-WARN (fdo#105998) -> PASS


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


== Participating hosts (46 -> 41) ==

  Additional (1): fi-byt-j1900 
  Missing(6): fi-ilk-m540 fi-hsw-4200u fi-skl-guc fi-byt-squawks 
fi-bsw-cyan fi-ctg-p8600 


== Build changes ==

* Linux: CI_DRM_4449 -> Patchwork_9578

  CI_DRM_4449: e470d2ee915b7c36d73d16da953cca8969d73906 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4543: 366eed37c7c71217e1cb1f3be5e26358a41f0001 @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9578: 61dea1fc1d95130ccd10e5cdbdd29219cc758adc @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

61dea1fc1d95 drm/i915/selftests: Avoid warning if runtime pm is disabled

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9578/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 ICELAKE DSI DRIVER (rev4)

2018-07-06 Thread Patchwork
== Series Details ==

Series: ICELAKE DSI DRIVER (rev4)
URL   : https://patchwork.freedesktop.org/series/44823/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4441_full -> Patchwork_9561_full =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_9561_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_9561_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_9561_full:

  === IGT changes ===

 Warnings 

igt@gem_exec_schedule@deep-bsd2:
  shard-kbl:  PASS -> SKIP +1

igt@gem_mocs_settings@mocs-rc6-vebox:
  shard-kbl:  SKIP -> PASS +3

igt@kms_chv_cursor_fail@pipe-b-64x64-right-edge:
  shard-snb:  PASS -> SKIP +4


== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@kms_flip@plain-flip-ts-check-interruptible:
  shard-glk:  PASS -> FAIL (fdo#100368)

igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
  shard-snb:  PASS -> DMESG-WARN (fdo#102365)

igt@kms_setmode@basic:
  shard-apl:  PASS -> FAIL (fdo#99912)

igt@perf@blocking:
  shard-hsw:  PASS -> FAIL (fdo#102252)


 Possible fixes 

igt@kms_flip_tiling@flip-to-y-tiled:
  shard-glk:  FAIL -> PASS


 Warnings 

igt@drv_selftest@live_gtt:
  shard-kbl:  INCOMPLETE (fdo#107127, fdo#103665) -> FAIL 
(fdo#105347, fdo#107127)
  shard-glk:  INCOMPLETE (fdo#107127, fdo#103359, k.org#198133) -> 
FAIL (fdo#105347, fdo#107127)


  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
  fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347
  fdo#107127 https://bugs.freedesktop.org/show_bug.cgi?id=107127
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

* Linux: CI_DRM_4441 -> Patchwork_9561

  CI_DRM_4441: 3fe30c1d16d414ebf8c3ca95af28add100b7975e @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4539: 8b3cc74c6911e9b2835fe6e160f84bae463a70ef @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9561: fb68c08ac6fa9e5975c8fb6b074db0ad65bde5d8 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ 
git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9561/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 series starting with [01/27] drm/i915: Squelch very verbose error logging

2018-07-06 Thread Patchwork
== Series Details ==

Series: series starting with [01/27] drm/i915: Squelch very verbose error 
logging
URL   : https://patchwork.freedesktop.org/series/46051/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4441_full -> Patchwork_9560_full =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_9560_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_9560_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_9560_full:

  === IGT changes ===

 Possible regressions 

igt@kms_flip_tiling@flip-to-x-tiled:
  shard-glk:  PASS -> FAIL

igt@kms_universal_plane@cursor-fb-leak-pipe-b:
  shard-apl:  PASS -> FAIL


 Warnings 

igt@gem_exec_schedule@deep-bsd2:
  shard-kbl:  PASS -> SKIP +1

igt@gem_mocs_settings@mocs-rc6-vebox:
  shard-kbl:  SKIP -> PASS +4


== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@drv_suspend@shrink:
  shard-apl:  PASS -> INCOMPLETE (fdo#103927)

igt@gem_exec_reloc@basic-wc-gtt-active:
  shard-snb:  PASS -> INCOMPLETE (fdo#105411)

igt@kms_atomic_transition@1x-modeset-transitions-nonblocking:
  shard-glk:  PASS -> FAIL (fdo#105703)

igt@kms_flip@2x-flip-vs-blocking-wf-vblank:
  shard-glk:  PASS -> FAIL (fdo#100368)

igt@kms_flip@2x-flip-vs-expired-vblank:
  shard-glk:  PASS -> FAIL (fdo#105363)

igt@kms_flip_tiling@flip-x-tiled:
  shard-glk:  PASS -> FAIL (fdo#103822)

igt@kms_setmode@basic:
  shard-apl:  PASS -> FAIL (fdo#99912)


 Possible fixes 

igt@kms_flip@2x-plain-flip-ts-check:
  shard-glk:  FAIL -> PASS

igt@kms_setmode@basic:
  shard-hsw:  FAIL (fdo#99912) -> PASS
  shard-kbl:  FAIL (fdo#99912) -> PASS


 Warnings 

igt@drv_selftest@live_gtt:
  shard-kbl:  INCOMPLETE (fdo#107127, fdo#103665) -> FAIL 
(fdo#107127, fdo#105347)


  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703
  fdo#107127 https://bugs.freedesktop.org/show_bug.cgi?id=107127
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

* Linux: CI_DRM_4441 -> Patchwork_9560

  CI_DRM_4441: 3fe30c1d16d414ebf8c3ca95af28add100b7975e @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4539: 8b3cc74c6911e9b2835fe6e160f84bae463a70ef @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9560: d45b72b8650c7c419f054cdf4503b54d133a46ca @ 
git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ 
git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9560/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: Use crtc_state->has_psr instead of CAN_PSR for pipe update

2018-07-06 Thread Rodrigo Vivi
On Fri, Jul 06, 2018 at 02:13:18PM -0700, Tarun Vyas wrote:
> In commit "drm/i915: Wait for PSR exit before checking for vblank
> evasion", the idea was to limit the PSR IDLE checks when PSR is
> actually supported. While CAN_PSR does do that check, it doesn't
> applies on a per-crtc basis. crtc_state->has_psr is a more granular
> check that avoids everything but pipe A, for the PSR IDLE check.
> 
> With this, the PSR IDLE check should be a *no-op* for all but pipe A
> which is what was intended originally.
> 
> Fixes: a608987970b9 ("drm/i915: Wait for PSR exit before checking for
> vblank evasion")
> 
> Signed-off-by: Tarun Vyas 

Reviewed-by: Rodrigo Vivi 

> ---
>  drivers/gpu/drm/i915/intel_sprite.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c 
> b/drivers/gpu/drm/i915/intel_sprite.c
> index 4990d6e84ddf..c27720847672 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -118,7 +118,7 @@ void intel_pipe_update_start(const struct 
> intel_crtc_state *new_crtc_state)
>* VBL interrupts will start the PSR exit and prevent a PSR
>* re-entry as well.
>*/
> - if (CAN_PSR(dev_priv) && intel_psr_wait_for_idle(dev_priv))
> + if ((new_crtc_state->has_psr) && intel_psr_wait_for_idle(dev_priv))
>   DRM_ERROR("PSR idle timed out, atomic update may fail\n");
>  
>   local_irq_disable();
> -- 
> 2.13.5
> 
> ___
> 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


Re: [Intel-gfx] [PATCH] drm/i915/selftests: Avoid warning if runtime pm is disabled

2018-07-06 Thread Rodrigo Vivi
On Fri, Jul 06, 2018 at 09:59:47PM +0100, Chris Wilson wrote:
> Inside the mock GEM device, we try to grab the runtime pm for the fake
> device to prevent it from ever suspending. However, if CONFIG_PM is not
> set, trying to obtain the wakref returns an error which we WARN about.
> Suppress the expected warning.
> 
> Signed-off-by: Chris Wilson 
> ---
>  drivers/gpu/drm/i915/selftests/mock_gem_device.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c 
> b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> index c97075c5ccaf..43ed8b28aeaa 100644
> --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
> @@ -157,7 +157,8 @@ struct drm_i915_private *mock_gem_device(void)
>   dev_pm_domain_set(&pdev->dev, &pm_domain);
>   pm_runtime_enable(&pdev->dev);
>   pm_runtime_dont_use_autosuspend(&pdev->dev);
> - WARN_ON(pm_runtime_get_sync(&pdev->dev));
> + if (pm_runtime_enabled(&pdev->dev))

I have the impression there are more places that we need this check...

Reviewed-by: Rodrigo Vivi 

> + WARN_ON(pm_runtime_get_sync(&pdev->dev));
>  
>   i915 = (struct drm_i915_private *)(pdev + 1);
>   pci_set_drvdata(pdev, i915);
> -- 
> 2.18.0
> 
> ___
> 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] [PATCH] drm/i915: Use crtc_state->has_psr instead of CAN_PSR for pipe update

2018-07-06 Thread Tarun Vyas
In commit "drm/i915: Wait for PSR exit before checking for vblank
evasion", the idea was to limit the PSR IDLE checks when PSR is
actually supported. While CAN_PSR does do that check, it doesn't
applies on a per-crtc basis. crtc_state->has_psr is a more granular
check that avoids everything but pipe A, for the PSR IDLE check.

With this, the PSR IDLE check should be a *no-op* for all but pipe A
which is what was intended originally.

Fixes: a608987970b9 ("drm/i915: Wait for PSR exit before checking for
vblank evasion")

Signed-off-by: Tarun Vyas 
---
 drivers/gpu/drm/i915/intel_sprite.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_sprite.c 
b/drivers/gpu/drm/i915/intel_sprite.c
index 4990d6e84ddf..c27720847672 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -118,7 +118,7 @@ void intel_pipe_update_start(const struct intel_crtc_state 
*new_crtc_state)
 * VBL interrupts will start the PSR exit and prevent a PSR
 * re-entry as well.
 */
-   if (CAN_PSR(dev_priv) && intel_psr_wait_for_idle(dev_priv))
+   if ((new_crtc_state->has_psr) && intel_psr_wait_for_idle(dev_priv))
DRM_ERROR("PSR idle timed out, atomic update may fail\n");
 
local_irq_disable();
-- 
2.13.5

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


[Intel-gfx] [CI] drm/i915: Replace nested subclassing with explicit subclasses

2018-07-06 Thread Chris Wilson
In the next patch, we will want a third distinct class of timeline that
may overlap with the current pair of client and engine timeline classes.
Rather than use the ad hoc markup of SINGLE_DEPTH_NESTING, initialise
the different timeline classes with an explicit subclass.

Signed-off-by: Chris Wilson 
Reviewed-by: Tvrtko Ursulin 
---
 drivers/gpu/drm/i915/i915_gem.c  | 2 +-
 drivers/gpu/drm/i915/i915_request.c  | 2 +-
 drivers/gpu/drm/i915/i915_timeline.h | 2 ++
 drivers/gpu/drm/i915/intel_engine_cs.c   | 1 +
 drivers/gpu/drm/i915/selftests/mock_engine.c | 2 ++
 5 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 2e05cf114083..1a9dab302433 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3095,7 +3095,7 @@ static void engine_skip_context(struct i915_request 
*request)
GEM_BUG_ON(timeline == &engine->timeline);
 
spin_lock_irqsave(&engine->timeline.lock, flags);
-   spin_lock_nested(&timeline->lock, SINGLE_DEPTH_NESTING);
+   spin_lock(&timeline->lock);
 
list_for_each_entry_continue(request, &engine->timeline.requests, link)
if (request->gem_context == hung_ctx)
diff --git a/drivers/gpu/drm/i915/i915_request.c 
b/drivers/gpu/drm/i915/i915_request.c
index 7ae08b68121e..3248369dbcfb 100644
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
@@ -503,7 +503,7 @@ static void move_to_timeline(struct i915_request *request,
GEM_BUG_ON(request->timeline == &request->engine->timeline);
lockdep_assert_held(&request->engine->timeline.lock);
 
-   spin_lock_nested(&request->timeline->lock, SINGLE_DEPTH_NESTING);
+   spin_lock(&request->timeline->lock);
list_move_tail(&request->link, &timeline->requests);
spin_unlock(&request->timeline->lock);
 }
diff --git a/drivers/gpu/drm/i915/i915_timeline.h 
b/drivers/gpu/drm/i915/i915_timeline.h
index dc2a4632faa7..a2c2c3ab5fb0 100644
--- a/drivers/gpu/drm/i915/i915_timeline.h
+++ b/drivers/gpu/drm/i915/i915_timeline.h
@@ -37,6 +37,8 @@ struct i915_timeline {
u32 seqno;
 
spinlock_t lock;
+#define TIMELINE_CLIENT 0 /* default subclass */
+#define TIMELINE_ENGINE 1
 
/**
 * List of breadcrumbs associated with GPU requests currently
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c 
b/drivers/gpu/drm/i915/intel_engine_cs.c
index e2f562853aee..0ac497275a51 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -483,6 +483,7 @@ static void intel_engine_init_execlist(struct 
intel_engine_cs *engine)
 void intel_engine_setup_common(struct intel_engine_cs *engine)
 {
i915_timeline_init(engine->i915, &engine->timeline, engine->name);
+   lockdep_set_subclass(&engine->timeline.lock, TIMELINE_ENGINE);
 
intel_engine_init_execlist(engine);
intel_engine_init_hangcheck(engine);
diff --git a/drivers/gpu/drm/i915/selftests/mock_engine.c 
b/drivers/gpu/drm/i915/selftests/mock_engine.c
index c2a0451336cf..22a73da45ad5 100644
--- a/drivers/gpu/drm/i915/selftests/mock_engine.c
+++ b/drivers/gpu/drm/i915/selftests/mock_engine.c
@@ -200,6 +200,8 @@ struct intel_engine_cs *mock_engine(struct drm_i915_private 
*i915,
engine->base.submit_request = mock_submit_request;
 
i915_timeline_init(i915, &engine->base.timeline, engine->base.name);
+   lockdep_set_subclass(&engine->base.timeline.lock, TIMELINE_ENGINE);
+
intel_engine_init_breadcrumbs(&engine->base);
engine->base.breadcrumbs.mock = true; /* prevent touching HW for irqs */
 
-- 
2.18.0

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


[Intel-gfx] [PATCH] drm/i915/selftests: Avoid warning if runtime pm is disabled

2018-07-06 Thread Chris Wilson
Inside the mock GEM device, we try to grab the runtime pm for the fake
device to prevent it from ever suspending. However, if CONFIG_PM is not
set, trying to obtain the wakref returns an error which we WARN about.
Suppress the expected warning.

Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/i915/selftests/mock_gem_device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c 
b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
index c97075c5ccaf..43ed8b28aeaa 100644
--- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
+++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
@@ -157,7 +157,8 @@ struct drm_i915_private *mock_gem_device(void)
dev_pm_domain_set(&pdev->dev, &pm_domain);
pm_runtime_enable(&pdev->dev);
pm_runtime_dont_use_autosuspend(&pdev->dev);
-   WARN_ON(pm_runtime_get_sync(&pdev->dev));
+   if (pm_runtime_enabled(&pdev->dev))
+   WARN_ON(pm_runtime_get_sync(&pdev->dev));
 
i915 = (struct drm_i915_private *)(pdev + 1);
pci_set_drvdata(pdev, i915);
-- 
2.18.0

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


Re: [Intel-gfx] [PATCH] drm/i915/selftests: Adjust y-tiling height for older machines

2018-07-06 Thread Chris Wilson
Quoting Rodrigo Vivi (2018-07-06 21:55:37)
> On Fri, Jul 06, 2018 at 09:39:14PM +0100, Chris Wilson wrote:
> > Quoting Rodrigo Vivi (2018-07-06 21:27:52)
> > > On Fri, Jul 06, 2018 at 06:15:37PM +0100, Chris Wilson wrote:
> > > > Older machines do not have the 128-byte tile width format for
> > > > I915_TILING_Y and so we must adapt our reference swizzle.
> > > > 
> > > > Testcase: igt/drv_selftest/live_objects #gdg
> > > 
> > > The change below itself makes sense to me, but I'm trying to understand
> > > where this came from
> > 
> > The result doesn't look right, so scrap it.
> >  
> > > Looking to 
> > > https://intel-gfx-ci.01.org/tree/drm-tip/igt@drv_selftest@live_objects.html
> > > is this related to issues on fi-gdg-551?
> > 
> > Would only apply to gdg in the farm.
> >  
> > > Or is this related to that APL bugzilla entry?
> 
> that flash of a moment when I wondered you could be actually targeting this:
> https://bugs.freedesktop.org/show_bug.cgi?id=107113

Ah, totally unrelated problem :)

Fwiw, I can reproduce this on my i915gm so hopefully should be able to
resolve it without spamming the lists.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/selftests: Adjust y-tiling height for older machines

2018-07-06 Thread Rodrigo Vivi
On Fri, Jul 06, 2018 at 09:39:14PM +0100, Chris Wilson wrote:
> Quoting Rodrigo Vivi (2018-07-06 21:27:52)
> > On Fri, Jul 06, 2018 at 06:15:37PM +0100, Chris Wilson wrote:
> > > Older machines do not have the 128-byte tile width format for
> > > I915_TILING_Y and so we must adapt our reference swizzle.
> > > 
> > > Testcase: igt/drv_selftest/live_objects #gdg
> > 
> > The change below itself makes sense to me, but I'm trying to understand
> > where this came from
> 
> The result doesn't look right, so scrap it.
>  
> > Looking to 
> > https://intel-gfx-ci.01.org/tree/drm-tip/igt@drv_selftest@live_objects.html
> > is this related to issues on fi-gdg-551?
> 
> Would only apply to gdg in the farm.
>  
> > Or is this related to that APL bugzilla entry?

that flash of a moment when I wondered you could be actually targeting this:
https://bugs.freedesktop.org/show_bug.cgi?id=107113


> 
> Which?
>  
> > > Signed-off-by: Chris Wilson 
> > > ---
> > >  drivers/gpu/drm/i915/selftests/i915_gem_object.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_object.c 
> > > b/drivers/gpu/drm/i915/selftests/i915_gem_object.c
> > > index 6fe71865b710..8a35d2f70671 100644
> > > --- a/drivers/gpu/drm/i915/selftests/i915_gem_object.c
> > > +++ b/drivers/gpu/drm/i915/selftests/i915_gem_object.c
> > > @@ -171,7 +171,7 @@ static u64 tiled_offset(const struct tile *tile, u64 
> > > v)
> > >   v += x;
> > >   } else {
> > >   const unsigned int ytile_span = 16;
> > 
> > could we also figure this value from somewhere else instead of
> > leaving it hardcoded for all platforms here?
> 
> The only place where manual detiling is used inside the kernel. And if
> we were, it would be a lot of specialised code, where obfuscation of
> magic macros is unlikely to help (careful handling of cachelines being
> at the forefront). Interesting question as to whether we do provide a
> bounce buffer mmap to replace GTT mmap? Just say no.
> -Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/selftests: Adjust y-tiling height for older machines

2018-07-06 Thread Chris Wilson
Quoting Rodrigo Vivi (2018-07-06 21:27:52)
> On Fri, Jul 06, 2018 at 06:15:37PM +0100, Chris Wilson wrote:
> > Older machines do not have the 128-byte tile width format for
> > I915_TILING_Y and so we must adapt our reference swizzle.
> > 
> > Testcase: igt/drv_selftest/live_objects #gdg
> 
> The change below itself makes sense to me, but I'm trying to understand
> where this came from

The result doesn't look right, so scrap it.
 
> Looking to 
> https://intel-gfx-ci.01.org/tree/drm-tip/igt@drv_selftest@live_objects.html
> is this related to issues on fi-gdg-551?

Would only apply to gdg in the farm.
 
> Or is this related to that APL bugzilla entry?

Which?
 
> > Signed-off-by: Chris Wilson 
> > ---
> >  drivers/gpu/drm/i915/selftests/i915_gem_object.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_object.c 
> > b/drivers/gpu/drm/i915/selftests/i915_gem_object.c
> > index 6fe71865b710..8a35d2f70671 100644
> > --- a/drivers/gpu/drm/i915/selftests/i915_gem_object.c
> > +++ b/drivers/gpu/drm/i915/selftests/i915_gem_object.c
> > @@ -171,7 +171,7 @@ static u64 tiled_offset(const struct tile *tile, u64 v)
> >   v += x;
> >   } else {
> >   const unsigned int ytile_span = 16;
> 
> could we also figure this value from somewhere else instead of
> leaving it hardcoded for all platforms here?

The only place where manual detiling is used inside the kernel. And if
we were, it would be a lot of specialised code, where obfuscation of
magic macros is unlikely to help (careful handling of cachelines being
at the forefront). Interesting question as to whether we do provide a
bounce buffer mmap to replace GTT mmap? Just say no.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [BUG] i915 HDMI connector status is connected after disconnection

2018-07-06 Thread Rodrigo Vivi
On Fri, Jul 06, 2018 at 10:41:18AM -0700, Guang Bai wrote:
> On Fri, 6 Jul 2018 14:44:58 +0800
> Chris Chiu  wrote:
> 
> > On Thu, Jul 5, 2018 at 10:40 PM, Ville Syrjälä
> >  wrote:
> > > On Thu, Jul 05, 2018 at 03:58:36PM +0800, Chris Chiu wrote:  
> > >> Hi,
> > >> We have few ASUS laptops X705FD (The new WiskyLake), X560UD
> > >> (intel i5-8250U), X530UN (intel i7-8550U) share the same problem,
> > >> which is the HDMI connector status stays connected even the HDMI
> > >> cable has been unplugged. Look into the
> > >> "/sys/class/drm/card0-HDMI-A-1/status" for checking the status
> > >> while plug/unplug the HDMI, it shows "disconnected" before plug in
> > >> HDMI cable, then switch to "connected" after plugin, and still
> > >> stay "connected" after unplug. This would cause the audio output
> > >> path cannot correctly switch from HDMI to internal speaker after
> > >> unplugging the HDMI.
> > >>
> > >> I then try to verify with the latest kernel 4.18.0-rc3+, the bug
> > >> still present. The full "dmesg" log is here.
> > >> https://gist.github.com/mschiu77/d761d7c5cf191b7868d4d7788ae087f1
> > >>
> > >> The HDMI cable is plugged in at ~26th second.
> > >> "[ 26.214371] [drm:drm_detect_monitor_audio [drm]] Monitor has
> > >> basic audio support"
> > >> then unplug the HDMI at ~73th second.
> > >> "[ 73.328361] [drm:drm_detect_monitor_audio [drm]] Monitor has
> > >> basic audio support"
> > >>
> > >> Please advise what I can do to fix this. Thanks  
> > >
> > > Pull the cable out faster?
> > >
> > > I presume this is the same old case of hpd disconnecting slightly
> > > before ddc and we still manage to read the EDID when processing
> > > the hpd irq. We kinda tried to fix that with the live status
> > > check but that thing failed spectacularly.
> > >
> > > --
> > > Ville Syrjälä
> > > Intel  
> > 
> > Thanks for the suggestion. I tried pulling the cable out faster, the
> > status shows correctly. I also tried branch drm-tip of
> > https://cgit.freedesktop.org/drm/drm-tip
> > but the symptom persists.
> > 
> > Anything I can help here? Or any old commit/patch I can try to do some
> > experiments?
> > 
> > Chris
> > ___
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> I'm working on a same issue with HP KBL ThinPro laptop where both
> 
> kernel 4.9.79 & 4.15.7 are failing the same way:
> - Unplug the HDMI cable slowly the connector status is still
>   "connected"
> 
> Debugging shows from kernel 4.9 and up to 4.18 drim/i915 behaves the
> same way:
> - When the HDMI calbe is unplugged, there is a transition time when
>   the DDC lines are still connected and i915 can read back the EDID
>   and honors "connected" state
> 
> This problem does not happen on Windows7 & Windows 10 on the same
> failing platform - Windows KMD does *not* read the DDC when seeing the
> corresponding PCH/HPD pins indicating "disconnected" within 300ms-400ms
> period - This checking is done during bottom-half interrupt routines
> 
> I worked patches with both 4.15.7 and 4.17.1 intercepting this Windows
> KMD logics; It seems these patches work for HP KBL ThinPro laptop - My
> patches are being tested by HP team - I was just about to post the open
> discussion on this topic to collect inputs from our community

please send them out anyways ;)

> - Do we have to refactor the HDMI hot-plug handling codes to cope with
>   this long standing issue?

What is your proposal for re-work?

> - Is that OK to add 300ms-500ms delay "msleep(100)" in a loop in the
>   bottom half of interrupt routines?

Well, We fight to add the delays only when they are required by specs,
rather than experimental on single display/configuration...
but/however/nevertheless we have cases that we retry aux communications
32 times because a specific monitor...

please show your patch and we discuss on top of it...

> 
> Regards,
> -Guang
> ___
> 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


Re: [Intel-gfx] [PATCH] drm/i915/selftests: Provide full mb() around clflush

2018-07-06 Thread Rodrigo Vivi
On Fri, Jul 06, 2018 at 09:27:47PM +0100, Chris Wilson wrote:
> Quoting Rodrigo Vivi (2018-07-06 21:23:00)
> > On Fri, Jul 06, 2018 at 06:49:26PM +0100, Chris Wilson wrote:
> > > clflush is an unserialised instruction and the IA manual strongly advises
> > > you to serialise it with a mb. To be cautious, apply one before and one
> > > after,
> > 
> > my understanding is that we need one before and one after anyways,
> > not just a matter of being cautious for being cautious..
> > 
> > Reviewed-by: Rodrigo Vivi 
> 
> If you are really careful, you can reduce it to a mb between writes and
> the clflush; and vice verse, the mb between clflush and subsequent
> reads. It's all about prevent the clflush from overtaking or being
> overtaken by the operations it is meant to flush or invalidate
> respectively.
> 
> But since we're being paranoid here, do both.

hm... makes sense... better to be paranoid...

> -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


Re: [Intel-gfx] [PATCH] Make the "Reducing compressed framebufer size" message be DRM_INFO_ONCE()

2018-07-06 Thread Rodrigo Vivi
On Fri, Jul 06, 2018 at 03:04:24PM -0400, Peter Jones wrote:
> This was sort of annoying me:
> 
> random:~$ dmesg | tail -1
> [523884.039227] [drm] Reducing the compressed framebuffer size. This may lead 
> to less power savings than a non-reduced-size. Try to increase stolen memory 
> size if available in BIOS.
> random:~$ dmesg | grep -c "Reducing the compressed"
> 47
> 
> This patch makes it DRM_INFO_ONCE() just like the similar message
> farther down in that function is pr_info_once().
> 
> Signed-off-by: Peter Jones 
> ---
>  drivers/gpu/drm/i915/intel_fbc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_fbc.c 
> b/drivers/gpu/drm/i915/intel_fbc.c
> index b431b6733cc..88b013758da 100644
> --- a/drivers/gpu/drm/i915/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/intel_fbc.c
> @@ -585,7 +585,7 @@ static int intel_fbc_alloc_cfb(struct intel_crtc *crtc)
>   if (!ret)
>   goto err_llb;
>   else if (ret > 1) {
> - DRM_INFO("Reducing the compressed framebuffer size. This may 
> lead to less power savings than a non-reduced-size. Try to increase stolen 
> memory size if available in BIOS.\n");
> + DRM_INFO_ONCE("Reducing the compressed framebuffer size. This 
> may lead to less power savings than a non-reduced-size. Try to increase 
> stolen memory size if available in BIOS.\n");

I know the feeling of seeing a message over and over again when you are already 
aware of that.
Specially something that tells you to change BIOS configuration...
for this reason I think it makes sense, so:

Acked-by: Rodrigo Vivi 

I will just wait for CI and give a couple days to someone else to challenge.
If I end up forgetting to push it please ping me...

>  
>   }
>  
> -- 
> 2.17.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


Re: [Intel-gfx] [PATCH] drm/i915/selftests: Provide full mb() around clflush

2018-07-06 Thread Chris Wilson
Quoting Rodrigo Vivi (2018-07-06 21:23:00)
> On Fri, Jul 06, 2018 at 06:49:26PM +0100, Chris Wilson wrote:
> > clflush is an unserialised instruction and the IA manual strongly advises
> > you to serialise it with a mb. To be cautious, apply one before and one
> > after,
> 
> my understanding is that we need one before and one after anyways,
> not just a matter of being cautious for being cautious..
> 
> Reviewed-by: Rodrigo Vivi 

If you are really careful, you can reduce it to a mb between writes and
the clflush; and vice verse, the mb between clflush and subsequent
reads. It's all about prevent the clflush from overtaking or being
overtaken by the operations it is meant to flush or invalidate
respectively.

But since we're being paranoid here, do both.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915/selftests: Adjust y-tiling height for older machines

2018-07-06 Thread Rodrigo Vivi
On Fri, Jul 06, 2018 at 06:15:37PM +0100, Chris Wilson wrote:
> Older machines do not have the 128-byte tile width format for
> I915_TILING_Y and so we must adapt our reference swizzle.
> 
> Testcase: igt/drv_selftest/live_objects #gdg

The change below itself makes sense to me, but I'm trying to understand
where this came from

Looking to 
https://intel-gfx-ci.01.org/tree/drm-tip/igt@drv_selftest@live_objects.html
is this related to issues on fi-gdg-551?

Or is this related to that APL bugzilla entry?

> Signed-off-by: Chris Wilson 
> ---
>  drivers/gpu/drm/i915/selftests/i915_gem_object.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_object.c 
> b/drivers/gpu/drm/i915/selftests/i915_gem_object.c
> index 6fe71865b710..8a35d2f70671 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_object.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_object.c
> @@ -171,7 +171,7 @@ static u64 tiled_offset(const struct tile *tile, u64 v)
>   v += x;
>   } else {
>   const unsigned int ytile_span = 16;

could we also figure this value from somewhere else instead of
leaving it hardcoded for all platforms here?

> - const unsigned int ytile_height = 32 * ytile_span;
> + const unsigned int ytile_height = tile->height * ytile_span;
>  
>   v += y * ytile_span;
>   v += div64_u64_rem(x, ytile_span, &x) * ytile_height;
> -- 
> 2.18.0
> 
> ___
> 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


Re: [Intel-gfx] [PATCH] drm/i915/selftests: Provide full mb() around clflush

2018-07-06 Thread Rodrigo Vivi
On Fri, Jul 06, 2018 at 06:49:26PM +0100, Chris Wilson wrote:
> clflush is an unserialised instruction and the IA manual strongly advises
> you to serialise it with a mb. To be cautious, apply one before and one
> after,

my understanding is that we need one before and one after anyways,
not just a matter of being cautious for being cautious..

Reviewed-by: Rodrigo Vivi 


> so that it is serialised with both writes and reads without
> worrying too much about the required direction.
> 
> Signed-off-by: Chris Wilson 
> ---
>  .../drm/i915/selftests/i915_gem_coherency.c   | 21 ---
>  1 file changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c 
> b/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
> index 294c58aba2c1..df44c302a9fe 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
> @@ -42,11 +42,21 @@ static int cpu_set(struct drm_i915_gem_object *obj,
>  
>   page = i915_gem_object_get_page(obj, offset >> PAGE_SHIFT);
>   map = kmap_atomic(page);
> - if (needs_clflush & CLFLUSH_BEFORE)
> +
> + if (needs_clflush & CLFLUSH_BEFORE) {
> + mb();
>   clflush(map+offset_in_page(offset) / sizeof(*map));
> + mb();
> + }
> +
>   map[offset_in_page(offset) / sizeof(*map)] = v;
> - if (needs_clflush & CLFLUSH_AFTER)
> +
> + if (needs_clflush & CLFLUSH_AFTER) {
> + mb();
>   clflush(map+offset_in_page(offset) / sizeof(*map));
> + mb();
> + }
> +
>   kunmap_atomic(map);
>  
>   i915_gem_obj_finish_shmem_access(obj);
> @@ -68,8 +78,13 @@ static int cpu_get(struct drm_i915_gem_object *obj,
>  
>   page = i915_gem_object_get_page(obj, offset >> PAGE_SHIFT);
>   map = kmap_atomic(page);
> - if (needs_clflush & CLFLUSH_BEFORE)
> +
> + if (needs_clflush & CLFLUSH_BEFORE) {
> + mb();
>   clflush(map+offset_in_page(offset) / sizeof(*map));
> + mb();
> + }
> +
>   *v = map[offset_in_page(offset) / sizeof(*map)];
>   kunmap_atomic(map);
>  
> -- 
> 2.18.0
> 
> ___
> 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.BAT: success for Make the "Reducing compressed framebufer size" message be DRM_INFO_ONCE()

2018-07-06 Thread Patchwork
== Series Details ==

Series: Make the "Reducing compressed framebufer size" message be 
DRM_INFO_ONCE()
URL   : https://patchwork.freedesktop.org/series/46092/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4448 -> Patchwork_9577 =

== Summary - SUCCESS ==

  No regressions found.

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

== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@kms_frontbuffer_tracking@basic:
  fi-skl-guc: NOTRUN -> FAIL (fdo#103167)


 Possible fixes 

igt@kms_flip@basic-flip-vs-dpms:
  fi-skl-6700hq:  DMESG-WARN (fdo#105998) -> PASS

igt@kms_frontbuffer_tracking@basic:
  fi-hsw-peppy:   DMESG-FAIL (fdo#106103, fdo#102614) -> PASS


  fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
  fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103


== Participating hosts (46 -> 42) ==

  Additional (1): fi-skl-guc 
  Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 
fi-hsw-4200u 


== Build changes ==

* Linux: CI_DRM_4448 -> Patchwork_9577

  CI_DRM_4448: e094950bd5b5767bab1d2a5c259635dc6091f8cc @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4543: 366eed37c7c71217e1cb1f3be5e26358a41f0001 @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9577: db1271a678bb745e2471c020f79a0a38a7a24f91 @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

db1271a678bb Make the "Reducing compressed framebufer size" message be 
DRM_INFO_ONCE()

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9577/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 drm/i915: Fix assert_plane() warning on bootup with external display (rev8)

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915: Fix assert_plane() warning on bootup with external display 
(rev8)
URL   : https://patchwork.freedesktop.org/series/44909/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4448 -> Patchwork_9576 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: 
https://patchwork.freedesktop.org/api/1.0/series/44909/revisions/8/mbox/

== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@kms_frontbuffer_tracking@basic:
  fi-skl-guc: NOTRUN -> FAIL (fdo#103167)


 Possible fixes 

igt@kms_flip@basic-flip-vs-dpms:
  fi-skl-6700hq:  DMESG-WARN (fdo#105998) -> PASS

igt@kms_frontbuffer_tracking@basic:
  fi-hsw-peppy:   DMESG-FAIL (fdo#106103, fdo#102614) -> PASS


  fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
  fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103


== Participating hosts (46 -> 42) ==

  Additional (1): fi-skl-guc 
  Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 
fi-hsw-4200u 


== Build changes ==

* Linux: CI_DRM_4448 -> Patchwork_9576

  CI_DRM_4448: e094950bd5b5767bab1d2a5c259635dc6091f8cc @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4543: 366eed37c7c71217e1cb1f3be5e26358a41f0001 @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9576: 7b57b62848f96c2c2e92917e603c4bf1ee1909f5 @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

7b57b62848f9 drm/i915: Fix assert_plane() warning on bootup with external 
display

== Logs ==

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


[Intel-gfx] [PATCH] Make the "Reducing compressed framebufer size" message be DRM_INFO_ONCE()

2018-07-06 Thread Peter Jones
This was sort of annoying me:

random:~$ dmesg | tail -1
[523884.039227] [drm] Reducing the compressed framebuffer size. This may lead 
to less power savings than a non-reduced-size. Try to increase stolen memory 
size if available in BIOS.
random:~$ dmesg | grep -c "Reducing the compressed"
47

This patch makes it DRM_INFO_ONCE() just like the similar message
farther down in that function is pr_info_once().

Signed-off-by: Peter Jones 
---
 drivers/gpu/drm/i915/intel_fbc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
index b431b6733cc..88b013758da 100644
--- a/drivers/gpu/drm/i915/intel_fbc.c
+++ b/drivers/gpu/drm/i915/intel_fbc.c
@@ -585,7 +585,7 @@ static int intel_fbc_alloc_cfb(struct intel_crtc *crtc)
if (!ret)
goto err_llb;
else if (ret > 1) {
-   DRM_INFO("Reducing the compressed framebuffer size. This may 
lead to less power savings than a non-reduced-size. Try to increase stolen 
memory size if available in BIOS.\n");
+   DRM_INFO_ONCE("Reducing the compressed framebuffer size. This 
may lead to less power savings than a non-reduced-size. Try to increase stolen 
memory size if available in BIOS.\n");
 
}
 
-- 
2.17.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: Fix assert_plane() warning on bootup with external display (rev7)

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915: Fix assert_plane() warning on bootup with external display 
(rev7)
URL   : https://patchwork.freedesktop.org/series/44909/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4448 -> Patchwork_9575 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: 
https://patchwork.freedesktop.org/api/1.0/series/44909/revisions/7/mbox/

== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@kms_frontbuffer_tracking@basic:
  fi-skl-guc: NOTRUN -> FAIL (fdo#103167)

igt@kms_pipe_crc_basic@read-crc-pipe-c:
  fi-kbl-r:   PASS -> DMESG-WARN (fdo#105602)


 Possible fixes 

igt@kms_flip@basic-flip-vs-dpms:
  fi-skl-6700hq:  DMESG-WARN (fdo#105998) -> PASS

igt@kms_frontbuffer_tracking@basic:
  fi-hsw-peppy:   DMESG-FAIL (fdo#106103, fdo#102614) -> PASS


  fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
  fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
  fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103


== Participating hosts (46 -> 41) ==

  Additional (1): fi-skl-guc 
  Missing(6): fi-ilk-m540 fi-hsw-4200u fi-byt-j1900 fi-byt-squawks 
fi-bsw-cyan fi-ctg-p8600 


== Build changes ==

* Linux: CI_DRM_4448 -> Patchwork_9575

  CI_DRM_4448: e094950bd5b5767bab1d2a5c259635dc6091f8cc @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4543: 366eed37c7c71217e1cb1f3be5e26358a41f0001 @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9575: 6614f5599b9c31bb11798f1d62b9923e9f61aca8 @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

6614f5599b9c drm/i915: Fix assert_plane() warning on bootup with external 
display

== Logs ==

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


[Intel-gfx] [PATCH v8] drm/i915: Fix assert_plane() warning on bootup with external display

2018-07-06 Thread Azhar Shaikh
On KBL, WHL RVPs, booting up with an external display connected, triggers
below warning, when the BiOS brings up the external display too.
This warning is not seen during hotplug.

[3.615226] [ cut here ]
[3.619829] plane 1A assertion failure (expected on, current off)
[3.632039] WARNING: CPU: 2 PID: 354 at 
drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb
[3.633920] iwlwifi :00:14.3: loaded firmware version 38.c0e03d94.0 
op_mode iwlmvm
[3.647157] Modules linked in: iwlwifi cfg80211 btusb btrtl btbcm btintel 
bluetooth ecdh_generic
[3.647163] CPU: 2 PID: 354 Comm: frecon Not tainted 
4.17.0-rc7-50176-g655af12d39c2 #3
[3.647165] Hardware name: Intel Corporation CoffeeLake Client 
Platform/WhiskeyLake U DDR4 ERB, BIOS CNLSFWR1.R00.X140.B00.1804040304 
04/04/2018
[3.684509] RIP: 0010:assert_plane+0x71/0xbb
[3.764451] Call Trace:
[3.766888]  intel_atomic_commit_tail+0xa97/0xb77
[3.771569]  intel_atomic_commit+0x26a/0x279
[3.771572]  drm_atomic_helper_set_config+0x5c/0x76
[3.780670]  __drm_mode_set_config_internal+0x66/0x109
[3.780672]  drm_mode_setcrtc+0x4c9/0x5cc
[3.780674]  ? drm_mode_getcrtc+0x162/0x162
[3.789774]  ? drm_mode_getcrtc+0x162/0x162
[3.798108]  drm_ioctl_kernel+0x8d/0xe4
[3.801926]  drm_ioctl+0x27d/0x368
[3.805311]  ? drm_mode_getcrtc+0x162/0x162
[3.805314]  ? selinux_file_ioctl+0x14e/0x199
[3.805317]  vfs_ioctl+0x21/0x2f
[3.813812]  do_vfs_ioctl+0x491/0x4b4
[3.813813]  ? security_file_ioctl+0x37/0x4b
[3.813816]  ksys_ioctl+0x55/0x75
[3.820672]  __x64_sys_ioctl+0x1a/0x1e
[3.820674]  do_syscall_64+0x51/0x5f
[3.820678]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[3.828221] RIP: 0033:0x7b5e04953967
[3.835504] RSP: 002b:7fff2eafb6f8 EFLAGS: 0246 ORIG_RAX: 
0010
[3.835505] RAX: ffda RBX: 0002 RCX: 7b5e04953967
[3.835505] RDX: 7fff2eafb730 RSI: c06864a2 RDI: 000f
[3.835506] RBP: 7fff2eafb720 R08:  R09: 
[3.835507] R10: 0070 R11: 0246 R12: 000f
[3.879988] R13: 56bc9dd7d210 R14: 7fff2eafb730 R15: c06864a2
[3.887081] Code: 48 c7 c7 06 71 a5 be 84 c0 48 c7 c2 06 fd a3 be 48 89 f9 
48 0f 44 ca 84 db 48 0f 45 d7 48 c7 c7 df d3 a4 be 31 c0 e8 af a0 c0 ff <0f> 0b 
eb 2b 48 c7 c7 06 fd a3 be 84 c0 48 c7 c2 06 71 a5 be 48
[3.905845] WARNING: CPU: 2 PID: 354 at 
drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb
[3.920964] ---[ end trace dac692f4ac46391a ]---

The warning is seen when mode_setcrtc() is called for pipeB
during bootup and before we get a mode_setcrtc() for pipeA,
while doing update_crtcs() in intel_atomic_commit_tail().
Now since, plane1A is still active after commit, update_crtcs()
is done for pipeA and eventually update_plane() for plane1A.

intel_plane_state->ctl for plane1A is not updated since set_modecrtc() is
called for pipeB. So intel_plane_state->ctl for plane 1A will be 0x0.
So doing an update_plane() for plane1A, will result in clearing
PLANE_CTL_ENABLE bit, and hence the warning.

To fix this warning, force all active planes to recompute their states
in probe.

Changes in v8:
- Actually add Reviewed-by: Ville Syrjälä 

Changes in v7:
- Move call to intel_initial_commit() after sanitize_watermarks()
  Otherwise the plane update will still consult potentially bogus
  watermarks we read out from the hardware. (Ville)
- Carry Reviewed-by: Ville Syrjälä 
  from v6

Changes in v6:
- Handle EDEADLK for drm_atomic_get_crtc_state() and
  drm_atomic_add_affected_planes()
- Remove optimization of calling intel_initial_commit()
  only when there is more than one active pipe in probe.
- Avoid using intel_ types.

Changes in v5:
- Drop drm_modeset_lock_all_ctx() since locks will be taken later.

Changes in v4:
- Handle locking in intel_initial_commit()
- Move the for loop inside intel_initial_commit() so that
  drm_atomic_commit() is called only once
- Call intel_initial_commit() only for more than one active crtc on boot.
- Save the return value of intel_initial_commit() and print a message in
  case of an error

Changes in v3:
- Add comments

Changes in v2:
- Force all planes to recompute their states.(Ville Syrjälä)
- Update the commit message

Signed-off-by: Azhar Shaikh 
Reviewed-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/intel_display.c | 61 ++--
 1 file changed, 59 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index 56818a45181c..1a3850df7ed3 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15092,12 +15092,61 @@ static void intel_update_fdi_pll_freq(struct 
drm_i915_private *dev_priv)
DRM_DEBUG_DRIVER("FDI PLL freq=%d\n", dev_priv->fdi_pll_freq);
 }
 
+static int intel_in

Re: [Intel-gfx] [PATCH v7] drm/i915: Fix assert_plane() warning on bootup with external display

2018-07-06 Thread Shaikh, Azhar


>-Original Message-
>From: Shaikh, Azhar
>Sent: Friday, July 6, 2018 11:28 AM
>To: intel-gfx@lists.freedesktop.org
>Cc: ville.syrj...@linux.intel.com; Navare, Manasi D
>; Shaikh, Azhar 
>Subject: [PATCH v7] drm/i915: Fix assert_plane() warning on bootup with
>external display
>
>On KBL, WHL RVPs, booting up with an external display connected, triggers
>below warning, when the BiOS brings up the external display too.
>This warning is not seen during hotplug.
>
>[3.615226] [ cut here ]
>[3.619829] plane 1A assertion failure (expected on, current off)
>[3.632039] WARNING: CPU: 2 PID: 354 at
>drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb
>[3.633920] iwlwifi :00:14.3: loaded firmware version 38.c0e03d94.0
>op_mode iwlmvm
>[3.647157] Modules linked in: iwlwifi cfg80211 btusb btrtl btbcm btintel
>bluetooth ecdh_generic
>[3.647163] CPU: 2 PID: 354 Comm: frecon Not tainted 4.17.0-rc7-50176-
>g655af12d39c2 #3
>[3.647165] Hardware name: Intel Corporation CoffeeLake Client
>Platform/WhiskeyLake U DDR4 ERB, BIOS
>CNLSFWR1.R00.X140.B00.1804040304 04/04/2018
>[3.684509] RIP: 0010:assert_plane+0x71/0xbb
>[3.764451] Call Trace:
>[3.766888]  intel_atomic_commit_tail+0xa97/0xb77
>[3.771569]  intel_atomic_commit+0x26a/0x279
>[3.771572]  drm_atomic_helper_set_config+0x5c/0x76
>[3.780670]  __drm_mode_set_config_internal+0x66/0x109
>[3.780672]  drm_mode_setcrtc+0x4c9/0x5cc
>[3.780674]  ? drm_mode_getcrtc+0x162/0x162
>[3.789774]  ? drm_mode_getcrtc+0x162/0x162
>[3.798108]  drm_ioctl_kernel+0x8d/0xe4
>[3.801926]  drm_ioctl+0x27d/0x368
>[3.805311]  ? drm_mode_getcrtc+0x162/0x162
>[3.805314]  ? selinux_file_ioctl+0x14e/0x199
>[3.805317]  vfs_ioctl+0x21/0x2f
>[3.813812]  do_vfs_ioctl+0x491/0x4b4
>[3.813813]  ? security_file_ioctl+0x37/0x4b
>[3.813816]  ksys_ioctl+0x55/0x75
>[3.820672]  __x64_sys_ioctl+0x1a/0x1e
>[3.820674]  do_syscall_64+0x51/0x5f
>[3.820678]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
>[3.828221] RIP: 0033:0x7b5e04953967
>[3.835504] RSP: 002b:7fff2eafb6f8 EFLAGS: 0246 ORIG_RAX:
>0010
>[3.835505] RAX: ffda RBX: 0002 RCX:
>7b5e04953967
>[3.835505] RDX: 7fff2eafb730 RSI: c06864a2 RDI:
>000f
>[3.835506] RBP: 7fff2eafb720 R08:  R09:
>
>[3.835507] R10: 0070 R11: 0246 R12:
>000f
>[3.879988] R13: 56bc9dd7d210 R14: 7fff2eafb730 R15:
>c06864a2
>[3.887081] Code: 48 c7 c7 06 71 a5 be 84 c0 48 c7 c2 06 fd a3 be 48 89 f9 
>48 0f
>44 ca 84 db 48 0f 45 d7 48 c7 c7 df d3 a4 be 31 c0 e8 af a0 c0 ff <0f> 0b eb 
>2b 48
>c7 c7 06 fd a3 be 84 c0 48 c7 c2 06 71 a5 be 48
>[3.905845] WARNING: CPU: 2 PID: 354 at
>drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb
>[3.920964] ---[ end trace dac692f4ac46391a ]---
>
>The warning is seen when mode_setcrtc() is called for pipeB during bootup
>and before we get a mode_setcrtc() for pipeA, while doing update_crtcs() in
>intel_atomic_commit_tail().
>Now since, plane1A is still active after commit, update_crtcs() is done for
>pipeA and eventually update_plane() for plane1A.
>
>intel_plane_state->ctl for plane1A is not updated since set_modecrtc() is
>called for pipeB. So intel_plane_state->ctl for plane 1A will be 0x0.
>So doing an update_plane() for plane1A, will result in clearing
>PLANE_CTL_ENABLE bit, and hence the warning.
>
>To fix this warning, force all active planes to recompute their states in 
>probe.
>
>Changes in v7:
>- Move call to intel_initial_commit() after sanitize_watermarks()
>  Otherwise the plane update will still consult potentially bogus
>  watermarks we read out from the hardware. (Ville)
>- Carry Reviewed-by: Ville Syrjälä 
>  from v6
>
>Changes in v6:
>- Handle EDEADLK for drm_atomic_get_crtc_state() and
>  drm_atomic_add_affected_planes()
>- Remove optimization of calling intel_initial_commit()
>  only when there is more than one active pipe in probe.
>- Avoid using intel_ types.
>
>Changes in v5:
>- Drop drm_modeset_lock_all_ctx() since locks will be taken later.
>
>Changes in v4:
>- Handle locking in intel_initial_commit()
>- Move the for loop inside intel_initial_commit() so that
>  drm_atomic_commit() is called only once
>- Call intel_initial_commit() only for more than one active crtc on boot.
>- Save the return value of intel_initial_commit() and print a message in
>  case of an error
>
>Changes in v3:
>- Add comments
>
>Changes in v2:
>- Force all planes to recompute their states.(Ville Syrjälä)
>- Update the commit message
>
>Signed-off-by: Azhar Shaikh 

Forgot adding Reviewed-by..

Please ignore this patch.

>---
> drivers/gpu/drm/i915/intel_display.c | 61
>++--
> 1 file changed, 59 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/intel_display

[Intel-gfx] [PATCH v7] drm/i915: Fix assert_plane() warning on bootup with external display

2018-07-06 Thread Azhar Shaikh
On KBL, WHL RVPs, booting up with an external display connected, triggers
below warning, when the BiOS brings up the external display too.
This warning is not seen during hotplug.

[3.615226] [ cut here ]
[3.619829] plane 1A assertion failure (expected on, current off)
[3.632039] WARNING: CPU: 2 PID: 354 at 
drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb
[3.633920] iwlwifi :00:14.3: loaded firmware version 38.c0e03d94.0 
op_mode iwlmvm
[3.647157] Modules linked in: iwlwifi cfg80211 btusb btrtl btbcm btintel 
bluetooth ecdh_generic
[3.647163] CPU: 2 PID: 354 Comm: frecon Not tainted 
4.17.0-rc7-50176-g655af12d39c2 #3
[3.647165] Hardware name: Intel Corporation CoffeeLake Client 
Platform/WhiskeyLake U DDR4 ERB, BIOS CNLSFWR1.R00.X140.B00.1804040304 
04/04/2018
[3.684509] RIP: 0010:assert_plane+0x71/0xbb
[3.764451] Call Trace:
[3.766888]  intel_atomic_commit_tail+0xa97/0xb77
[3.771569]  intel_atomic_commit+0x26a/0x279
[3.771572]  drm_atomic_helper_set_config+0x5c/0x76
[3.780670]  __drm_mode_set_config_internal+0x66/0x109
[3.780672]  drm_mode_setcrtc+0x4c9/0x5cc
[3.780674]  ? drm_mode_getcrtc+0x162/0x162
[3.789774]  ? drm_mode_getcrtc+0x162/0x162
[3.798108]  drm_ioctl_kernel+0x8d/0xe4
[3.801926]  drm_ioctl+0x27d/0x368
[3.805311]  ? drm_mode_getcrtc+0x162/0x162
[3.805314]  ? selinux_file_ioctl+0x14e/0x199
[3.805317]  vfs_ioctl+0x21/0x2f
[3.813812]  do_vfs_ioctl+0x491/0x4b4
[3.813813]  ? security_file_ioctl+0x37/0x4b
[3.813816]  ksys_ioctl+0x55/0x75
[3.820672]  __x64_sys_ioctl+0x1a/0x1e
[3.820674]  do_syscall_64+0x51/0x5f
[3.820678]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[3.828221] RIP: 0033:0x7b5e04953967
[3.835504] RSP: 002b:7fff2eafb6f8 EFLAGS: 0246 ORIG_RAX: 
0010
[3.835505] RAX: ffda RBX: 0002 RCX: 7b5e04953967
[3.835505] RDX: 7fff2eafb730 RSI: c06864a2 RDI: 000f
[3.835506] RBP: 7fff2eafb720 R08:  R09: 
[3.835507] R10: 0070 R11: 0246 R12: 000f
[3.879988] R13: 56bc9dd7d210 R14: 7fff2eafb730 R15: c06864a2
[3.887081] Code: 48 c7 c7 06 71 a5 be 84 c0 48 c7 c2 06 fd a3 be 48 89 f9 
48 0f 44 ca 84 db 48 0f 45 d7 48 c7 c7 df d3 a4 be 31 c0 e8 af a0 c0 ff <0f> 0b 
eb 2b 48 c7 c7 06 fd a3 be 84 c0 48 c7 c2 06 71 a5 be 48
[3.905845] WARNING: CPU: 2 PID: 354 at 
drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb
[3.920964] ---[ end trace dac692f4ac46391a ]---

The warning is seen when mode_setcrtc() is called for pipeB
during bootup and before we get a mode_setcrtc() for pipeA,
while doing update_crtcs() in intel_atomic_commit_tail().
Now since, plane1A is still active after commit, update_crtcs()
is done for pipeA and eventually update_plane() for plane1A.

intel_plane_state->ctl for plane1A is not updated since set_modecrtc() is
called for pipeB. So intel_plane_state->ctl for plane 1A will be 0x0.
So doing an update_plane() for plane1A, will result in clearing
PLANE_CTL_ENABLE bit, and hence the warning.

To fix this warning, force all active planes to recompute their states
in probe.

Changes in v7:
- Move call to intel_initial_commit() after sanitize_watermarks()
  Otherwise the plane update will still consult potentially bogus
  watermarks we read out from the hardware. (Ville)
- Carry Reviewed-by: Ville Syrjälä 
  from v6

Changes in v6:
- Handle EDEADLK for drm_atomic_get_crtc_state() and
  drm_atomic_add_affected_planes()
- Remove optimization of calling intel_initial_commit()
  only when there is more than one active pipe in probe.
- Avoid using intel_ types.

Changes in v5:
- Drop drm_modeset_lock_all_ctx() since locks will be taken later.

Changes in v4:
- Handle locking in intel_initial_commit()
- Move the for loop inside intel_initial_commit() so that
  drm_atomic_commit() is called only once
- Call intel_initial_commit() only for more than one active crtc on boot.
- Save the return value of intel_initial_commit() and print a message in
  case of an error

Changes in v3:
- Add comments

Changes in v2:
- Force all planes to recompute their states.(Ville Syrjälä)
- Update the commit message

Signed-off-by: Azhar Shaikh 
---
 drivers/gpu/drm/i915/intel_display.c | 61 ++--
 1 file changed, 59 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index 56818a45181c..1a3850df7ed3 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15092,12 +15092,61 @@ static void intel_update_fdi_pll_freq(struct 
drm_i915_private *dev_priv)
DRM_DEBUG_DRIVER("FDI PLL freq=%d\n", dev_priv->fdi_pll_freq);
 }
 
+static int intel_initial_commit(struct drm_device *dev)
+{
+   struct drm_atomic_state *state = NULL;

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/selftests: Provide full mb() around clflush

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915/selftests: Provide full mb() around clflush
URL   : https://patchwork.freedesktop.org/series/46085/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4448 -> Patchwork_9574 =

== Summary - SUCCESS ==

  No regressions found.

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

== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@debugfs_test@read_all_entries:
  fi-snb-2520m:   PASS -> INCOMPLETE (fdo#103713)

igt@gem_exec_suspend@basic-s4-devices:
  fi-kbl-7500u:   PASS -> DMESG-WARN (fdo#105128, fdo#107139)

igt@kms_chamelium@hdmi-hpd-fast:
  fi-kbl-7500u:   SKIP -> FAIL (fdo#102672, fdo#103841)

igt@kms_frontbuffer_tracking@basic:
  fi-skl-guc: NOTRUN -> FAIL (fdo#103167)

igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
  fi-bxt-dsi: PASS -> INCOMPLETE (fdo#103927)


 Possible fixes 

igt@kms_flip@basic-flip-vs-dpms:
  fi-skl-6700hq:  DMESG-WARN (fdo#105998) -> PASS

igt@kms_frontbuffer_tracking@basic:
  fi-hsw-peppy:   DMESG-FAIL (fdo#102614, fdo#106103) -> PASS


  fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
  fdo#102672 https://bugs.freedesktop.org/show_bug.cgi?id=102672
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
  fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
  fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
  fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103
  fdo#107139 https://bugs.freedesktop.org/show_bug.cgi?id=107139


== Participating hosts (46 -> 42) ==

  Additional (1): fi-skl-guc 
  Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 
fi-hsw-4200u 


== Build changes ==

* Linux: CI_DRM_4448 -> Patchwork_9574

  CI_DRM_4448: e094950bd5b5767bab1d2a5c259635dc6091f8cc @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4543: 366eed37c7c71217e1cb1f3be5e26358a41f0001 @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9574: cdfe0eb01ba9e72cddeb359438167509754b2403 @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

cdfe0eb01ba9 drm/i915/selftests: Provide full mb() around clflush

== Logs ==

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


Re: [Intel-gfx] [PATCH v6] drm/i915: Fix assert_plane() warning on bootup with external display

2018-07-06 Thread Ville Syrjälä
On Tue, Jul 03, 2018 at 01:21:02PM -0700, Azhar Shaikh wrote:
> On KBL, WHL RVPs, booting up with an external display connected, triggers
> below warning, when the BiOS brings up the external display too.
> This warning is not seen during hotplug.
> 
> [3.615226] [ cut here ]
> [3.619829] plane 1A assertion failure (expected on, current off)
> [3.632039] WARNING: CPU: 2 PID: 354 at 
> drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb
> [3.633920] iwlwifi :00:14.3: loaded firmware version 38.c0e03d94.0 
> op_mode iwlmvm
> [3.647157] Modules linked in: iwlwifi cfg80211 btusb btrtl btbcm btintel 
> bluetooth ecdh_generic
> [3.647163] CPU: 2 PID: 354 Comm: frecon Not tainted 
> 4.17.0-rc7-50176-g655af12d39c2 #3
> [3.647165] Hardware name: Intel Corporation CoffeeLake Client 
> Platform/WhiskeyLake U DDR4 ERB, BIOS CNLSFWR1.R00.X140.B00.1804040304 
> 04/04/2018
> [3.684509] RIP: 0010:assert_plane+0x71/0xbb
> [3.764451] Call Trace:
> [3.766888]  intel_atomic_commit_tail+0xa97/0xb77
> [3.771569]  intel_atomic_commit+0x26a/0x279
> [3.771572]  drm_atomic_helper_set_config+0x5c/0x76
> [3.780670]  __drm_mode_set_config_internal+0x66/0x109
> [3.780672]  drm_mode_setcrtc+0x4c9/0x5cc
> [3.780674]  ? drm_mode_getcrtc+0x162/0x162
> [3.789774]  ? drm_mode_getcrtc+0x162/0x162
> [3.798108]  drm_ioctl_kernel+0x8d/0xe4
> [3.801926]  drm_ioctl+0x27d/0x368
> [3.805311]  ? drm_mode_getcrtc+0x162/0x162
> [3.805314]  ? selinux_file_ioctl+0x14e/0x199
> [3.805317]  vfs_ioctl+0x21/0x2f
> [3.813812]  do_vfs_ioctl+0x491/0x4b4
> [3.813813]  ? security_file_ioctl+0x37/0x4b
> [3.813816]  ksys_ioctl+0x55/0x75
> [3.820672]  __x64_sys_ioctl+0x1a/0x1e
> [3.820674]  do_syscall_64+0x51/0x5f
> [3.820678]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
> [3.828221] RIP: 0033:0x7b5e04953967
> [3.835504] RSP: 002b:7fff2eafb6f8 EFLAGS: 0246 ORIG_RAX: 
> 0010
> [3.835505] RAX: ffda RBX: 0002 RCX: 
> 7b5e04953967
> [3.835505] RDX: 7fff2eafb730 RSI: c06864a2 RDI: 
> 000f
> [3.835506] RBP: 7fff2eafb720 R08:  R09: 
> 
> [3.835507] R10: 0070 R11: 0246 R12: 
> 000f
> [3.879988] R13: 56bc9dd7d210 R14: 7fff2eafb730 R15: 
> c06864a2
> [3.887081] Code: 48 c7 c7 06 71 a5 be 84 c0 48 c7 c2 06 fd a3 be 48 89 f9 
> 48 0f 44 ca 84 db 48 0f 45 d7 48 c7 c7 df d3 a4 be 31 c0 e8 af a0 c0 ff <0f> 
> 0b eb 2b 48 c7 c7 06 fd a3 be 84 c0 48 c7 c2 06 71 a5 be 48
> [3.905845] WARNING: CPU: 2 PID: 354 at 
> drivers/gpu/drm/i915/intel_display.c:1294 assert_plane+0x71/0xbb
> [3.920964] ---[ end trace dac692f4ac46391a ]---
> 
> The warning is seen when mode_setcrtc() is called for pipeB
> during bootup and before we get a mode_setcrtc() for pipeA,
> while doing update_crtcs() in intel_atomic_commit_tail().
> Now since, plane1A is still active after commit, update_crtcs()
> is done for pipeA and eventually update_plane() for plane1A.
> 
> intel_plane_state->ctl for plane1A is not updated since set_modecrtc() is
> called for pipeB. So intel_plane_state->ctl for plane 1A will be 0x0.
> So doing an update_plane() for plane1A, will result in clearing
> PLANE_CTL_ENABLE bit, and hence the warning.
> 
> To fix this warning, force all active planes to recompute their states
> in probe.
> 
> Changes in v6:
> - Handle EDEADLK for drm_atomic_get_crtc_state() and
>   drm_atomic_add_affected_planes()
> - Remove optimization of calling intel_initial_commit()
>   only when there is more than one active pipe in probe.
> - Avoid using intel_ types.
> 
> Changes in v5:
> - Drop drm_modeset_lock_all_ctx() since locks will be taken later.
> 
> Changes in v4:
> - Handle locking in intel_initial_commit()
> - Move the for loop inside intel_initial_commit() so that
>   drm_atomic_commit() is called only once
> - Call intel_initial_commit() only for more than one active crtc on boot.
> - Save the return value of intel_initial_commit() and print a message in
>   case of an error
> 
> Changes in v3:
> - Add comments
> 
> Changes in v2:
> - Force all planes to recompute their states.(Ville Syrjälä)
> - Update the commit message
> 
> Signed-off-by: Azhar Shaikh 
> ---
>  drivers/gpu/drm/i915/intel_display.c | 61 
> ++--
>  1 file changed, 59 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c 
> b/drivers/gpu/drm/i915/intel_display.c
> index 56818a45181c..d27b63fe2fc0 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -15092,12 +15092,61 @@ static void intel_update_fdi_pll_freq(struct 
> drm_i915_private *dev_priv)
>   DRM_DEBUG_DRIVER("FDI PLL freq=%d\n", dev_priv->fdi_pll_freq);
>  }
>  
> +static int intel_initial_commit(struct drm_device *dev)
> +{

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: Provide full mb() around clflush

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915/selftests: Provide full mb() around clflush
URL   : https://patchwork.freedesktop.org/series/46085/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
cdfe0eb01ba9 drm/i915/selftests: Provide full mb() around clflush
-:24: WARNING:MEMORY_BARRIER: memory barrier without comment
#24: FILE: drivers/gpu/drm/i915/selftests/i915_gem_coherency.c:47:
+   mb();

-:26: WARNING:MEMORY_BARRIER: memory barrier without comment
#26: FILE: drivers/gpu/drm/i915/selftests/i915_gem_coherency.c:49:
+   mb();

-:33: WARNING:MEMORY_BARRIER: memory barrier without comment
#33: FILE: drivers/gpu/drm/i915/selftests/i915_gem_coherency.c:55:
+   mb();

-:35: WARNING:MEMORY_BARRIER: memory barrier without comment
#35: FILE: drivers/gpu/drm/i915/selftests/i915_gem_coherency.c:57:
+   mb();

-:48: WARNING:MEMORY_BARRIER: memory barrier without comment
#48: FILE: drivers/gpu/drm/i915/selftests/i915_gem_coherency.c:83:
+   mb();

-:50: WARNING:MEMORY_BARRIER: memory barrier without comment
#50: FILE: drivers/gpu/drm/i915/selftests/i915_gem_coherency.c:85:
+   mb();

total: 0 errors, 6 warnings, 0 checks, 37 lines checked

___
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/selftests: Adjust y-tiling height for older machines

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915/selftests: Adjust y-tiling height for older machines
URL   : https://patchwork.freedesktop.org/series/46084/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4448 -> Patchwork_9573 =

== Summary - SUCCESS ==

  No regressions found.

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

== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@kms_frontbuffer_tracking@basic:
  fi-skl-guc: NOTRUN -> FAIL (fdo#103167)


 Possible fixes 

igt@kms_flip@basic-flip-vs-dpms:
  fi-skl-6700hq:  DMESG-WARN (fdo#105998) -> PASS

igt@kms_frontbuffer_tracking@basic:
  fi-hsw-peppy:   DMESG-FAIL (fdo#106103, fdo#102614) -> PASS


  fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
  fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103


== Participating hosts (46 -> 42) ==

  Additional (1): fi-skl-guc 
  Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 
fi-hsw-4200u 


== Build changes ==

* Linux: CI_DRM_4448 -> Patchwork_9573

  CI_DRM_4448: e094950bd5b5767bab1d2a5c259635dc6091f8cc @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4543: 366eed37c7c71217e1cb1f3be5e26358a41f0001 @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9573: f10fe0a76a017d916a200eab03aa5a18c46cde4c @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

f10fe0a76a01 drm/i915/selftests: Adjust y-tiling height for older machines

== Logs ==

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


[Intel-gfx] [PATCH] drm/i915/selftests: Provide full mb() around clflush

2018-07-06 Thread Chris Wilson
clflush is an unserialised instruction and the IA manual strongly advises
you to serialise it with a mb. To be cautious, apply one before and one
after, so that it is serialised with both writes and reads without
worrying too much about the required direction.

Signed-off-by: Chris Wilson 
---
 .../drm/i915/selftests/i915_gem_coherency.c   | 21 ---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c 
b/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
index 294c58aba2c1..df44c302a9fe 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
@@ -42,11 +42,21 @@ static int cpu_set(struct drm_i915_gem_object *obj,
 
page = i915_gem_object_get_page(obj, offset >> PAGE_SHIFT);
map = kmap_atomic(page);
-   if (needs_clflush & CLFLUSH_BEFORE)
+
+   if (needs_clflush & CLFLUSH_BEFORE) {
+   mb();
clflush(map+offset_in_page(offset) / sizeof(*map));
+   mb();
+   }
+
map[offset_in_page(offset) / sizeof(*map)] = v;
-   if (needs_clflush & CLFLUSH_AFTER)
+
+   if (needs_clflush & CLFLUSH_AFTER) {
+   mb();
clflush(map+offset_in_page(offset) / sizeof(*map));
+   mb();
+   }
+
kunmap_atomic(map);
 
i915_gem_obj_finish_shmem_access(obj);
@@ -68,8 +78,13 @@ static int cpu_get(struct drm_i915_gem_object *obj,
 
page = i915_gem_object_get_page(obj, offset >> PAGE_SHIFT);
map = kmap_atomic(page);
-   if (needs_clflush & CLFLUSH_BEFORE)
+
+   if (needs_clflush & CLFLUSH_BEFORE) {
+   mb();
clflush(map+offset_in_page(offset) / sizeof(*map));
+   mb();
+   }
+
*v = map[offset_in_page(offset) / sizeof(*map)];
kunmap_atomic(map);
 
-- 
2.18.0

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


Re: [Intel-gfx] [BUG] i915 HDMI connector status is connected after disconnection

2018-07-06 Thread Guang Bai
On Fri, 6 Jul 2018 14:44:58 +0800
Chris Chiu  wrote:

> On Thu, Jul 5, 2018 at 10:40 PM, Ville Syrjälä
>  wrote:
> > On Thu, Jul 05, 2018 at 03:58:36PM +0800, Chris Chiu wrote:  
> >> Hi,
> >> We have few ASUS laptops X705FD (The new WiskyLake), X560UD
> >> (intel i5-8250U), X530UN (intel i7-8550U) share the same problem,
> >> which is the HDMI connector status stays connected even the HDMI
> >> cable has been unplugged. Look into the
> >> "/sys/class/drm/card0-HDMI-A-1/status" for checking the status
> >> while plug/unplug the HDMI, it shows "disconnected" before plug in
> >> HDMI cable, then switch to "connected" after plugin, and still
> >> stay "connected" after unplug. This would cause the audio output
> >> path cannot correctly switch from HDMI to internal speaker after
> >> unplugging the HDMI.
> >>
> >> I then try to verify with the latest kernel 4.18.0-rc3+, the bug
> >> still present. The full "dmesg" log is here.
> >> https://gist.github.com/mschiu77/d761d7c5cf191b7868d4d7788ae087f1
> >>
> >> The HDMI cable is plugged in at ~26th second.
> >> "[ 26.214371] [drm:drm_detect_monitor_audio [drm]] Monitor has
> >> basic audio support"
> >> then unplug the HDMI at ~73th second.
> >> "[ 73.328361] [drm:drm_detect_monitor_audio [drm]] Monitor has
> >> basic audio support"
> >>
> >> Please advise what I can do to fix this. Thanks  
> >
> > Pull the cable out faster?
> >
> > I presume this is the same old case of hpd disconnecting slightly
> > before ddc and we still manage to read the EDID when processing
> > the hpd irq. We kinda tried to fix that with the live status
> > check but that thing failed spectacularly.
> >
> > --
> > Ville Syrjälä
> > Intel  
> 
> Thanks for the suggestion. I tried pulling the cable out faster, the
> status shows correctly. I also tried branch drm-tip of
> https://cgit.freedesktop.org/drm/drm-tip
> but the symptom persists.
> 
> Anything I can help here? Or any old commit/patch I can try to do some
> experiments?
> 
> Chris
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

I'm working on a same issue with HP KBL ThinPro laptop where both

kernel 4.9.79 & 4.15.7 are failing the same way:
- Unplug the HDMI cable slowly the connector status is still
  "connected"

Debugging shows from kernel 4.9 and up to 4.18 drim/i915 behaves the
same way:
- When the HDMI calbe is unplugged, there is a transition time when
  the DDC lines are still connected and i915 can read back the EDID
  and honors "connected" state

This problem does not happen on Windows7 & Windows 10 on the same
failing platform - Windows KMD does *not* read the DDC when seeing the
corresponding PCH/HPD pins indicating "disconnected" within 300ms-400ms
period - This checking is done during bottom-half interrupt routines

I worked patches with both 4.15.7 and 4.17.1 intercepting this Windows
KMD logics; It seems these patches work for HP KBL ThinPro laptop - My
patches are being tested by HP team - I was just about to post the open
discussion on this topic to collect inputs from our community
- Do we have to refactor the HDMI hot-plug handling codes to cope with
  this long standing issue?
- Is that OK to add 300ms-500ms delay "msleep(100)" in a loop in the
  bottom half of interrupt routines?

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


[Intel-gfx] [PATCH] drm/i915/selftests: Adjust y-tiling height for older machines

2018-07-06 Thread Chris Wilson
Older machines do not have the 128-byte tile width format for
I915_TILING_Y and so we must adapt our reference swizzle.

Testcase: igt/drv_selftest/live_objects #gdg
Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/i915/selftests/i915_gem_object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_object.c 
b/drivers/gpu/drm/i915/selftests/i915_gem_object.c
index 6fe71865b710..8a35d2f70671 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_object.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_object.c
@@ -171,7 +171,7 @@ static u64 tiled_offset(const struct tile *tile, u64 v)
v += x;
} else {
const unsigned int ytile_span = 16;
-   const unsigned int ytile_height = 32 * ytile_span;
+   const unsigned int ytile_height = tile->height * ytile_span;
 
v += y * ytile_span;
v += div64_u64_rem(x, ytile_span, &x) * ytile_height;
-- 
2.18.0

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


Re: [Intel-gfx] [PATCH 2/8] drm/i915: Introduce intel_encoder_is_dig_port()

2018-07-06 Thread Rodrigo Vivi
On Thu, Jul 05, 2018 at 07:43:51PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä 
> 
> Add intel_encoder_is_dig_port() to match intel_encoder_is_dp().
> 
> Signed-off-by: Ville Syrjälä 

Reviewed-by: Rodrigo Vivi 

> ---
>  drivers/gpu/drm/i915/intel_drv.h | 24 +++-
>  1 file changed, 15 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_drv.h 
> b/drivers/gpu/drm/i915/intel_drv.h
> index 6fe3adafaf20..077189ed9e46 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1246,23 +1246,29 @@ intel_attached_encoder(struct drm_connector 
> *connector)
>   return to_intel_connector(connector)->encoder;
>  }
>  
> -static inline struct intel_digital_port *
> -enc_to_dig_port(struct drm_encoder *encoder)
> +static inline bool intel_encoder_is_dig_port(struct intel_encoder *encoder)
>  {
> - struct intel_encoder *intel_encoder = to_intel_encoder(encoder);
> -
> - switch (intel_encoder->type) {
> + switch (encoder->type) {
>   case INTEL_OUTPUT_DDI:
> - WARN_ON(!HAS_DDI(to_i915(encoder->dev)));
> - /* fall through */
>   case INTEL_OUTPUT_DP:
>   case INTEL_OUTPUT_EDP:
>   case INTEL_OUTPUT_HDMI:
> + return true;
> + default:
> + return false;
> + }
> +}
> +
> +static inline struct intel_digital_port *
> +enc_to_dig_port(struct drm_encoder *encoder)
> +{
> + struct intel_encoder *intel_encoder = to_intel_encoder(encoder);
> +
> + if (intel_encoder_is_dig_port(intel_encoder))
>   return container_of(encoder, struct intel_digital_port,
>   base.base);
> - default:
> + else
>   return NULL;
> - }
>  }
>  
>  static inline struct intel_dp_mst_encoder *
> -- 
> 2.16.4
> 
> ___
> 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


Re: [Intel-gfx] [PATCH 3/8] drm/i915: Rewrite mst suspend/resume in terms of encoders

2018-07-06 Thread Rodrigo Vivi
On Fri, Jul 06, 2018 at 01:42:35PM +0300, Ville Syrjälä wrote:
> On Thu, Jul 05, 2018 at 02:29:59PM -0700, Rodrigo Vivi wrote:
> > On Thu, Jul 05, 2018 at 07:43:52PM +0300, Ville Syrjala wrote:
> > > From: Ville Syrjälä 
> > > 
> > > Rather than looping over all the ports and picking the encoder based on
> > > the port, let's just loop over all the encoders instead. Gets rid of
> > > some irq_port[] usage, which is a bit of an eye sore.
> > > 
> > > Signed-off-by: Ville Syrjälä 
> > > ---
> > >  drivers/gpu/drm/i915/i915_drv.c  |  4 ++--
> > >  drivers/gpu/drm/i915/intel_dp.c  | 41 
> > > +++-
> > >  drivers/gpu/drm/i915/intel_drv.h |  4 ++--
> > >  3 files changed, 28 insertions(+), 21 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/i915_drv.c 
> > > b/drivers/gpu/drm/i915/i915_drv.c
> > > index 0db3c83cce29..1f2449d9206d 100644
> > > --- a/drivers/gpu/drm/i915/i915_drv.c
> > > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > > @@ -1577,7 +1577,7 @@ static int i915_drm_suspend(struct drm_device *dev)
> > >  
> > >   intel_display_suspend(dev);
> > >  
> > > - intel_dp_mst_suspend(dev);
> > > + intel_dp_mst_suspend(dev_priv);
> > >  
> > >   intel_runtime_pm_disable_interrupts(dev_priv);
> > >   intel_hpd_cancel_work(dev_priv);
> > > @@ -1742,7 +1742,7 @@ static int i915_drm_resume(struct drm_device *dev)
> > >   dev_priv->display.hpd_irq_setup(dev_priv);
> > >   spin_unlock_irq(&dev_priv->irq_lock);
> > >  
> > > - intel_dp_mst_resume(dev);
> > > + intel_dp_mst_resume(dev_priv);
> > >  
> > >   intel_display_resume(dev);
> > >  
> > > diff --git a/drivers/gpu/drm/i915/intel_dp.c 
> > > b/drivers/gpu/drm/i915/intel_dp.c
> > > index e95f1181e302..e9bc0f9f5e54 100644
> > > --- a/drivers/gpu/drm/i915/intel_dp.c
> > > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > > @@ -6490,37 +6490,44 @@ bool intel_dp_init(struct drm_i915_private 
> > > *dev_priv,
> > >   return false;
> > >  }
> > >  
> > > -void intel_dp_mst_suspend(struct drm_device *dev)
> > > +void intel_dp_mst_suspend(struct drm_i915_private *dev_priv)
> > >  {
> > > - struct drm_i915_private *dev_priv = to_i915(dev);
> > > - int i;
> > > + struct intel_encoder *encoder;
> > > +
> > > + for_each_intel_encoder(&dev_priv->drm, encoder) {
> > > + struct intel_dp *intel_dp;
> > > +
> > > + if (encoder->type != INTEL_OUTPUT_DDI)
> > 
> > INTEL_OUTPUT_DP not possible at this point?
> 
> No MST on pre-DDI platforms, and encoder->type for DDI platforms is
> either DDI or EDP but never DP.

Oh! indeed, thanks

Reviewed-by: Rodrigo Vivi 


> 
> > 
> > > + continue;
> > >  
> > > - /* disable MST */
> > > - for (i = 0; i < I915_MAX_PORTS; i++) {
> > > - struct intel_digital_port *intel_dig_port = 
> > > dev_priv->hotplug.irq_port[i];
> > > + intel_dp = enc_to_intel_dp(&encoder->base);
> > >  
> > > - if (!intel_dig_port || !intel_dig_port->dp.can_mst)
> > > + if (!intel_dp->can_mst)
> > >   continue;
> > >  
> > > - if (intel_dig_port->dp.is_mst)
> > > - 
> > > drm_dp_mst_topology_mgr_suspend(&intel_dig_port->dp.mst_mgr);
> > > + if (intel_dp->is_mst)
> > > + drm_dp_mst_topology_mgr_suspend(&intel_dp->mst_mgr);
> > >   }
> > >  }
> > >  
> > > -void intel_dp_mst_resume(struct drm_device *dev)
> > > +void intel_dp_mst_resume(struct drm_i915_private *dev_priv)
> > >  {
> > > - struct drm_i915_private *dev_priv = to_i915(dev);
> > > - int i;
> > > + struct intel_encoder *encoder;
> > >  
> > > - for (i = 0; i < I915_MAX_PORTS; i++) {
> > > - struct intel_digital_port *intel_dig_port = 
> > > dev_priv->hotplug.irq_port[i];
> > > + for_each_intel_encoder(&dev_priv->drm, encoder) {
> > > + struct intel_dp *intel_dp;
> > >   int ret;
> > >  
> > > - if (!intel_dig_port || !intel_dig_port->dp.can_mst)
> > > + if (encoder->type != INTEL_OUTPUT_DDI)
> > > + continue;
> > > +
> > > + intel_dp = enc_to_intel_dp(&encoder->base);
> > > +
> > > + if (!intel_dp->can_mst)
> > >   continue;
> > >  
> > > - ret = 
> > > drm_dp_mst_topology_mgr_resume(&intel_dig_port->dp.mst_mgr);
> > > + ret = drm_dp_mst_topology_mgr_resume(&intel_dp->mst_mgr);
> > >   if (ret)
> > > - intel_dp_check_mst_status(&intel_dig_port->dp);
> > > + intel_dp_check_mst_status(intel_dp);
> > >   }
> > >  }
> > > diff --git a/drivers/gpu/drm/i915/intel_drv.h 
> > > b/drivers/gpu/drm/i915/intel_drv.h
> > > index 077189ed9e46..dc11106b2081 100644
> > > --- a/drivers/gpu/drm/i915/intel_drv.h
> > > +++ b/drivers/gpu/drm/i915/intel_drv.h
> > > @@ -1700,8 +1700,8 @@ void intel_edp_backlight_off(const struct 
> > > drm_connector_state *conn_state);
> > >  void intel_edp_panel_vdd_on(struct intel_dp *intel_dp);
> > >  void intel_edp_panel_on(struct intel_dp *intel_dp);
> > >  void intel_edp_panel_off(struct 

Re: [Intel-gfx] [PATCH] drm/i915: Flush the WCB following a WC write

2018-07-06 Thread Rodrigo Vivi
On Fri, Jul 06, 2018 at 12:54:02PM +0100, Chris Wilson wrote:
> If we have just completed a WC write, we must ensure that the WCB (Write
> Combining Buffer) is flushed out to main memory before we can expect to
> see the results. This is especially important when mixing WC with GTT as
> the physical paths are different and cachelines are not naturally flushed.
> 
> Testcase: igt/drv_selftests/live_coherency #gdg
> Signed-off-by: Chris Wilson 

Reviewed-by: Rodrigo Vivi 

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 0c0a1a959d0b..be63e8bbb6d2 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -837,6 +837,10 @@ flush_write_domain(struct drm_i915_gem_object *obj, 
> unsigned int flush_domains)
>   }
>   break;
>  
> + case I915_GEM_DOMAIN_WC:
> + wmb();
> + break;
> +
>   case I915_GEM_DOMAIN_CPU:
>   i915_gem_clflush_object(obj, I915_CLFLUSH_SYNC);
>   break;
> -- 
> 2.18.0
> 
> ___
> 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.BAT: success for drm/i915/gen11: Preempt-to-idle support in execlists. (rev5)

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915/gen11: Preempt-to-idle support in execlists. (rev5)
URL   : https://patchwork.freedesktop.org/series/40747/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4446 -> Patchwork_9572 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: 
https://patchwork.freedesktop.org/api/1.0/series/40747/revisions/5/mbox/

== Known issues ==

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

  === IGT changes ===

 Warnings 

igt@gem_exec_suspend@basic-s4-devices:
  {fi-kbl-8809g}: DMESG-WARN (fdo#107139) -> INCOMPLETE (fdo#107139)


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

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


== Participating hosts (47 -> 41) ==

  Missing(6): fi-ilk-m540 fi-bxt-dsi fi-hsw-4200u fi-byt-squawks 
fi-bsw-cyan fi-ctg-p8600 


== Build changes ==

* Linux: CI_DRM_4446 -> Patchwork_9572

  CI_DRM_4446: 95944426a9ffda186843c78f2f925494e1bc53c5 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4543: 366eed37c7c71217e1cb1f3be5e26358a41f0001 @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9572: 90f487fed124443c7a8d557fa0e54dcbbcbb046e @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

90f487fed124 drm/i915/gen11: Preempt-to-idle support in execlists.

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9572/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/selftests: Skip over live context testing when wedged

2018-07-06 Thread Rodrigo Vivi
On Fri, Jul 06, 2018 at 07:42:00AM +0100, Chris Wilson wrote:
> Quoting Rodrigo Vivi (2018-07-05 21:52:10)
> > On Thu, Jul 05, 2018 at 03:58:45PM +0100, Chris Wilson wrote:
> > > If the GPU is terminally wedged we cannot submit any requests into a
> > > context, completely unfulfilling our purpose of doing so. As this
> > > expectedly fails, skip over the test.
> > > 
> > > Signed-off-by: Chris Wilson 
> > > ---
> > >  drivers/gpu/drm/i915/selftests/i915_gem_context.c | 3 +++
> > >  1 file changed, 3 insertions(+)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c 
> > > b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> > > index cc848ceeb3c3..0b36265a0f96 100644
> > > --- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> > > +++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> > > @@ -599,6 +599,9 @@ int i915_gem_context_live_selftests(struct 
> > > drm_i915_private *dev_priv)
> > >   bool fake_alias = false;
> > >   int err;
> > >  
> > > + if (i915_terminally_wedged(&dev_priv->gpu_error))
> > > + return 0;
> > > +
> > 
> > I wonder if this could mask a real failure under the skips?
> 
> The *test* can't be run, so what failure relevant to this *test* can be
> shown?
> 
> As you notice, when we get to the reset test, we do proclaim failure as
> we've already demonstrated reset is bust.

Makes sense...

I was going to add rv-b here for this and others, but
I saw you already got hem and is already pushing ;)

Also thanks for the explanation on -ENOTRECOVERABLE one..
that also makes sense.

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


[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/gen11: Preempt-to-idle support in execlists. (rev5)

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915/gen11: Preempt-to-idle support in execlists. (rev5)
URL   : https://patchwork.freedesktop.org/series/40747/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Commit: drm/i915/gen11: Preempt-to-idle support in execlists.
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3655:16: warning: expression 
using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3657:16: warning: expression 
using sizeof(void)

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


[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/gen11: Preempt-to-idle support in execlists. (rev5)

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915/gen11: Preempt-to-idle support in execlists. (rev5)
URL   : https://patchwork.freedesktop.org/series/40747/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
90f487fed124 drm/i915/gen11: Preempt-to-idle support in execlists.
-:141: CHECK:COMPARISON_TO_NULL: Comparison to NULL could be written 
"!execlists->ctrl_reg"
#141: FILE: drivers/gpu/drm/i915/intel_lrc.c:539:
+   GEM_BUG_ON(execlists->ctrl_reg == NULL);

-:210: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#210: FILE: drivers/gpu/drm/i915/intel_lrc.c:1045:
+   if ((status & GEN8_CTX_STATUS_IDLE_ACTIVE) &&
+(status & GEN11_CTX_STATUS_PREEMPT_IDLE)) {

-:211: CHECK:BRACES: Blank lines aren't necessary after an open brace '{'
#211: FILE: drivers/gpu/drm/i915/intel_lrc.c:1046:
+(status & GEN11_CTX_STATUS_PREEMPT_IDLE)) {
+

-:244: CHECK:SPACING: spaces preferred around that '*' (ctx:VxV)
#244: FILE: drivers/gpu/drm/i915/intel_lrc.c:1075:
+   buf[2*head + 1] == execlists->preempt_complete_status)) {
 ^

total: 0 errors, 0 warnings, 4 checks, 192 lines checked

___
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 [1/2] drm/i915/selftests: Replace magic 1<<22 with MI_USE_GGTT/MI_MEM_VIRTUAL

2018-07-06 Thread Patchwork
== Series Details ==

Series: series starting with [1/2] drm/i915/selftests: Replace magic 1<<22 with 
MI_USE_GGTT/MI_MEM_VIRTUAL
URL   : https://patchwork.freedesktop.org/series/46078/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4446 -> Patchwork_9570 =

== Summary - SUCCESS ==

  No regressions found.

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

== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence:
  fi-skl-guc: PASS -> FAIL (fdo#103191)

igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
  fi-kbl-7567u:   PASS -> FAIL (fdo#103191)


 Warnings 

igt@gem_exec_suspend@basic-s4-devices:
  {fi-kbl-8809g}: DMESG-WARN (fdo#107139) -> INCOMPLETE (fdo#107139)


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

  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#107139 https://bugs.freedesktop.org/show_bug.cgi?id=107139


== Participating hosts (47 -> 42) ==

  Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 
fi-hsw-4200u 


== Build changes ==

* Linux: CI_DRM_4446 -> Patchwork_9570

  CI_DRM_4446: 95944426a9ffda186843c78f2f925494e1bc53c5 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4543: 366eed37c7c71217e1cb1f3be5e26358a41f0001 @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9570: 4ece3280cdc43e239759fe44f8e94ab5b1dba570 @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

4ece3280cdc4 drm/i915/selftests: Fixup missing MI_MEM_VIRTUAL for live_hangcheck
58f72e75d92e drm/i915/selftests: Replace magic 1<<22 with 
MI_USE_GGTT/MI_MEM_VIRTUAL

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9570/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 series starting with [1/6] dma-buf: add caching of sg_table

2018-07-06 Thread Patchwork
== Series Details ==

Series: series starting with [1/6] dma-buf: add caching of sg_table
URL   : https://patchwork.freedesktop.org/series/46080/
State : failure

== Summary ==

Applying: dma-buf: add caching of sg_table
Applying: drm: remove prime sg_table caching
Applying: dma-buf: add dma_buf_(un)map_attachment_locked variants v3
Applying: dma-buf: lock the reservation object during (un)map_dma_buf v3
Applying: drm/amdgpu: add independent DMA-buf export v3
error: sha1 information is lacking or useless 
(drivers/gpu/drm/amd/amdgpu/amdgpu.h).
error: could not build fake ancestor
Patch failed at 0005 drm/amdgpu: add independent DMA-buf export v3
Use 'git am --show-current-patch' to see the failed 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 v5] drm/i915/gen11: Preempt-to-idle support in execlists.

2018-07-06 Thread Tomasz Lis
The patch adds support of preempt-to-idle requesting by setting a proper
bit within Execlist Control Register, and receiving preemption result from
Context Status Buffer.

Preemption in previous gens required a special batch buffer to be executed,
so the Command Streamer never preempted to idle directly. In Icelake it is
possible, as there is a hardware mechanism to inform the kernel about
status of the preemption request.

This patch does not cover using the new preemption mechanism when GuC is
active.

v2: Added needs_preempt_context() change so that it is not created when
preempt-to-idle is supported. (Chris)
Updated setting HWACK flag so that it is cleared after
preempt-to-dle. (Chris, Daniele)
Updated to use I915_ENGINE_HAS_PREEMPTION flag. (Chris)

v3: Fixed needs_preempt_context() change. (Chris)
Merged preemption trigger functions to one. (Chris)
Fixed conyext state tonot assume COMPLETED_MASK after preemption,
since idle-to-idle case will not have it set.

v4: Simplified needs_preempt_context() change. (Daniele)
Removed clearing HWACK flag in idle-to-idle preempt. (Daniele)

v5: Renamed inject_preempt_context(). (Daniele)
Removed duplicated GEM_BUG_ON() on HWACK (Daniele)

Bspec: 18922
Cc: Joonas Lahtinen 
Cc: Chris Wilson 
Cc: Daniele Ceraolo Spurio 
Cc: Michal Winiarski 
Cc: Mika Kuoppala 
Reviewed-by: Daniele Ceraolo Spurio 
Signed-off-by: Tomasz Lis 
---
 drivers/gpu/drm/i915/i915_drv.h  |   2 +
 drivers/gpu/drm/i915/i915_gem_context.c  |   3 +-
 drivers/gpu/drm/i915/i915_pci.c  |   3 +-
 drivers/gpu/drm/i915/intel_device_info.h |   1 +
 drivers/gpu/drm/i915/intel_lrc.c | 114 ---
 drivers/gpu/drm/i915/intel_lrc.h |   1 +
 6 files changed, 84 insertions(+), 40 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 91a7e4f..c84a66a 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2533,6 +2533,8 @@ intel_info(const struct drm_i915_private *dev_priv)
((dev_priv)->info.has_logical_ring_elsq)
 #define HAS_LOGICAL_RING_PREEMPTION(dev_priv) \
((dev_priv)->info.has_logical_ring_preemption)
+#define HAS_HW_PREEMPT_TO_IDLE(dev_priv) \
+   ((dev_priv)->info.has_hw_preempt_to_idle)
 
 #define HAS_EXECLISTS(dev_priv) HAS_LOGICAL_RING_CONTEXTS(dev_priv)
 
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c 
b/drivers/gpu/drm/i915/i915_gem_context.c
index b10770c..bf7faa7 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -464,7 +464,8 @@ destroy_kernel_context(struct i915_gem_context **ctxp)
 
 static bool needs_preempt_context(struct drm_i915_private *i915)
 {
-   return HAS_LOGICAL_RING_PREEMPTION(i915);
+   return HAS_LOGICAL_RING_PREEMPTION(i915) &&
+  !HAS_HW_PREEMPT_TO_IDLE(i915);
 }
 
 int i915_gem_contexts_init(struct drm_i915_private *dev_priv)
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 55543f1..2da7e77 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -593,7 +593,8 @@ static const struct intel_device_info intel_cannonlake_info 
= {
GEN(11), \
.ddb_size = 2048, \
.has_csr = 0, \
-   .has_logical_ring_elsq = 1
+   .has_logical_ring_elsq = 1, \
+   .has_hw_preempt_to_idle = 1
 
 static const struct intel_device_info intel_icelake_11_info = {
GEN11_FEATURES,
diff --git a/drivers/gpu/drm/i915/intel_device_info.h 
b/drivers/gpu/drm/i915/intel_device_info.h
index 633f9fb..0be7e03 100644
--- a/drivers/gpu/drm/i915/intel_device_info.h
+++ b/drivers/gpu/drm/i915/intel_device_info.h
@@ -98,6 +98,7 @@ enum intel_platform {
func(has_logical_ring_contexts); \
func(has_logical_ring_elsq); \
func(has_logical_ring_preemption); \
+   func(has_hw_preempt_to_idle); \
func(has_overlay); \
func(has_pooled_eu); \
func(has_psr); \
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index ab89dab..aed4aeb 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -155,6 +155,7 @@
 #define GEN8_CTX_STATUS_ACTIVE_IDLE(1 << 3)
 #define GEN8_CTX_STATUS_COMPLETE   (1 << 4)
 #define GEN8_CTX_STATUS_LITE_RESTORE   (1 << 15)
+#define GEN11_CTX_STATUS_PREEMPT_IDLE  (1 << 29)
 
 #define GEN8_CTX_STATUS_COMPLETED_MASK \
 (GEN8_CTX_STATUS_COMPLETE | GEN8_CTX_STATUS_PREEMPTED)
@@ -525,34 +526,49 @@ static void port_assign(struct execlist_port *port, 
struct i915_request *rq)
port_set(port, port_pack(i915_request_get(rq), port_count(port)));
 }
 
-static void inject_preempt_context(struct intel_engine_cs *engine)
+static void execlist_send_preempt_to_idle(struct intel_engine_cs *engine)
 {
struct intel_engine_execlists *execlists = &engine->execlists;
-   struct intel_context *ce =
-  

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/selftests: Limit live_gtt allocation test to fit within RAM

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915/selftests: Limit live_gtt allocation test to fit within RAM
URL   : https://patchwork.freedesktop.org/series/46075/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4446 -> Patchwork_9569 =

== Summary - SUCCESS ==

  No regressions found.

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

== Known issues ==

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

  === IGT changes ===

 Warnings 

igt@gem_exec_suspend@basic-s4-devices:
  {fi-kbl-8809g}: DMESG-WARN (fdo#107139) -> INCOMPLETE (fdo#107139)


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

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


== Participating hosts (47 -> 42) ==

  Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 
fi-hsw-4200u 


== Build changes ==

* Linux: CI_DRM_4446 -> Patchwork_9569

  CI_DRM_4446: 95944426a9ffda186843c78f2f925494e1bc53c5 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4543: 366eed37c7c71217e1cb1f3be5e26358a41f0001 @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9569: 951ac5597a9bb633b7b1b9cca98c874b550c3e5e @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

951ac5597a9b drm/i915/selftests: Limit live_gtt allocation test to fit within 
RAM

== Logs ==

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


[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/selftests: Limit live_gtt allocation test to fit within RAM

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915/selftests: Limit live_gtt allocation test to fit within RAM
URL   : https://patchwork.freedesktop.org/series/46075/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Commit: drm/i915/selftests: Limit live_gtt allocation test to fit within RAM
+drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:174:17: warning: expression 
using sizeof(void)
+drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:174:17: warning: expression 
using sizeof(void)

___
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 [1/6] drm/i915: Refactor export_fence() after i915_vma_move_to_active() (rev2)

2018-07-06 Thread Patchwork
== Series Details ==

Series: series starting with [1/6] drm/i915: Refactor export_fence() after 
i915_vma_move_to_active() (rev2)
URL   : https://patchwork.freedesktop.org/series/46067/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4446 -> Patchwork_9568 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: 
https://patchwork.freedesktop.org/api/1.0/series/46067/revisions/2/mbox/

== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@prime_vgem@basic-fence-flip:
  fi-ilk-650: PASS -> FAIL (fdo#104008)


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


== Participating hosts (47 -> 42) ==

  Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 
fi-hsw-4200u 


== Build changes ==

* Linux: CI_DRM_4446 -> Patchwork_9568

  CI_DRM_4446: 95944426a9ffda186843c78f2f925494e1bc53c5 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4543: 366eed37c7c71217e1cb1f3be5e26358a41f0001 @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9568: a65a91a8871c69c8a80db2a1da700aaa4eb113b4 @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

a65a91a8871c drm/i915: Track the last-active inside the i915_vma
42d0e21316dd drm/i915: Track vma activity per fence.context, not per engine
78318c338989 drm/i915: Move i915_vma_move_to_active() to i915_vma.c
39fbb254f607 drm/i915: Start returning an error from i915_vma_move_to_active()
951d50a80f49 drm/i915: Export i915_request_skip()
c404016bcc1d drm/i915: Refactor export_fence() after i915_vma_move_to_active()

== Logs ==

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


[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/6] drm/i915: Refactor export_fence() after i915_vma_move_to_active() (rev2)

2018-07-06 Thread Patchwork
== Series Details ==

Series: series starting with [1/6] drm/i915: Refactor export_fence() after 
i915_vma_move_to_active() (rev2)
URL   : https://patchwork.freedesktop.org/series/46067/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Commit: drm/i915: Refactor export_fence() after i915_vma_move_to_active()
Okay!

Commit: drm/i915: Export i915_request_skip()
Okay!

Commit: drm/i915: Start returning an error from i915_vma_move_to_active()
Okay!

Commit: drm/i915: Move i915_vma_move_to_active() to i915_vma.c
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3655:16: warning: expression 
using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3652:16: warning: expression 
using sizeof(void)

Commit: drm/i915: Track vma activity per fence.context, not per engine
Okay!

Commit: drm/i915: Track the last-active inside the i915_vma
Okay!

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


[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/6] drm/i915: Refactor export_fence() after i915_vma_move_to_active() (rev2)

2018-07-06 Thread Patchwork
== Series Details ==

Series: series starting with [1/6] drm/i915: Refactor export_fence() after 
i915_vma_move_to_active() (rev2)
URL   : https://patchwork.freedesktop.org/series/46067/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
c404016bcc1d drm/i915: Refactor export_fence() after i915_vma_move_to_active()
951d50a80f49 drm/i915: Export i915_request_skip()
39fbb254f607 drm/i915: Start returning an error from i915_vma_move_to_active()
78318c338989 drm/i915: Move i915_vma_move_to_active() to i915_vma.c
42d0e21316dd drm/i915: Track vma activity per fence.context, not per engine
a65a91a8871c drm/i915: Track the last-active inside the i915_vma
-:97: WARNING:TYPO_SPELLING: 'recieve' may be misspelled - perhaps 'receive'?
#97: FILE: drivers/gpu/drm/i915/i915_vma.c:959:
+* we must be careful as we now only expect to recieve one retire

total: 0 errors, 1 warnings, 0 checks, 101 lines checked

___
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 [1/2] drm/i915/gtt: Suppress warnings for dma_map_page

2018-07-06 Thread Patchwork
== Series Details ==

Series: series starting with [1/2] drm/i915/gtt: Suppress warnings for 
dma_map_page
URL   : https://patchwork.freedesktop.org/series/46072/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4446 -> Patchwork_9567 =

== Summary - SUCCESS ==

  No regressions found.

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

== Possible new issues ==

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

  === IGT changes ===

 Possible regressions 

igt@kms_flip@basic-flip-vs-dpms:
  {fi-cfl-8109u}: PASS -> INCOMPLETE


== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@kms_flip@basic-flip-vs-dpms:
  fi-skl-6700hq:  PASS -> DMESG-WARN (fdo#105998)


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

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


== Participating hosts (47 -> 41) ==

  Missing(6): fi-ilk-m540 fi-hsw-4200u fi-skl-guc fi-byt-squawks 
fi-bsw-cyan fi-ctg-p8600 


== Build changes ==

* Linux: CI_DRM_4446 -> Patchwork_9567

  CI_DRM_4446: 95944426a9ffda186843c78f2f925494e1bc53c5 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4543: 366eed37c7c71217e1cb1f3be5e26358a41f0001 @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9567: c8a26b94b94b3e9077ee998a8bd9085e79b75cb6 @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

c8a26b94b94b drm/i915/gtt: Control cache domain of dma_map_page() directly
944065137401 drm/i915/gtt: Suppress warnings for dma_map_page

== Logs ==

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


Re: [Intel-gfx] [PATCH 1/2] drm/i915/selftests: Replace magic 1<<22 with MI_USE_GGTT/MI_MEM_VIRTUAL

2018-07-06 Thread Chris Wilson
Quoting Ville Syrjälä (2018-07-06 15:47:25)
> On Fri, Jul 06, 2018 at 03:23:22PM +0100, Chris Wilson wrote:
> > diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c 
> > b/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
> > index cb9eef1635e1..294c58aba2c1 100644
> > --- a/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
> > +++ b/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
> > @@ -210,12 +210,12 @@ static int gpu_set(struct drm_i915_gem_object *obj,
> >   *cs++ = upper_32_bits(i915_ggtt_offset(vma) + offset);
> >   *cs++ = v;
> 
> Missed the gen8+ case here?
> 
> >   } else if (INTEL_GEN(i915) >= 4) {
> > - *cs++ = MI_STORE_DWORD_IMM_GEN4 | 1 << 22;
> > + *cs++ = MI_STORE_DWORD_IMM_GEN4 | MI_USE_GGTT;
> 
> So here we use ggtt on all gens. In the other tests we use ppgtt on
> gen6+. Ah, this one uses the kernel context apparently. I guess that's
> the reason?

If memory serves, yes, this was deliberately trying to use the ppGTT in
this case. I guess I need to check this against the full-ppgtt patches
for gen7 (although shard-hsw didn't flag anything iirc), but this should
probably have a (gen < 6 ? MI_USE_GGTT : 0) here.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 2/2] drm/i915/selftests: Fixup missing MI_MEM_VIRTUAL for live_hangcheck

2018-07-06 Thread Ville Syrjälä
On Fri, Jul 06, 2018 at 03:23:23PM +0100, Chris Wilson wrote:
> We always want to use a virtual address (i.e. use the GTT) for
> MI_STORE_DWORD_IMM, but forgot the ever so important flag in
> live_hangcheck for gen3.

Reviewed-by: Ville Syrjälä 

> 
> Signed-off-by: Chris Wilson 
> ---
>  drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c 
> b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
> index 0fc6da81f86e..c838f7d08cb9 100644
> --- a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
> +++ b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
> @@ -184,7 +184,7 @@ static int emit_recurse_batch(struct hang *h,
>   *batch++ = MI_BATCH_BUFFER_START | 2 << 6;
>   *batch++ = lower_32_bits(vma->node.start);
>   } else {
> - *batch++ = MI_STORE_DWORD_IMM;
> + *batch++ = MI_STORE_DWORD_IMM | MI_MEM_VIRTUAL;
>   *batch++ = lower_32_bits(hws_address(hws, rq));
>   *batch++ = rq->fence.seqno;
>   *batch++ = MI_ARB_CHECK;
> -- 
> 2.18.0
> 
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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


Re: [Intel-gfx] [PATCH 1/2] drm/i915/selftests: Replace magic 1<<22 with MI_USE_GGTT/MI_MEM_VIRTUAL

2018-07-06 Thread Ville Syrjälä
On Fri, Jul 06, 2018 at 03:23:22PM +0100, Chris Wilson wrote:
> Replace the magic bit with the proper symbolic name for instructing
> MI_STORE_DWORD_IMM to use a virtual address (on gen3) or the global GTT
> address (still virtual!) on gen4+.
> 
> Signed-off-by: Chris Wilson 
> ---
>  drivers/gpu/drm/i915/selftests/huge_pages.c | 4 ++--
>  drivers/gpu/drm/i915/selftests/i915_gem_coherency.c | 4 ++--
>  drivers/gpu/drm/i915/selftests/i915_gem_context.c   | 4 ++--
>  drivers/gpu/drm/i915/selftests/intel_hangcheck.c| 2 +-
>  4 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/huge_pages.c 
> b/drivers/gpu/drm/i915/selftests/huge_pages.c
> index 1193dd36913a..ab662dabcff7 100644
> --- a/drivers/gpu/drm/i915/selftests/huge_pages.c
> +++ b/drivers/gpu/drm/i915/selftests/huge_pages.c
> @@ -919,12 +919,12 @@ gpu_write_dw(struct i915_vma *vma, u64 offset, u32 val)
>   *cmd++ = val;
>   } else if (gen >= 4) {
>   *cmd++ = MI_STORE_DWORD_IMM_GEN4 |
> - (gen < 6 ? 1 << 22 : 0);
> + (gen < 6 ? MI_USE_GGTT : 0);
>   *cmd++ = 0;
>   *cmd++ = offset;
>   *cmd++ = val;
>   } else {
> - *cmd++ = MI_STORE_DWORD_IMM | 1 << 22;
> + *cmd++ = MI_STORE_DWORD_IMM | MI_MEM_VIRTUAL;
>   *cmd++ = offset;
>   *cmd++ = val;
>   }
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c 
> b/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
> index cb9eef1635e1..294c58aba2c1 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
> @@ -210,12 +210,12 @@ static int gpu_set(struct drm_i915_gem_object *obj,
>   *cs++ = upper_32_bits(i915_ggtt_offset(vma) + offset);
>   *cs++ = v;

Missed the gen8+ case here?

>   } else if (INTEL_GEN(i915) >= 4) {
> - *cs++ = MI_STORE_DWORD_IMM_GEN4 | 1 << 22;
> + *cs++ = MI_STORE_DWORD_IMM_GEN4 | MI_USE_GGTT;

So here we use ggtt on all gens. In the other tests we use ppgtt on
gen6+. Ah, this one uses the kernel context apparently. I guess that's
the reason?

>   *cs++ = 0;
>   *cs++ = i915_ggtt_offset(vma) + offset;
>   *cs++ = v;
>   } else {
> - *cs++ = MI_STORE_DWORD_IMM | 1 << 22;
> + *cs++ = MI_STORE_DWORD_IMM | MI_MEM_VIRTUAL;
>   *cs++ = i915_ggtt_offset(vma) + offset;
>   *cs++ = v;
>   *cs++ = MI_NOOP;
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c 
> b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> index 0d8e719802fa..65100d3e31cf 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
> @@ -63,12 +63,12 @@ gpu_fill_dw(struct i915_vma *vma, u64 offset, unsigned 
> long count, u32 value)
>   *cmd++ = value;
>   } else if (gen >= 4) {
>   *cmd++ = MI_STORE_DWORD_IMM_GEN4 |
> - (gen < 6 ? 1 << 22 : 0);
> + (gen < 6 ? MI_USE_GGTT : 0);
>   *cmd++ = 0;
>   *cmd++ = offset;
>   *cmd++ = value;
>   } else {
> - *cmd++ = MI_STORE_DWORD_IMM | 1 << 22;
> + *cmd++ = MI_STORE_DWORD_IMM | MI_MEM_VIRTUAL;
>   *cmd++ = offset;
>   *cmd++ = value;
>   }
> diff --git a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c 
> b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
> index 5cb808dc5b50..0fc6da81f86e 100644
> --- a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
> +++ b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
> @@ -171,7 +171,7 @@ static int emit_recurse_batch(struct hang *h,
>   *batch++ = MI_BATCH_BUFFER_START | 1 << 8;
>   *batch++ = lower_32_bits(vma->node.start);
>   } else if (INTEL_GEN(i915) >= 4) {
> - *batch++ = MI_STORE_DWORD_IMM_GEN4 | 1 << 22;
> + *batch++ = MI_STORE_DWORD_IMM_GEN4 | MI_USE_GGTT;
>   *batch++ = 0;
>   *batch++ = lower_32_bits(hws_address(hws, rq));
>   *batch++ = rq->fence.seqno;
> -- 
> 2.18.0
> 
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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


[Intel-gfx] [PATCH 6/6] drm/amdgpu: add independent DMA-buf import v4

2018-07-06 Thread Christian König
Instead of relying on the DRM functions just implement our own import
functions. This prepares support for taking care of unpinned DMA-buf.

v2: enable for all exporters, not just amdgpu, fix invalidation
handling, lock reservation object while setting callback
v3: change to new dma_buf attach interface
v4: split out from unpinned DMA-buf work

Signed-off-by: Christian König 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h   |  4 
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c   |  1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 38 +++
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c   | 34 +++
 4 files changed, 52 insertions(+), 25 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h 
b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 269664fd00de..31c6edd77f2e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -374,10 +374,6 @@ int amdgpu_gem_object_open(struct drm_gem_object *obj,
 void amdgpu_gem_object_close(struct drm_gem_object *obj,
struct drm_file *file_priv);
 unsigned long amdgpu_gem_timeout(uint64_t timeout_ns);
-struct drm_gem_object *
-amdgpu_gem_prime_import_sg_table(struct drm_device *dev,
-struct dma_buf_attachment *attach,
-struct sg_table *sg);
 struct dma_buf *amdgpu_gem_prime_export(struct drm_device *dev,
struct drm_gem_object *gobj,
int flags);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 04ef967e128c..c632e14257d2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -1138,7 +1138,6 @@ static struct drm_driver kms_driver = {
.gem_prime_export = amdgpu_gem_prime_export,
.gem_prime_import = amdgpu_gem_prime_import,
.gem_prime_res_obj = amdgpu_gem_prime_res_obj,
-   .gem_prime_import_sg_table = amdgpu_gem_prime_import_sg_table,
.gem_prime_vmap = amdgpu_gem_prime_vmap,
.gem_prime_vunmap = amdgpu_gem_prime_vunmap,
.gem_prime_mmap = amdgpu_gem_prime_mmap,
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
index 75c70ddbc080..13033ff48cb1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
@@ -122,31 +122,28 @@ int amdgpu_gem_prime_mmap(struct drm_gem_object *obj, 
struct vm_area_struct *vma
 }
 
 /**
- * amdgpu_gem_prime_import_sg_table - &drm_driver.gem_prime_import_sg_table
- * implementation
+ * amdgpu_gem_prime_create_obj - create BO for DMA-buf import
+ *
  * @dev: DRM device
- * @attach: DMA-buf attachment
- * @sg: Scatter/gather table
+ * @dma_buf: DMA-buf
  *
- * Import shared DMA buffer memory exported by another device.
+ * Creates an empty SG BO for DMA-buf import.
  *
  * Returns:
  * A new GEM buffer object of the given DRM device, representing the memory
  * described by the given DMA-buf attachment and scatter/gather table.
  */
-struct drm_gem_object *
-amdgpu_gem_prime_import_sg_table(struct drm_device *dev,
-struct dma_buf_attachment *attach,
-struct sg_table *sg)
+static struct drm_gem_object *
+amdgpu_gem_prime_create_obj(struct drm_device *dev, struct dma_buf *dma_buf)
 {
-   struct reservation_object *resv = attach->dmabuf->resv;
+   struct reservation_object *resv = dma_buf->resv;
struct amdgpu_device *adev = dev->dev_private;
struct amdgpu_bo *bo;
struct amdgpu_bo_param bp;
int ret;
 
memset(&bp, 0, sizeof(bp));
-   bp.size = attach->dmabuf->size;
+   bp.size = dma_buf->size;
bp.byte_align = PAGE_SIZE;
bp.domain = AMDGPU_GEM_DOMAIN_CPU;
bp.flags = 0;
@@ -157,11 +154,9 @@ amdgpu_gem_prime_import_sg_table(struct drm_device *dev,
if (ret)
goto error;
 
-   bo->tbo.sg = sg;
-   bo->tbo.ttm->sg = sg;
bo->allowed_domains = AMDGPU_GEM_DOMAIN_GTT;
bo->preferred_domains = AMDGPU_GEM_DOMAIN_GTT;
-   if (attach->dmabuf->ops != &amdgpu_dmabuf_ops)
+   if (dma_buf->ops != &amdgpu_dmabuf_ops)
bo->prime_shared_count = 1;
 
ww_mutex_unlock(&resv->lock);
@@ -377,6 +372,7 @@ struct dma_buf *amdgpu_gem_prime_export(struct drm_device 
*dev,
 struct drm_gem_object *amdgpu_gem_prime_import(struct drm_device *dev,
struct dma_buf *dma_buf)
 {
+   struct dma_buf_attachment *attach;
struct drm_gem_object *obj;
 
if (dma_buf->ops == &amdgpu_dmabuf_ops) {
@@ -391,5 +387,17 @@ struct drm_gem_object *amdgpu_gem_prime_import(struct 
drm_device *dev,
}
}
 
-   return drm_gem_prime_import(dev, dma_buf);
+   obj = amdgpu_gem_prime_create_obj(dev, dma_buf);
+   if (IS_

[Intel-gfx] [PATCH 2/6] drm: remove prime sg_table caching

2018-07-06 Thread Christian König
That is now done by the DMA-buf helpers instead.

Signed-off-by: Christian König 
---
 drivers/gpu/drm/drm_prime.c | 78 +++--
 1 file changed, 18 insertions(+), 60 deletions(-)

diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
index 186db2e4c57a..f6bd37eb2a72 100644
--- a/drivers/gpu/drm/drm_prime.c
+++ b/drivers/gpu/drm/drm_prime.c
@@ -86,11 +86,6 @@ struct drm_prime_member {
struct rb_node handle_rb;
 };
 
-struct drm_prime_attachment {
-   struct sg_table *sgt;
-   enum dma_data_direction dir;
-};
-
 static int drm_prime_add_buf_handle(struct drm_prime_file_private *prime_fpriv,
struct dma_buf *dma_buf, uint32_t handle)
 {
@@ -188,26 +183,17 @@ static int drm_prime_lookup_buf_handle(struct 
drm_prime_file_private *prime_fpri
  * @dma_buf: buffer to attach device to
  * @attach: buffer attachment data
  *
- * Allocates &drm_prime_attachment and calls &drm_driver.gem_prime_pin for
- * device specific attachment. This can be used as the &dma_buf_ops.attach
- * callback.
+ * Calls &drm_driver.gem_prime_pin for device specific handling. This can be
+ * used as the &dma_buf_ops.attach callback.
  *
  * Returns 0 on success, negative error code on failure.
  */
 int drm_gem_map_attach(struct dma_buf *dma_buf,
   struct dma_buf_attachment *attach)
 {
-   struct drm_prime_attachment *prime_attach;
struct drm_gem_object *obj = dma_buf->priv;
struct drm_device *dev = obj->dev;
 
-   prime_attach = kzalloc(sizeof(*prime_attach), GFP_KERNEL);
-   if (!prime_attach)
-   return -ENOMEM;
-
-   prime_attach->dir = DMA_NONE;
-   attach->priv = prime_attach;
-
if (!dev->driver->gem_prime_pin)
return 0;
 
@@ -226,27 +212,9 @@ EXPORT_SYMBOL(drm_gem_map_attach);
 void drm_gem_map_detach(struct dma_buf *dma_buf,
struct dma_buf_attachment *attach)
 {
-   struct drm_prime_attachment *prime_attach = attach->priv;
struct drm_gem_object *obj = dma_buf->priv;
struct drm_device *dev = obj->dev;
 
-   if (prime_attach) {
-   struct sg_table *sgt = prime_attach->sgt;
-
-   if (sgt) {
-   if (prime_attach->dir != DMA_NONE)
-   dma_unmap_sg_attrs(attach->dev, sgt->sgl,
-  sgt->nents,
-  prime_attach->dir,
-  DMA_ATTR_SKIP_CPU_SYNC);
-   sg_free_table(sgt);
-   }
-
-   kfree(sgt);
-   kfree(prime_attach);
-   attach->priv = NULL;
-   }
-
if (dev->driver->gem_prime_unpin)
dev->driver->gem_prime_unpin(obj);
 }
@@ -292,36 +260,21 @@ void drm_prime_remove_buf_handle_locked(struct 
drm_prime_file_private *prime_fpr
 struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach,
 enum dma_data_direction dir)
 {
-   struct drm_prime_attachment *prime_attach = attach->priv;
struct drm_gem_object *obj = attach->dmabuf->priv;
struct sg_table *sgt;
 
-   if (WARN_ON(dir == DMA_NONE || !prime_attach))
+   if (WARN_ON(dir == DMA_NONE))
return ERR_PTR(-EINVAL);
 
-   /* return the cached mapping when possible */
-   if (prime_attach->dir == dir)
-   return prime_attach->sgt;
-
-   /*
-* two mappings with different directions for the same attachment are
-* not allowed
-*/
-   if (WARN_ON(prime_attach->dir != DMA_NONE))
-   return ERR_PTR(-EBUSY);
-
sgt = obj->dev->driver->gem_prime_get_sg_table(obj);
+   if (IS_ERR(sgt))
+   return sgt;
 
-   if (!IS_ERR(sgt)) {
-   if (!dma_map_sg_attrs(attach->dev, sgt->sgl, sgt->nents, dir,
- DMA_ATTR_SKIP_CPU_SYNC)) {
-   sg_free_table(sgt);
-   kfree(sgt);
-   sgt = ERR_PTR(-ENOMEM);
-   } else {
-   prime_attach->sgt = sgt;
-   prime_attach->dir = dir;
-   }
+   if (!dma_map_sg_attrs(attach->dev, sgt->sgl, sgt->nents, dir,
+ DMA_ATTR_SKIP_CPU_SYNC)) {
+   sg_free_table(sgt);
+   kfree(sgt);
+   sgt = ERR_PTR(-ENOMEM);
}
 
return sgt;
@@ -334,14 +287,19 @@ EXPORT_SYMBOL(drm_gem_map_dma_buf);
  * @sgt: scatterlist info of the buffer to unmap
  * @dir: direction of DMA transfer
  *
- * Not implemented. The unmap is done at drm_gem_map_detach().  This can be
- * used as the &dma_buf_ops.unmap_dma_buf callback.
+ * This can be used as the &dma_buf_ops.unmap_dma_buf callback.
  */
 void drm_gem_unmap_dma_buf(struct dma_buf_attachment *

[Intel-gfx] [PATCH 1/6] dma-buf: add caching of sg_table

2018-07-06 Thread Christian König
To allow a smooth transition from pinning buffer objects to dynamic
invalidation we first start to cache the sg_table for an attachment
unless the driver explicitly says to not do so.

Signed-off-by: Christian König 
---
 drivers/dma-buf/dma-buf.c | 24 
 include/linux/dma-buf.h   | 11 +++
 2 files changed, 35 insertions(+)

diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 13884474d158..0bea5eecf554 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -574,6 +574,20 @@ struct dma_buf_attachment *dma_buf_attach(struct dma_buf 
*dmabuf,
list_add(&attach->node, &dmabuf->attachments);
 
mutex_unlock(&dmabuf->lock);
+
+   if (!dmabuf->ops->no_sgt_cache) {
+   struct sg_table *sgt;
+
+   sgt = dmabuf->ops->map_dma_buf(attach, DMA_BIDIRECTIONAL);
+   if (!sgt)
+   sgt = ERR_PTR(-ENOMEM);
+   if (IS_ERR(sgt)) {
+   dma_buf_detach(dmabuf, attach);
+   return ERR_CAST(sgt);
+   }
+   attach->sgt = sgt;
+   }
+
return attach;
 
 err_attach:
@@ -596,6 +610,10 @@ void dma_buf_detach(struct dma_buf *dmabuf, struct 
dma_buf_attachment *attach)
if (WARN_ON(!dmabuf || !attach))
return;
 
+   if (attach->sgt)
+   dmabuf->ops->unmap_dma_buf(attach, attach->sgt,
+  DMA_BIDIRECTIONAL);
+
mutex_lock(&dmabuf->lock);
list_del(&attach->node);
if (dmabuf->ops->detach)
@@ -631,6 +649,9 @@ struct sg_table *dma_buf_map_attachment(struct 
dma_buf_attachment *attach,
if (WARN_ON(!attach || !attach->dmabuf))
return ERR_PTR(-EINVAL);
 
+   if (attach->sgt)
+   return attach->sgt;
+
sg_table = attach->dmabuf->ops->map_dma_buf(attach, direction);
if (!sg_table)
sg_table = ERR_PTR(-ENOMEM);
@@ -658,6 +679,9 @@ void dma_buf_unmap_attachment(struct dma_buf_attachment 
*attach,
if (WARN_ON(!attach || !attach->dmabuf || !sg_table))
return;
 
+   if (attach->sgt == sg_table)
+   return;
+
attach->dmabuf->ops->unmap_dma_buf(attach, sg_table,
direction);
 }
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
index 58725f890b5b..6534a6769e17 100644
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
@@ -51,6 +51,16 @@ struct dma_buf_attachment;
  * @vunmap: [optional] unmaps a vmap from the buffer
  */
 struct dma_buf_ops {
+   /**
+* @no_sgt_cache:
+*
+* Flag controlling the caching of the sg_table in the DMA-buf helpers.
+* If not set the sg_table is created during device attaching, if set
+* the sg_table is created dynamically when dma_buf_map_attachment() is
+* called.
+*/
+   bool no_sgt_cache;
+
/**
 * @attach:
 *
@@ -323,6 +333,7 @@ struct dma_buf_attachment {
struct device *dev;
struct list_head node;
void *priv;
+   struct sg_table *sgt;
 };
 
 /**
-- 
2.14.1

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


[Intel-gfx] [PATCH 3/6] dma-buf: add dma_buf_(un)map_attachment_locked variants v3

2018-07-06 Thread Christian König
Add function variants which can be called with the reservation lock
already held.

v2: reordered, add lockdep asserts, fix kerneldoc
v3: rebased on sgt caching

Signed-off-by: Christian König 
---
 drivers/dma-buf/dma-buf.c | 63 +++
 include/linux/dma-buf.h   |  5 
 2 files changed, 68 insertions(+)

diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 0bea5eecf554..e68322c953a9 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -624,6 +624,43 @@ void dma_buf_detach(struct dma_buf *dmabuf, struct 
dma_buf_attachment *attach)
 }
 EXPORT_SYMBOL_GPL(dma_buf_detach);
 
+/**
+ * dma_buf_map_attachment_locked - Maps the buffer into _device_ address space
+ * with the reservation lock held. Is a wrapper for map_dma_buf() of the
+ *
+ * Returns the scatterlist table of the attachment;
+ * dma_buf_ops.
+ * @attach:[in]attachment whose scatterlist is to be returned
+ * @direction: [in]direction of DMA transfer
+ *
+ * Returns sg_table containing the scatterlist to be returned; returns ERR_PTR
+ * on error. May return -EINTR if it is interrupted by a signal.
+ *
+ * A mapping must be unmapped by using dma_buf_unmap_attachment_locked(). Note
+ * that the underlying backing storage is pinned for as long as a mapping
+ * exists, therefore users/importers should not hold onto a mapping for undue
+ * amounts of time.
+ */
+struct sg_table *
+dma_buf_map_attachment_locked(struct dma_buf_attachment *attach,
+ enum dma_data_direction direction)
+{
+   struct sg_table *sg_table;
+
+   might_sleep();
+   reservation_object_assert_held(attach->dmabuf->resv);
+
+   if (attach->sgt)
+   return attach->sgt;
+
+   sg_table = attach->dmabuf->ops->map_dma_buf(attach, direction);
+   if (!sg_table)
+   sg_table = ERR_PTR(-ENOMEM);
+
+   return sg_table;
+}
+EXPORT_SYMBOL_GPL(dma_buf_map_attachment_locked);
+
 /**
  * dma_buf_map_attachment - Returns the scatterlist table of the attachment;
  * mapped into _device_ address space. Is a wrapper for map_dma_buf() of the
@@ -660,6 +697,32 @@ struct sg_table *dma_buf_map_attachment(struct 
dma_buf_attachment *attach,
 }
 EXPORT_SYMBOL_GPL(dma_buf_map_attachment);
 
+/**
+ * dma_buf_unmap_attachment_locked - unmaps the buffer with reservation lock
+ * held, should deallocate the associated scatterlist. Is a wrapper for
+ * unmap_dma_buf() of dma_buf_ops.
+ * @attach:[in]attachment to unmap buffer from
+ * @sg_table:  [in]scatterlist info of the buffer to unmap
+ * @direction:  [in]direction of DMA transfer
+ *
+ * This unmaps a DMA mapping for @attached obtained by
+ * dma_buf_map_attachment_locked().
+ */
+void dma_buf_unmap_attachment_locked(struct dma_buf_attachment *attach,
+struct sg_table *sg_table,
+enum dma_data_direction direction)
+{
+   might_sleep();
+   reservation_object_assert_held(attach->dmabuf->resv);
+
+   if (attach->sgt == sg_table)
+   return;
+
+   attach->dmabuf->ops->unmap_dma_buf(attach, sg_table,
+   direction);
+}
+EXPORT_SYMBOL_GPL(dma_buf_unmap_attachment_locked);
+
 /**
  * dma_buf_unmap_attachment - unmaps and decreases usecount of the buffer;might
  * deallocate the scatterlist associated. Is a wrapper for unmap_dma_buf() of
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
index 6534a6769e17..a40f8f586a95 100644
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
@@ -395,8 +395,13 @@ int dma_buf_fd(struct dma_buf *dmabuf, int flags);
 struct dma_buf *dma_buf_get(int fd);
 void dma_buf_put(struct dma_buf *dmabuf);
 
+struct sg_table *dma_buf_map_attachment_locked(struct dma_buf_attachment *,
+  enum dma_data_direction);
 struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *,
enum dma_data_direction);
+void dma_buf_unmap_attachment_locked(struct dma_buf_attachment *,
+struct sg_table *,
+enum dma_data_direction);
 void dma_buf_unmap_attachment(struct dma_buf_attachment *, struct sg_table *,
enum dma_data_direction);
 int dma_buf_begin_cpu_access(struct dma_buf *dma_buf,
-- 
2.14.1

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


[Intel-gfx] [PATCH 5/6] drm/amdgpu: add independent DMA-buf export v3

2018-07-06 Thread Christian König
The caching of SGT's is actually quite harmful and should probably removed
altogether when all drivers are audited.

Start by providing a separate DMA-buf export implementation in amdgpu. This is
also a prerequisite of unpinned DMA-buf handling.

v2: fix unintended recursion, remove debugging leftovers
v3: split out from unpinned DMA-buf work
v4: rebase on top of new no_sgt_cache flag

Signed-off-by: Christian König 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h   |  1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c   |  1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 94 +--
 3 files changed, 40 insertions(+), 56 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h 
b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 8eaba0f4db10..269664fd00de 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -374,7 +374,6 @@ int amdgpu_gem_object_open(struct drm_gem_object *obj,
 void amdgpu_gem_object_close(struct drm_gem_object *obj,
struct drm_file *file_priv);
 unsigned long amdgpu_gem_timeout(uint64_t timeout_ns);
-struct sg_table *amdgpu_gem_prime_get_sg_table(struct drm_gem_object *obj);
 struct drm_gem_object *
 amdgpu_gem_prime_import_sg_table(struct drm_device *dev,
 struct dma_buf_attachment *attach,
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 06aede194bf8..04ef967e128c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -1138,7 +1138,6 @@ static struct drm_driver kms_driver = {
.gem_prime_export = amdgpu_gem_prime_export,
.gem_prime_import = amdgpu_gem_prime_import,
.gem_prime_res_obj = amdgpu_gem_prime_res_obj,
-   .gem_prime_get_sg_table = amdgpu_gem_prime_get_sg_table,
.gem_prime_import_sg_table = amdgpu_gem_prime_import_sg_table,
.gem_prime_vmap = amdgpu_gem_prime_vmap,
.gem_prime_vunmap = amdgpu_gem_prime_vunmap,
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
index 3ed02f472003..75c70ddbc080 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
@@ -40,22 +40,6 @@
 
 static const struct dma_buf_ops amdgpu_dmabuf_ops;
 
-/**
- * amdgpu_gem_prime_get_sg_table - &drm_driver.gem_prime_get_sg_table
- * implementation
- * @obj: GEM buffer object
- *
- * Returns:
- * A scatter/gather table for the pinned pages of the buffer object's memory.
- */
-struct sg_table *amdgpu_gem_prime_get_sg_table(struct drm_gem_object *obj)
-{
-   struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
-   int npages = bo->tbo.num_pages;
-
-   return drm_prime_pages_to_sg(bo->tbo.ttm->pages, npages);
-}
-
 /**
  * amdgpu_gem_prime_vmap - &dma_buf_ops.vmap implementation
  * @obj: GEM buffer object
@@ -189,34 +173,29 @@ amdgpu_gem_prime_import_sg_table(struct drm_device *dev,
 }
 
 /**
- * amdgpu_gem_map_attach - &dma_buf_ops.attach implementation
- * @dma_buf: shared DMA buffer
+ * amdgpu_gem_map_dma_buf - &dma_buf_ops.map_dma_buf implementation
  * @attach: DMA-buf attachment
+ * @dir: DMA direction
  *
  * Makes sure that the shared DMA buffer can be accessed by the target device.
  * For now, simply pins it to the GTT domain, where it should be accessible by
  * all DMA devices.
  *
  * Returns:
- * 0 on success or negative error code.
+ * sg_table filled with the DMA addresses to use or ERR_PRT with negative error
+ * code.
  */
-static int amdgpu_gem_map_attach(struct dma_buf *dma_buf,
-struct dma_buf_attachment *attach)
+static struct sg_table *
+amdgpu_gem_map_dma_buf(struct dma_buf_attachment *attach,
+  enum dma_data_direction dir)
 {
+   struct dma_buf *dma_buf = attach->dmabuf;
struct drm_gem_object *obj = dma_buf->priv;
struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
+   struct sg_table *sgt;
long r;
 
-   r = drm_gem_map_attach(dma_buf, attach);
-   if (r)
-   return r;
-
-   r = amdgpu_bo_reserve(bo, false);
-   if (unlikely(r != 0))
-   goto error_detach;
-
-
if (attach->dev->driver != adev->dev->driver) {
/*
 * Wait for all shared fences to complete before we switch to 
future
@@ -227,54 +206,62 @@ static int amdgpu_gem_map_attach(struct dma_buf *dma_buf,
MAX_SCHEDULE_TIMEOUT);
if (unlikely(r < 0)) {
DRM_DEBUG_PRIME("Fence wait failed: %li\n", r);
-   goto error_unreserve;
+   return ERR_PTR(r);
}
}
 
/* pin buffer into GTT */
r = amdgpu_bo_pin(bo, AMDGPU_GEM_DOMAIN_GTT);
if (r)
-   goto error_unreserve;
+ 

[Intel-gfx] (no subject)

2018-07-06 Thread Christian König
Next try of prework for unpinned DMA-buf operation.

Only send to intel-gfx to trigger unit tests on the following patches.

Christian.

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


[Intel-gfx] [PATCH 4/6] dma-buf: lock the reservation object during (un)map_dma_buf v3

2018-07-06 Thread Christian König
First step towards unpinned DMA buf operation.

I've checked the DRM drivers to potential locking of the reservation
object, but essentially we need to audit all implementations of the
dma_buf _ops for this to work.

v2: reordered
v3: rebased on sgt caching

Signed-off-by: Christian König 
---
 drivers/dma-buf/dma-buf.c | 15 ++-
 include/linux/dma-buf.h   |  6 ++
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index e68322c953a9..21608306349d 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -686,10 +686,9 @@ struct sg_table *dma_buf_map_attachment(struct 
dma_buf_attachment *attach,
if (WARN_ON(!attach || !attach->dmabuf))
return ERR_PTR(-EINVAL);
 
-   if (attach->sgt)
-   return attach->sgt;
-
-   sg_table = attach->dmabuf->ops->map_dma_buf(attach, direction);
+   reservation_object_lock(attach->dmabuf->resv, NULL);
+   sg_table = dma_buf_map_attachment_locked(attach, direction);
+   reservation_object_unlock(attach->dmabuf->resv);
if (!sg_table)
sg_table = ERR_PTR(-ENOMEM);
 
@@ -742,11 +741,9 @@ void dma_buf_unmap_attachment(struct dma_buf_attachment 
*attach,
if (WARN_ON(!attach || !attach->dmabuf || !sg_table))
return;
 
-   if (attach->sgt == sg_table)
-   return;
-
-   attach->dmabuf->ops->unmap_dma_buf(attach, sg_table,
-   direction);
+   reservation_object_lock(attach->dmabuf->resv, NULL);
+   dma_buf_unmap_attachment_locked(attach, sg_table, direction);
+   reservation_object_unlock(attach->dmabuf->resv);
 }
 EXPORT_SYMBOL_GPL(dma_buf_unmap_attachment);
 
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
index a40f8f586a95..e964077a7e7e 100644
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
@@ -128,6 +128,9 @@ struct dma_buf_ops {
 * any other kind of sharing that the exporter might wish to make
 * available to buffer-users.
 *
+* This is always called with the dmabuf->resv object locked when
+* no_sgt_cache is true.
+*
 * Returns:
 *
 * A &sg_table scatter list of or the backing storage of the DMA buffer,
@@ -148,6 +151,9 @@ struct dma_buf_ops {
 * It should also unpin the backing storage if this is the last mapping
 * of the DMA buffer, it the exporter supports backing storage
 * migration.
+*
+* This is always called with the dmabuf->resv object locked when
+* no_sgt_cache is true.
 */
void (*unmap_dma_buf)(struct dma_buf_attachment *,
  struct sg_table *,
-- 
2.14.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 series starting with [1/3] drm: Extract __setplane_check() (rev3)

2018-07-06 Thread Patchwork
== Series Details ==

Series: series starting with [1/3] drm: Extract __setplane_check() (rev3)
URL   : https://patchwork.freedesktop.org/series/45589/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4438_full -> Patchwork_9557_full =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_9557_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_9557_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_9557_full:

  === IGT changes ===

 Warnings 

igt@gem_exec_schedule@deep-blt:
  shard-kbl:  PASS -> SKIP +1

igt@gem_mocs_settings@mocs-rc6-bsd1:
  shard-kbl:  SKIP -> PASS +1


== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@drv_suspend@shrink:
  shard-snb:  PASS -> FAIL (fdo#106886)

igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
  shard-glk:  PASS -> FAIL (fdo#106509, fdo#105454)

igt@kms_flip@flip-vs-expired-vblank:
  shard-glk:  PASS -> FAIL (fdo#105363)

igt@kms_flip@plain-flip-ts-check-interruptible:
  shard-glk:  PASS -> FAIL (fdo#100368) +1

igt@kms_flip_tiling@flip-x-tiled:
  shard-glk:  PASS -> FAIL (fdo#103822)

igt@perf@polling:
  shard-hsw:  PASS -> FAIL (fdo#102252)


 Possible fixes 

igt@kms_flip@2x-plain-flip-fb-recreate:
  shard-glk:  FAIL (fdo#100368) -> PASS

igt@kms_flip_tiling@flip-to-x-tiled:
  shard-glk:  FAIL (fdo#103822) -> PASS

igt@kms_flip_tiling@flip-to-y-tiled:
  shard-glk:  FAIL -> PASS


 Warnings 

igt@drv_selftest@live_gtt:
  shard-glk:  FAIL (fdo#107127, fdo#105347) -> INCOMPLETE 
(fdo#107127, k.org#198133, fdo#103359)


  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
  fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454
  fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
  fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
  fdo#107127 https://bugs.freedesktop.org/show_bug.cgi?id=107127
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

* Linux: CI_DRM_4438 -> Patchwork_9557

  CI_DRM_4438: b689733af687b4b8072fb62a6bfe267c4e888f5f @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4539: 8b3cc74c6911e9b2835fe6e160f84bae463a70ef @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9557: 215528772d4d5228da89cf104c87690a631b5c6d @ 
git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ 
git://anongit.freedesktop.org/piglit

== Logs ==

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


[Intel-gfx] [PATCH 2/2] drm/i915/selftests: Fixup missing MI_MEM_VIRTUAL for live_hangcheck

2018-07-06 Thread Chris Wilson
We always want to use a virtual address (i.e. use the GTT) for
MI_STORE_DWORD_IMM, but forgot the ever so important flag in
live_hangcheck for gen3.

Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c 
b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
index 0fc6da81f86e..c838f7d08cb9 100644
--- a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
+++ b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
@@ -184,7 +184,7 @@ static int emit_recurse_batch(struct hang *h,
*batch++ = MI_BATCH_BUFFER_START | 2 << 6;
*batch++ = lower_32_bits(vma->node.start);
} else {
-   *batch++ = MI_STORE_DWORD_IMM;
+   *batch++ = MI_STORE_DWORD_IMM | MI_MEM_VIRTUAL;
*batch++ = lower_32_bits(hws_address(hws, rq));
*batch++ = rq->fence.seqno;
*batch++ = MI_ARB_CHECK;
-- 
2.18.0

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


[Intel-gfx] [PATCH 1/2] drm/i915/selftests: Replace magic 1<<22 with MI_USE_GGTT/MI_MEM_VIRTUAL

2018-07-06 Thread Chris Wilson
Replace the magic bit with the proper symbolic name for instructing
MI_STORE_DWORD_IMM to use a virtual address (on gen3) or the global GTT
address (still virtual!) on gen4+.

Signed-off-by: Chris Wilson 
---
 drivers/gpu/drm/i915/selftests/huge_pages.c | 4 ++--
 drivers/gpu/drm/i915/selftests/i915_gem_coherency.c | 4 ++--
 drivers/gpu/drm/i915/selftests/i915_gem_context.c   | 4 ++--
 drivers/gpu/drm/i915/selftests/intel_hangcheck.c| 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/selftests/huge_pages.c 
b/drivers/gpu/drm/i915/selftests/huge_pages.c
index 1193dd36913a..ab662dabcff7 100644
--- a/drivers/gpu/drm/i915/selftests/huge_pages.c
+++ b/drivers/gpu/drm/i915/selftests/huge_pages.c
@@ -919,12 +919,12 @@ gpu_write_dw(struct i915_vma *vma, u64 offset, u32 val)
*cmd++ = val;
} else if (gen >= 4) {
*cmd++ = MI_STORE_DWORD_IMM_GEN4 |
-   (gen < 6 ? 1 << 22 : 0);
+   (gen < 6 ? MI_USE_GGTT : 0);
*cmd++ = 0;
*cmd++ = offset;
*cmd++ = val;
} else {
-   *cmd++ = MI_STORE_DWORD_IMM | 1 << 22;
+   *cmd++ = MI_STORE_DWORD_IMM | MI_MEM_VIRTUAL;
*cmd++ = offset;
*cmd++ = val;
}
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c 
b/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
index cb9eef1635e1..294c58aba2c1 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
@@ -210,12 +210,12 @@ static int gpu_set(struct drm_i915_gem_object *obj,
*cs++ = upper_32_bits(i915_ggtt_offset(vma) + offset);
*cs++ = v;
} else if (INTEL_GEN(i915) >= 4) {
-   *cs++ = MI_STORE_DWORD_IMM_GEN4 | 1 << 22;
+   *cs++ = MI_STORE_DWORD_IMM_GEN4 | MI_USE_GGTT;
*cs++ = 0;
*cs++ = i915_ggtt_offset(vma) + offset;
*cs++ = v;
} else {
-   *cs++ = MI_STORE_DWORD_IMM | 1 << 22;
+   *cs++ = MI_STORE_DWORD_IMM | MI_MEM_VIRTUAL;
*cs++ = i915_ggtt_offset(vma) + offset;
*cs++ = v;
*cs++ = MI_NOOP;
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_context.c 
b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
index 0d8e719802fa..65100d3e31cf 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_context.c
@@ -63,12 +63,12 @@ gpu_fill_dw(struct i915_vma *vma, u64 offset, unsigned long 
count, u32 value)
*cmd++ = value;
} else if (gen >= 4) {
*cmd++ = MI_STORE_DWORD_IMM_GEN4 |
-   (gen < 6 ? 1 << 22 : 0);
+   (gen < 6 ? MI_USE_GGTT : 0);
*cmd++ = 0;
*cmd++ = offset;
*cmd++ = value;
} else {
-   *cmd++ = MI_STORE_DWORD_IMM | 1 << 22;
+   *cmd++ = MI_STORE_DWORD_IMM | MI_MEM_VIRTUAL;
*cmd++ = offset;
*cmd++ = value;
}
diff --git a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c 
b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
index 5cb808dc5b50..0fc6da81f86e 100644
--- a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
+++ b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
@@ -171,7 +171,7 @@ static int emit_recurse_batch(struct hang *h,
*batch++ = MI_BATCH_BUFFER_START | 1 << 8;
*batch++ = lower_32_bits(vma->node.start);
} else if (INTEL_GEN(i915) >= 4) {
-   *batch++ = MI_STORE_DWORD_IMM_GEN4 | 1 << 22;
+   *batch++ = MI_STORE_DWORD_IMM_GEN4 | MI_USE_GGTT;
*batch++ = 0;
*batch++ = lower_32_bits(hws_address(hws, rq));
*batch++ = rq->fence.seqno;
-- 
2.18.0

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


Re: [Intel-gfx] [PATCH 4/4] drm/i915/intel_dsi: Read back pclk set by GOP and use that as pclk

2018-07-06 Thread Ville Syrjälä
On Tue, Jun 19, 2018 at 10:18:27PM +0200, Hans de Goede wrote:
> On BYT and CHT the GOP sometimes initializes the pclk at a (slightly)
> different frequency then the pclk which we've calculated.
> 
> This commit makes the DSI code read-back the pclk set by the GOP and
> if that is within a reasonable margin of the calculated pclk, uses
> that instead.
> 
> This fixes the first modeset being a full modeset instead of a
> fast modeset on systems where the GOP pclk is different.
> 
> Signed-off-by: Hans de Goede 
> ---
>  drivers/gpu/drm/i915/intel_dsi_vbt.c | 14 ++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dsi_vbt.c 
> b/drivers/gpu/drm/i915/intel_dsi_vbt.c
> index 4d6ffa7b3e7b..d4cc6099012c 100644
> --- a/drivers/gpu/drm/i915/intel_dsi_vbt.c
> +++ b/drivers/gpu/drm/i915/intel_dsi_vbt.c
> @@ -517,6 +517,7 @@ bool intel_dsi_vbt_init(struct intel_dsi *intel_dsi, u16 
> panel_id)
>   u32 mul;
>   u16 burst_mode_ratio;
>   enum port port;
> + enum pipe pipe;
>  
>   DRM_DEBUG_KMS("\n");
>  
> @@ -583,6 +584,19 @@ bool intel_dsi_vbt_init(struct intel_dsi *intel_dsi, u16 
> panel_id)
>   } else
>   burst_mode_ratio = 100;
>  
> + /*
> +  * On BYT / CRC the GOP sometimes picks a slightly different pclk,
> +  * read back the GOP configured pclk and prefer it over ours.
> +  */
> + if ((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
> + intel_dsi_get_hw_state(&intel_dsi->base, &pipe)) {
> + u32 gop = intel_dsi_get_pclk(&intel_dsi->base, bpp, NULL);
> +
> + DRM_DEBUG_KMS("Calculated pclk %d GOP %d\n", pclk, gop);
> + if (gop >= (pclk * 9 / 10) && gop <= (pclk * 11 / 10))
> + pclk = gop;
> + }

Is the gop acually picking a different clock that what we pick in the
end, or is it just that the value in the vbt doesn't quite match what we
(and the gop) end up using on account of limitations of the pll?

For that particular problem I think I had patches long ago to go through
the pll computation during init so that we basically fix up the slightly
bogus clock from the vbt.

Any kind of hack that involves reading out the hardware state should go
into something like intel_sanitize_encoder(). Actually by that time we
have already read out the hw state, so it shouldn't require any
modifications to the existing dsi code itself.

> +
>   intel_dsi->burst_mode_ratio = burst_mode_ratio;
>   intel_dsi->pclk = pclk;
>  
> -- 
> 2.17.1

-- 
Ville Syrjälä
Intel
___
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/psr: Split sink status into a separate debugfs node

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915/psr: Split sink status into a separate debugfs node
URL   : https://patchwork.freedesktop.org/series/45952/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4438_full -> Patchwork_9555_full =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_9555_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_9555_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_9555_full:

  === IGT changes ===

 Warnings 

igt@gem_mocs_settings@mocs-rc6-blt:
  shard-kbl:  PASS -> SKIP +2

igt@gem_mocs_settings@mocs-rc6-bsd1:
  shard-kbl:  SKIP -> PASS +1


== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@kms_flip@wf_vblank-ts-check:
  shard-glk:  PASS -> FAIL (fdo#100368)

igt@kms_flip_tiling@flip-y-tiled:
  shard-glk:  PASS -> FAIL (fdo#103822)

igt@kms_rotation_crc@sprite-rotation-180:
  shard-hsw:  PASS -> FAIL (fdo#103925)

igt@kms_setmode@basic:
  shard-apl:  PASS -> FAIL (fdo#99912)


 Possible fixes 

igt@kms_flip@2x-plain-flip-ts-check:
  shard-glk:  FAIL (fdo#100368) -> PASS

igt@kms_flip_tiling@flip-to-y-tiled:
  shard-glk:  FAIL -> PASS


 Warnings 

igt@drv_selftest@live_gtt:
  shard-kbl:  INCOMPLETE (fdo#107127, fdo#103665) -> FAIL 
(fdo#107127, fdo#105347)


  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
  fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
  fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347
  fdo#107127 https://bugs.freedesktop.org/show_bug.cgi?id=107127
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

* Linux: CI_DRM_4438 -> Patchwork_9555

  CI_DRM_4438: b689733af687b4b8072fb62a6bfe267c4e888f5f @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4539: 8b3cc74c6911e9b2835fe6e160f84bae463a70ef @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9555: 1fa6ece46478fac57189bac261cece9348ba807e @ 
git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ 
git://anongit.freedesktop.org/piglit

== Logs ==

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


Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] igt/gem_pwrite_pread: Requires GEM

2018-07-06 Thread Tvrtko Ursulin


On 04/07/2018 15:38, Chris Wilson wrote:

Mark up gem_pwrite_pread's dependence on a functioning GPU, by calling
igt_require_gem in its setup fixture.

Signed-off-by: Chris Wilson 
---
  tests/gem_pwrite_pread.c   | 1 +
  tests/gem_tiled_partial_pwrite_pread.c | 1 +
  2 files changed, 2 insertions(+)

diff --git a/tests/gem_pwrite_pread.c b/tests/gem_pwrite_pread.c
index 383a57f72..f91fc7c4f 100644
--- a/tests/gem_pwrite_pread.c
+++ b/tests/gem_pwrite_pread.c
@@ -272,6 +272,7 @@ int main(int argc, char **argv)
uint32_t devid;
  
  		fd = drm_open_driver(DRIVER_INTEL);

+   igt_require_gem(fd);
  
  		dst = gem_create(fd, object_size);

src = gem_create(fd, object_size);
diff --git a/tests/gem_tiled_partial_pwrite_pread.c 
b/tests/gem_tiled_partial_pwrite_pread.c
index fe573c37c..39779dbed 100644
--- a/tests/gem_tiled_partial_pwrite_pread.c
+++ b/tests/gem_tiled_partial_pwrite_pread.c
@@ -259,6 +259,7 @@ igt_main
  
  	igt_fixture {

fd = drm_open_driver(DRIVER_INTEL);
+   igt_require_gem(fd);
  
  		bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);

//drm_intel_bufmgr_gem_enable_reuse(bufmgr);



Reviewed-by: Tvrtko Ursulin 

Regards,

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


Re: [Intel-gfx] [PATCH 17/27] drm/i915: Replace nested subclassing with explicit subclasses

2018-07-06 Thread Tvrtko Ursulin


On 06/07/2018 07:53, Chris Wilson wrote:

In the next patch, we will want a third distinct class of timeline that
may overlap with the current pair of client and engine timeline classes.
Rather than use the ad hoc markup of SINGLE_DEPTH_NESTING, initialise
the different timeline classes with an explicit subclass.

Signed-off-by: Chris Wilson 
---
  drivers/gpu/drm/i915/i915_gem.c  | 2 +-
  drivers/gpu/drm/i915/i915_request.c  | 2 +-
  drivers/gpu/drm/i915/i915_timeline.h | 2 ++
  drivers/gpu/drm/i915/intel_engine_cs.c   | 1 +
  drivers/gpu/drm/i915/selftests/mock_engine.c | 2 ++
  5 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index f516c289647c..dabe58c8ab03 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3091,7 +3091,7 @@ static void engine_skip_context(struct i915_request 
*request)
GEM_BUG_ON(timeline == &engine->timeline);
  
  	spin_lock_irqsave(&engine->timeline.lock, flags);

-   spin_lock_nested(&timeline->lock, SINGLE_DEPTH_NESTING);
+   spin_lock(&timeline->lock);
  
  	list_for_each_entry_continue(request, &engine->timeline.requests, link)

if (request->gem_context == hung_ctx)
diff --git a/drivers/gpu/drm/i915/i915_request.c 
b/drivers/gpu/drm/i915/i915_request.c
index 7ae08b68121e..3248369dbcfb 100644
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
@@ -503,7 +503,7 @@ static void move_to_timeline(struct i915_request *request,
GEM_BUG_ON(request->timeline == &request->engine->timeline);
lockdep_assert_held(&request->engine->timeline.lock);
  
-	spin_lock_nested(&request->timeline->lock, SINGLE_DEPTH_NESTING);

+   spin_lock(&request->timeline->lock);
list_move_tail(&request->link, &timeline->requests);
spin_unlock(&request->timeline->lock);
  }
diff --git a/drivers/gpu/drm/i915/i915_timeline.h 
b/drivers/gpu/drm/i915/i915_timeline.h
index dc2a4632faa7..a2c2c3ab5fb0 100644
--- a/drivers/gpu/drm/i915/i915_timeline.h
+++ b/drivers/gpu/drm/i915/i915_timeline.h
@@ -37,6 +37,8 @@ struct i915_timeline {
u32 seqno;
  
  	spinlock_t lock;

+#define TIMELINE_CLIENT 0 /* default subclass */
+#define TIMELINE_ENGINE 1
  
  	/**

 * List of breadcrumbs associated with GPU requests currently
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c 
b/drivers/gpu/drm/i915/intel_engine_cs.c
index 478c928912c4..d9bdc674ab38 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -481,6 +481,7 @@ static void intel_engine_init_execlist(struct 
intel_engine_cs *engine)
  void intel_engine_setup_common(struct intel_engine_cs *engine)
  {
i915_timeline_init(engine->i915, &engine->timeline, engine->name);
+   lockdep_set_subclass(&engine->timeline.lock, TIMELINE_ENGINE);
  
  	intel_engine_init_execlist(engine);

intel_engine_init_hangcheck(engine);
diff --git a/drivers/gpu/drm/i915/selftests/mock_engine.c 
b/drivers/gpu/drm/i915/selftests/mock_engine.c
index c2a0451336cf..22a73da45ad5 100644
--- a/drivers/gpu/drm/i915/selftests/mock_engine.c
+++ b/drivers/gpu/drm/i915/selftests/mock_engine.c
@@ -200,6 +200,8 @@ struct intel_engine_cs *mock_engine(struct drm_i915_private 
*i915,
engine->base.submit_request = mock_submit_request;
  
  	i915_timeline_init(i915, &engine->base.timeline, engine->base.name);

+   lockdep_set_subclass(&engine->base.timeline.lock, TIMELINE_ENGINE);
+
intel_engine_init_breadcrumbs(&engine->base);
engine->base.breadcrumbs.mock = true; /* prevent touching HW for irqs */
  



Reviewed-by: Tvrtko Ursulin 

Regards,

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


Re: [Intel-gfx] [PATCH 0/4] drm/i915/intel_dsi: Read back and use pclk set by the GOP

2018-07-06 Thread Jani Nikula
On Fri, 29 Jun 2018, Hans de Goede  wrote:
> Hi,
>
> On 19-06-18 22:18, Hans de Goede wrote:
>> Hi All,
>> 
>> This patch-set is the result of the work I've been doing recently to
>> give people a smooth "flickerfree" boot experience where the display
>> keeps displaying the logo put there by the firmware until it smoothly
>> fades into the Linux GUI (e.g. gdm).
>> 
>> While testing this on some BYT/CHT devices I noticed the screen going
>> black for 1 second or so, because the first modeset was not a fast
>> modeset despite passing i915.fastboot=1 on the kernel commandline.
>> 
>> This is caused by the GOP and the i915 code differing in what they
>> think the DSI pclk should be. This patch-set fixes this by reading
>> back the pclk set by the GOP and if it is reasonably close to the
>> clk calculated by the i915 code, using the GOP set pclk.
>
> Ping? A review of this series would be appreciated.

Sorry, swamped, and I was hoping Ville would chime in. ;)

The first two patches are trivial, ack. But I'd really like to know what
the GOP is doing, and why we're different. Not sure if that's possible.

I'm afraid after much bikeshedding there were some file and function
renames, and no matter what this series needs a rebase. See [1]. Sorry
about the extra effort this causes; I truly appreciate your efforts with
the DSI code, and I regret I haven't given this series the love it
needs.

BR,
Jani.

[1] https://patchwork.freedesktop.org/series/45984/


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


Re: [Intel-gfx] [PATCH] drm/i915/selftests: Limit live_gtt allocation test to fit within RAM

2018-07-06 Thread Matthew Auld
On 6 July 2018 at 13:53, Chris Wilson  wrote:
> Limit the GTT size we try and allocate to ensure that it fits within RAM
> and does not trigger the oomkiller indiscriminately.
>
> Signed-off-by: Chris Wilson 
> Cc: Matthew Auld 
Reviewed-by: Matthew Auld 
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/crc: Only report a single overflow when a CRC fd is opened

2018-07-06 Thread Maarten Lankhorst
Op 18-04-18 om 17:37 schreef Ville Syrjälä:
> On Wed, Apr 18, 2018 at 02:51:21PM +0200, Maarten Lankhorst wrote:
>> This reduces the amount of spam when you debug a CRC reading
>> program.
>>
>> Signed-off-by: Maarten Lankhorst 
>> ---
>>  drivers/gpu/drm/drm_debugfs_crc.c | 9 -
>>  include/drm/drm_debugfs_crc.h | 3 ++-
>>  2 files changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_debugfs_crc.c 
>> b/drivers/gpu/drm/drm_debugfs_crc.c
>> index 9f8312137cad..5a052c511e62 100644
>> --- a/drivers/gpu/drm/drm_debugfs_crc.c
>> +++ b/drivers/gpu/drm/drm_debugfs_crc.c
>> @@ -139,6 +139,7 @@ static int crtc_crc_data_count(struct drm_crtc_crc *crc)
>>  static void crtc_crc_cleanup(struct drm_crtc_crc *crc)
>>  {
>>  kfree(crc->entries);
>> +crc->overflow = false;
>>  crc->entries = NULL;
>>  crc->head = 0;
>>  crc->tail = 0;
>> @@ -391,8 +392,14 @@ int drm_crtc_add_crc_entry(struct drm_crtc *crtc, bool 
>> has_frame,
>>  tail = crc->tail;
>>  
>>  if (CIRC_SPACE(head, tail, DRM_CRC_ENTRIES_NR) < 1) {
>> +bool overflow = crc->overflow;
> 'was_overflow' or something to indicate this is the old value?
>
>> +
>> +crc->overflow = true;
>>  spin_unlock(&crc->lock);
>> -DRM_ERROR("Overflow of CRC buffer, userspace reads too 
>> slow.\n");
>> +
>> +if (!overflow)
>> +DRM_ERROR("Overflow of CRC buffer, userspace reads too 
>> slow.\n");
> would make this a bit less confusing perhaps. Now it reads as
> "if (no overflow) DRM_ERROR("we have an overflow");" which makes no
> sense on the first glance.
>
> Apart from that
> Reviewed-by: Ville Syrjälä 
Thanks, fixed and pushed to drm-misc-next. :)
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/ddi: Simplify get_encoder_power_domains()

2018-07-06 Thread Imre Deak
On Thu, Jul 05, 2018 at 04:33:50PM +, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915/ddi: Simplify get_encoder_power_domains()
> URL   : https://patchwork.freedesktop.org/series/45980/
> State : success

Pushed to -dinq, thanks for the review.

> 
> == Summary ==
> 
> = CI Bug Log - changes from CI_DRM_4431_full -> Patchwork_9537_full =
> 
> == Summary - WARNING ==
> 
>   Minor unknown changes coming with Patchwork_9537_full need to be verified
>   manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_9537_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_9537_full:
> 
>   === IGT changes ===
> 
>  Warnings 
> 
> igt@gem_exec_schedule@deep-bsd2:
>   shard-kbl:  PASS -> SKIP +2
> 
> igt@gem_mocs_settings@mocs-rc6-vebox:
>   shard-kbl:  SKIP -> PASS +2
> 
> 
> == Known issues ==
> 
>   Here are the changes found in Patchwork_9537_full that come from known 
> issues:
> 
>   === IGT changes ===
> 
>  Issues hit 
> 
> igt@drv_selftest@live_gtt:
>   shard-glk:  PASS -> FAIL (fdo#107127, fdo#105347)
> 
> igt@gem_softpin@noreloc-s3:
>   shard-glk:  PASS -> FAIL (fdo#103375)
> 
> igt@kms_cursor_legacy@cursora-vs-flipb-toggle:
>   shard-glk:  PASS -> FAIL (fdo#106765)
> 
> igt@kms_flip@2x-plain-flip-ts-check:
>   shard-glk:  PASS -> FAIL (fdo#100368)
> 
> igt@kms_flip_tiling@flip-to-x-tiled:
>   shard-glk:  PASS -> FAIL (fdo#103822) +1
> 
> igt@kms_setmode@basic:
>   shard-kbl:  PASS -> FAIL (fdo#99912)
> 
> igt@perf_pmu@other-read-4:
>   shard-snb:  PASS -> INCOMPLETE (fdo#105411)
> 
> 
>  Possible fixes 
> 
> igt@drv_suspend@shrink:
>   shard-kbl:  INCOMPLETE (fdo#103665, fdo#106886) -> PASS
> 
> igt@kms_chv_cursor_fail@pipe-a-64x64-left-edge:
>   shard-kbl:  FAIL (fdo#104671) -> PASS
> 
> igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
>   shard-hsw:  FAIL (fdo#105767) -> PASS
> 
> igt@kms_flip_tiling@flip-to-y-tiled:
>   shard-glk:  FAIL -> PASS
> 
> igt@kms_flip_tiling@flip-x-tiled:
>   shard-glk:  FAIL (fdo#103822) -> PASS
> 
> igt@kms_setmode@basic:
>   shard-apl:  FAIL (fdo#99912) -> PASS
> 
> igt@perf@rc6-disable:
>   shard-kbl:  FAIL (fdo#103179) -> PASS
> 
> 
>  Warnings 
> 
> igt@drv_selftest@live_gtt:
>   shard-apl:  INCOMPLETE (fdo#103927) -> FAIL (fdo#107127, 
> fdo#105347)
> 
> 
>   fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
>   fdo#103179 https://bugs.freedesktop.org/show_bug.cgi?id=103179
>   fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
>   fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
>   fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
>   fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
>   fdo#104671 https://bugs.freedesktop.org/show_bug.cgi?id=104671
>   fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347
>   fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
>   fdo#105767 https://bugs.freedesktop.org/show_bug.cgi?id=105767
>   fdo#106765 https://bugs.freedesktop.org/show_bug.cgi?id=106765
>   fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
>   fdo#107127 https://bugs.freedesktop.org/show_bug.cgi?id=107127
>   fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
> 
> 
> == Participating hosts (5 -> 5) ==
> 
>   No changes in participating hosts
> 
> 
> == Build changes ==
> 
> * Linux: CI_DRM_4431 -> Patchwork_9537
> 
>   CI_DRM_4431: b9bf725e2d248638a834b4b4db5b684098216b86 @ 
> git://anongit.freedesktop.org/gfx-ci/linux
>   IGT_4537: 5a160e9e1fe19c67e58e9c298303cb94c96aeb7d @ 
> git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
>   Patchwork_9537: a91699cb337092c140ca4433445fa66e48d93ded @ 
> git://anongit.freedesktop.org/gfx-ci/linux
>   piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ 
> git://anongit.freedesktop.org/piglit
> 
> == Logs ==
> 
> For more details see: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9537/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: Flush the WCB following a WC write

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915: Flush the WCB following a WC write
URL   : https://patchwork.freedesktop.org/series/46070/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_ -> Patchwork_9566 =

== Summary - SUCCESS ==

  No regressions found.

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

== Possible new issues ==

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

  === IGT changes ===

 Warnings 

igt@gem_exec_suspend@basic-s4-devices:
  {fi-kbl-8809g}: INCOMPLETE -> DMESG-WARN


== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@kms_frontbuffer_tracking@basic:
  fi-hsw-peppy:   PASS -> DMESG-FAIL (fdo#102614, fdo#106103)


 Possible fixes 

igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
  fi-bxt-dsi: INCOMPLETE (fdo#103927) -> PASS


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

  fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103


== Participating hosts (47 -> 42) ==

  Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 
fi-hsw-4200u 


== Build changes ==

* Linux: CI_DRM_ -> Patchwork_9566

  CI_DRM_: b153ce72348cbf6639dc5bd8e5e1bb0c180e9b86 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4540: 78071c2fa53db2f04b8eddc6e6118be4fbc5c2fe @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9566: 1442df0746feea3a7b77ee05f010c728b012d782 @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

1442df0746fe drm/i915: Flush the WCB following a WC write

== Logs ==

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


Re: [Intel-gfx] [PATCH 2/2] drm/i915/gtt: Control cache domain of dma_map_page() directly

2018-07-06 Thread Matthew Auld
On 6 July 2018 at 13:26, Chris Wilson  wrote:
> We already maually control the CPU cache for our page table directories,
> so we can tell the dma mapper to skip doing it as well.
>
> Signed-off-by: Chris Wilson 
> Cc: Matthew Auld 
Reviewed-by: Matthew Auld 
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915/selftests: Limit live_gtt allocation test to fit within RAM

2018-07-06 Thread Chris Wilson
Limit the GTT size we try and allocate to ensure that it fits within RAM
and does not trigger the oomkiller indiscriminately.

Signed-off-by: Chris Wilson 
Cc: Matthew Auld 
---
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 20 ---
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c 
b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
index e108fe4e0fd9..600a3bcbd3d6 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
@@ -148,7 +148,7 @@ static int igt_ppgtt_alloc(void *arg)
 {
struct drm_i915_private *dev_priv = arg;
struct i915_hw_ppgtt *ppgtt;
-   u64 size, last;
+   u64 size, last, limit;
int err = 0;
 
/* Allocate a ppggt and try to fill the entire range */
@@ -163,10 +163,18 @@ static int igt_ppgtt_alloc(void *arg)
if (!ppgtt->vm.allocate_va_range)
goto err_ppgtt_cleanup;
 
+   /*
+* While we only allocate the page tables here and so we could
+* address a much larger GTT than we could actually fit into
+* RAM, a practical limit is the amount of physical pages in the system.
+* This should ensure that we do not run into the oomkiller during
+* the test and take down the machine wilfully.
+*/
+   limit = totalram_pages << PAGE_SHIFT;
+   limit = min(ppgtt->vm.total, limit);
+
/* Check we can allocate the entire range */
-   for (size = 4096;
-size <= ppgtt->vm.total;
-size <<= 2) {
+   for (size = 4096; size <= limit; size <<= 2) {
err = ppgtt->vm.allocate_va_range(&ppgtt->vm, 0, size);
if (err) {
if (err == -ENOMEM) {
@@ -183,9 +191,7 @@ static int igt_ppgtt_alloc(void *arg)
}
 
/* Check we can incrementally allocate the entire range */
-   for (last = 0, size = 4096;
-size <= ppgtt->vm.total;
-last = size, size <<= 2) {
+   for (last = 0, size = 4096; size <= limit; last = size, size <<= 2) {
err = ppgtt->vm.allocate_va_range(&ppgtt->vm,
  last, size - last);
if (err) {
-- 
2.18.0

___
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/selftests: Destroy partial tiling vma after use

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915/selftests: Destroy partial tiling vma after use
URL   : https://patchwork.freedesktop.org/series/46031/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4438_full -> Patchwork_9554_full =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_9554_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_9554_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_9554_full:

  === IGT changes ===

 Possible regressions 

igt@kms_flip_tiling@flip-x-tiled:
  shard-glk:  PASS -> FAIL


 Warnings 

igt@gem_exec_schedule@deep-bsd2:
  shard-kbl:  PASS -> SKIP +1


== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
  shard-glk:  PASS -> FAIL (fdo#105703) +1

igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy:
  shard-glk:  PASS -> FAIL (fdo#106765)

igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic:
  shard-glk:  PASS -> FAIL (fdo#104873)

igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
  shard-glk:  PASS -> FAIL (fdo#106509, fdo#105454)

igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
  shard-glk:  PASS -> FAIL (fdo#105189)

igt@kms_flip@flip-vs-expired-vblank:
  shard-glk:  PASS -> FAIL (fdo#105363)


 Possible fixes 

igt@drv_selftest@live_gtt:
  shard-apl:  FAIL (fdo#105347, fdo#107127) -> PASS

igt@kms_flip@2x-plain-flip-fb-recreate:
  shard-glk:  FAIL (fdo#100368) -> PASS

igt@kms_flip_tiling@flip-to-x-tiled:
  shard-glk:  FAIL (fdo#103822) -> PASS

igt@kms_setmode@basic:
  shard-kbl:  FAIL (fdo#99912) -> PASS


 Warnings 

igt@drv_selftest@live_gtt:
  shard-kbl:  INCOMPLETE (fdo#107127, fdo#103665) -> FAIL 
(fdo#105347, fdo#107127)
  shard-glk:  FAIL (fdo#105347, fdo#107127) -> INCOMPLETE 
(fdo#103359, fdo#107127, k.org#198133)


  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
  fdo#104873 https://bugs.freedesktop.org/show_bug.cgi?id=104873
  fdo#105189 https://bugs.freedesktop.org/show_bug.cgi?id=105189
  fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454
  fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703
  fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
  fdo#106765 https://bugs.freedesktop.org/show_bug.cgi?id=106765
  fdo#107127 https://bugs.freedesktop.org/show_bug.cgi?id=107127
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

* Linux: CI_DRM_4438 -> Patchwork_9554

  CI_DRM_4438: b689733af687b4b8072fb62a6bfe267c4e888f5f @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4539: 8b3cc74c6911e9b2835fe6e160f84bae463a70ef @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9554: d26cbc23026fe71fd1c574c96a808b6cc7876c06 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ 
git://anongit.freedesktop.org/piglit

== Logs ==

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


[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Flush the WCB following a WC write

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915: Flush the WCB following a WC write
URL   : https://patchwork.freedesktop.org/series/46070/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
1442df0746fe drm/i915: Flush the WCB following a WC write
-:25: WARNING:MEMORY_BARRIER: memory barrier without comment
#25: FILE: drivers/gpu/drm/i915/i915_gem.c:841:
+   wmb();

total: 0 errors, 1 warnings, 0 checks, 10 lines checked

___
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/selftests: Skip live_execlists if the GPU is terminally wedged

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915/selftests: Skip live_execlists if the GPU is terminally wedged
URL   : https://patchwork.freedesktop.org/series/46069/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_ -> Patchwork_9565 =

== Summary - SUCCESS ==

  No regressions found.

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

== Known issues ==

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

  === IGT changes ===

 Possible fixes 

igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
  fi-bxt-dsi: INCOMPLETE (fdo#103927) -> PASS


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


== Participating hosts (47 -> 42) ==

  Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 
fi-hsw-4200u 


== Build changes ==

* Linux: CI_DRM_ -> Patchwork_9565

  CI_DRM_: b153ce72348cbf6639dc5bd8e5e1bb0c180e9b86 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4540: 78071c2fa53db2f04b8eddc6e6118be4fbc5c2fe @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9565: 73d62b8b7b7f86fa9d4ba0517b42dcfab85a07c9 @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

73d62b8b7b7f drm/i915/selftests: Skip live_execlists if the GPU is terminally 
wedged

== Logs ==

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


Re: [Intel-gfx] [PATCH 1/2] drm/i915/gtt: Suppress warnings for dma_map_page

2018-07-06 Thread Matthew Auld
On 6 July 2018 at 13:26, Chris Wilson  wrote:
> As we propagate back the error to the caller for them to handle, we do
> not need the lowest level spitting out a redundant warning upon an
> allocation failure inside dma_map_page().
>
> Signed-off-by: Chris Wilson 
> Cc: Matthew Auld 
Reviewed-by: Matthew Auld 
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Flush the WCB following a WC write

2018-07-06 Thread Tvrtko Ursulin


On 06/07/2018 12:54, Chris Wilson wrote:

If we have just completed a WC write, we must ensure that the WCB (Write
Combining Buffer) is flushed out to main memory before we can expect to
see the results. This is especially important when mixing WC with GTT as
the physical paths are different and cachelines are not naturally flushed.

Testcase: igt/drv_selftests/live_coherency #gdg
Signed-off-by: Chris Wilson 
---
  drivers/gpu/drm/i915/i915_gem.c | 4 
  1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 0c0a1a959d0b..be63e8bbb6d2 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -837,6 +837,10 @@ flush_write_domain(struct drm_i915_gem_object *obj, 
unsigned int flush_domains)
}
break;
  
+	case I915_GEM_DOMAIN_WC:

+   wmb();
+   break;
+
case I915_GEM_DOMAIN_CPU:
i915_gem_clflush_object(obj, I915_CLFLUSH_SYNC);
break;



Reviewed-by: Tvrtko Ursulin 

Regards,

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


[Intel-gfx] [PATCH v5] drm/i915: Track the last-active inside the i915_vma

2018-07-06 Thread Chris Wilson
Using a VMA on more than one timeline concurrently is the exception
rather than the rule (using it concurrently on multiple engines). As we
expect to only use one active tracker, store the most recently used
tracker inside the i915_vma itself and only fallback to the rbtree if
we need a second or more concurrent active trackers.

v2: Comments on how we overwrite any existing last_active cache.
v3: __list_del_entry() before list_replace_init() is confusing and, much
more important, entirely redundant.
v4: Note that both last_active and the rbtree may be simultaneously
tracking this timeline, albeit with different requests, and so the vma
may be retired twice for the same timeline.
v5: No, that list_del is required!

Signed-off-by: Chris Wilson 
Cc: Tvrtko Ursulin 
Reviewed-by: Tvrtko Ursulin 
---
 drivers/gpu/drm/i915/i915_vma.c | 58 +++--
 drivers/gpu/drm/i915/i915_vma.h |  1 +
 2 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index b4cc98330225..8943daa5c6e3 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -119,6 +119,12 @@ i915_vma_retire(struct i915_gem_active *base, struct 
i915_request *rq)
__i915_vma_retire(active->vma, rq);
 }
 
+static void
+i915_vma_last_retire(struct i915_gem_active *base, struct i915_request *rq)
+{
+   __i915_vma_retire(container_of(base, struct i915_vma, last_active), rq);
+}
+
 static struct i915_vma *
 vma_create(struct drm_i915_gem_object *obj,
   struct i915_address_space *vm,
@@ -136,6 +142,7 @@ vma_create(struct drm_i915_gem_object *obj,
 
vma->active = RB_ROOT;
 
+   init_request_active(&vma->last_active, i915_vma_last_retire);
init_request_active(&vma->last_fence, NULL);
vma->vm = vm;
vma->ops = &vm->vma_ops;
@@ -895,6 +902,29 @@ static struct i915_gem_active *active_instance(struct 
i915_vma *vma, u64 idx)
 {
struct i915_vma_active *active;
struct rb_node **p, *parent;
+   struct i915_request *old;
+
+   /*
+* We track the most recently used timeline to skip a rbtree search
+* for the common case, under typical loads we never need the rbtree
+* at all. We can reuse the last_active slot if it is empty, that is
+* after the previous activity has been retired, or if the active
+* matches the current timeline.
+*
+* Note that we allow the timeline to be active simultaneously in
+* the rbtree and the last_active cache. We do this to avoid having
+* to search and replace the rbtree element for a new timeline, with
+* the cost being that we must be aware that the vma may be retired
+* twice for the same timeline (as the older rbtree element will be
+* retired before the new request added to last_active).
+*/
+   old = i915_gem_active_raw(&vma->last_active,
+ &vma->vm->i915->drm.struct_mutex);
+   if (!old || old->fence.context == idx)
+   goto out;
+
+   /* Move the currently active fence into the rbtree */
+   idx = old->fence.context;
 
parent = NULL;
p = &vma->active.rb_node;
@@ -903,7 +933,7 @@ static struct i915_gem_active *active_instance(struct 
i915_vma *vma, u64 idx)
 
active = rb_entry(parent, struct i915_vma_active, node);
if (active->timeline == idx)
-   return &active->base;
+   goto replace;
 
if (active->timeline < idx)
p = &parent->rb_right;
@@ -922,7 +952,26 @@ static struct i915_gem_active *active_instance(struct 
i915_vma *vma, u64 idx)
rb_link_node(&active->node, parent, p);
rb_insert_color(&active->node, &vma->active);
 
-   return &active->base;
+replace:
+   /*
+* Overwrite the previous active slot in the rbtree with last_active,
+* leaving last_active zeroed. If the previous slot is still active,
+* we must be careful as we now only expect to recieve one retire
+* callback not two, and so much undo the active counting for the
+* overwritten slot.
+*/
+   if (i915_gem_active_isset(&active->base)) {
+   /* Retire ourselves from the old rq->active_list */
+   __list_del_entry(&active->base.link);
+   vma->active_count--;
+   GEM_BUG_ON(!vma->active_count);
+   }
+   GEM_BUG_ON(list_empty(&vma->last_active.link));
+   list_replace_init(&vma->last_active.link, &active->base.link);
+   active->base.request = fetch_and_zero(&vma->last_active.request);
+
+out:
+   return &vma->last_active;
 }
 
 int i915_vma_move_to_active(struct i915_vma *vma,
@@ -1002,6 +1051,11 @@ int i915_vma_unbind(struct i915_vma *vma)
 */
__i915_vma_pin(vma);
 
+   ret = i915_gem_active_retire

[Intel-gfx] [PATCH 2/2] drm/i915/gtt: Control cache domain of dma_map_page() directly

2018-07-06 Thread Chris Wilson
We already maually control the CPU cache for our page table directories,
so we can tell the dma mapper to skip doing it as well.

Signed-off-by: Chris Wilson 
Cc: Matthew Auld 
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c 
b/drivers/gpu/drm/i915/i915_gem_gtt.c
index ee881998a7d3..3b7a1437bfbf 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -564,6 +564,7 @@ static int __setup_page_dma(struct i915_address_space *vm,
p->daddr = dma_map_page_attrs(vm->dma,
  p->page, 0, PAGE_SIZE,
  PCI_DMA_BIDIRECTIONAL,
+ DMA_ATTR_SKIP_CPU_SYNC |
  DMA_ATTR_NO_WARN);
if (unlikely(dma_mapping_error(vm->dma, p->daddr))) {
vm_free_page(vm, p->page);
@@ -648,6 +649,7 @@ setup_scratch_page(struct i915_address_space *vm, gfp_t gfp)
addr = dma_map_page_attrs(vm->dma,
  page, 0, size,
  PCI_DMA_BIDIRECTIONAL,
+ DMA_ATTR_SKIP_CPU_SYNC |
  DMA_ATTR_NO_WARN);
if (unlikely(dma_mapping_error(vm->dma, addr)))
goto free_page;
-- 
2.18.0

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


[Intel-gfx] [PATCH 1/2] drm/i915/gtt: Suppress warnings for dma_map_page

2018-07-06 Thread Chris Wilson
As we propagate back the error to the caller for them to handle, we do
not need the lowest level spitting out a redundant warning upon an
allocation failure inside dma_map_page().

Signed-off-by: Chris Wilson 
Cc: Matthew Auld 
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c 
b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 2f10f5580230..ee881998a7d3 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -561,8 +561,10 @@ static int __setup_page_dma(struct i915_address_space *vm,
if (unlikely(!p->page))
return -ENOMEM;
 
-   p->daddr = dma_map_page(vm->dma, p->page, 0, PAGE_SIZE,
-   PCI_DMA_BIDIRECTIONAL);
+   p->daddr = dma_map_page_attrs(vm->dma,
+ p->page, 0, PAGE_SIZE,
+ PCI_DMA_BIDIRECTIONAL,
+ DMA_ATTR_NO_WARN);
if (unlikely(dma_mapping_error(vm->dma, p->daddr))) {
vm_free_page(vm, p->page);
return -ENOMEM;
@@ -643,8 +645,10 @@ setup_scratch_page(struct i915_address_space *vm, gfp_t 
gfp)
if (unlikely(!page))
goto skip;
 
-   addr = dma_map_page(vm->dma, page, 0, size,
-   PCI_DMA_BIDIRECTIONAL);
+   addr = dma_map_page_attrs(vm->dma,
+ page, 0, size,
+ PCI_DMA_BIDIRECTIONAL,
+ DMA_ATTR_NO_WARN);
if (unlikely(dma_mapping_error(vm->dma, addr)))
goto free_page;
 
-- 
2.18.0

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


Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/6] drm/i915: Refactor export_fence() after i915_vma_move_to_active()

2018-07-06 Thread Chris Wilson
Quoting Patchwork (2018-07-06 13:20:19)
> == Series Details ==
> 
> Series: series starting with [1/6] drm/i915: Refactor export_fence() after 
> i915_vma_move_to_active()
> URL   : https://patchwork.freedesktop.org/series/46067/
> State : failure
> 
> == Summary ==
> 
> = CI Bug Log - changes from CI_DRM_ -> Patchwork_9564 =
> 
> == Summary - FAILURE ==
> 
>   Serious unknown changes coming with Patchwork_9564 absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_9564, please notify your bug team to allow them
>   to document this new failure mode, which will reduce false positives in CI.
> 
>   External URL: 
> https://patchwork.freedesktop.org/api/1.0/series/46067/revisions/1/mbox/
> 
> == Possible new issues ==
> 
>   Here are the unknown changes that may have been introduced in 
> Patchwork_9564:
> 
>   === IGT changes ===
> 
>  Possible regressions 
> 
> igt@gem_exec_nop@basic-parallel:
>   {fi-kbl-x1275}: PASS -> INCOMPLETE
>   fi-kbl-7567u:   PASS -> INCOMPLETE
>   fi-skl-6600u:   PASS -> INCOMPLETE
>   fi-glk-dsi: PASS -> INCOMPLETE
>   {fi-kbl-8809g}: PASS -> INCOMPLETE
>   fi-kbl-r:   PASS -> INCOMPLETE
>   fi-cfl-8700k:   PASS -> INCOMPLETE
>   {fi-cfl-8109u}: PASS -> INCOMPLETE
>   fi-cfl-s3:  PASS -> INCOMPLETE
>   fi-kbl-7500u:   PASS -> INCOMPLETE
>   fi-skl-6770hq:  PASS -> INCOMPLETE
>   fi-whl-u:   PASS -> INCOMPLETE
>   fi-kbl-7560u:   PASS -> INCOMPLETE
>   fi-skl-6700hq:  PASS -> INCOMPLETE
>   fi-skl-6260u:   PASS -> INCOMPLETE
>   fi-skl-6700k2:  PASS -> INCOMPLETE
>   fi-bsw-n3050:   PASS -> INCOMPLETE

Not so redundant after all! Hah. Oh, it is just doing a list_del and is
definitely required.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH v3 00/12] drm/i915: Some plane init cleanups

2018-07-06 Thread Lisovskiy, Stanislav
On Fri, 2018-06-01 at 20:00 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä 
> 
> Another version of these cleansup. Last time there was some kind of
> smtp
> fail when sending and patchwork got confused at the wonky threading.
> So
> best to repost fully I thought. Additionally I had to resolve a lot
> of
> rebase confilicts and I spotted a few NV12 related things I missed
> the
> last time around.
> 
> Ville Syrjälä (12):
>   drm/i915: Constify all plane_funcs structs
>   drm/i915: Populate possible_crtcs for primary/cursor planes
>   drm/i915: Don't populate plane->i9xx_plane for sprites
>   drm/i915: Allow horizontal mirroring for cnl+ "sprite" planes
>   drm/i915: Disallow plane scaling with specific pixel formats
>   drm/i915: Add missing pixel formats for skl+ "sprites"
>   drm/i915: Move plane_state->scaler_id initialization into
> intel_create_plane_state()
>   drm/i915: Introduce intel_plane_alloc()
>   drm/i915: Extract skl_universal_plane_init()
>   drm/i915: Simplify skl_plane_has_planar()
>   drm/i915: s/intel_plane/plane/ in sprite init
>   drm/i915: Rename variables in intel_primary_plane_create()

Reviewed-by: Stanislav Lisovskiy 

> 
>  drivers/gpu/drm/i915/intel_atomic_plane.c |   1 +
>  drivers/gpu/drm/i915/intel_display.c  | 334 ++
> 
>  drivers/gpu/drm/i915/intel_drv.h  |  16 +-
>  drivers/gpu/drm/i915/intel_sprite.c   | 374
> --
>  4 files changed, 322 insertions(+), 403 deletions(-)
> 
-- 
Best Regards,

Lisovskiy Stanislav
___
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/6] drm/i915: Refactor export_fence() after i915_vma_move_to_active()

2018-07-06 Thread Patchwork
== Series Details ==

Series: series starting with [1/6] drm/i915: Refactor export_fence() after 
i915_vma_move_to_active()
URL   : https://patchwork.freedesktop.org/series/46067/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_ -> Patchwork_9564 =

== Summary - FAILURE ==

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

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

== Possible new issues ==

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

  === IGT changes ===

 Possible regressions 

igt@gem_exec_nop@basic-parallel:
  {fi-kbl-x1275}: PASS -> INCOMPLETE
  fi-kbl-7567u:   PASS -> INCOMPLETE
  fi-skl-6600u:   PASS -> INCOMPLETE
  fi-glk-dsi: PASS -> INCOMPLETE
  {fi-kbl-8809g}: PASS -> INCOMPLETE
  fi-kbl-r:   PASS -> INCOMPLETE
  fi-cfl-8700k:   PASS -> INCOMPLETE
  {fi-cfl-8109u}: PASS -> INCOMPLETE
  fi-cfl-s3:  PASS -> INCOMPLETE
  fi-kbl-7500u:   PASS -> INCOMPLETE
  fi-skl-6770hq:  PASS -> INCOMPLETE
  fi-whl-u:   PASS -> INCOMPLETE
  fi-kbl-7560u:   PASS -> INCOMPLETE
  fi-skl-6700hq:  PASS -> INCOMPLETE
  fi-skl-6260u:   PASS -> INCOMPLETE
  fi-skl-6700k2:  PASS -> INCOMPLETE
  fi-bsw-n3050:   PASS -> INCOMPLETE

igt@gem_exec_store@basic-all:
  fi-snb-2600:PASS -> INCOMPLETE

igt@gem_wait@basic-wait-all:
  fi-bdw-5557u:   PASS -> INCOMPLETE


== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@gem_exec_nop@basic-parallel:
  fi-cfl-guc: PASS -> INCOMPLETE (fdo#106693)
  fi-skl-guc: PASS -> INCOMPLETE (fdo#106693)
  fi-kbl-guc: PASS -> INCOMPLETE (fdo#106693)
  fi-bxt-dsi: PASS -> INCOMPLETE (fdo#103927)
  fi-bxt-j4205:   PASS -> INCOMPLETE (fdo#103927)
  fi-glk-j4005:   PASS -> INCOMPLETE (fdo#103359, k.org#198133)

igt@gem_exec_store@basic-all:
  fi-snb-2520m:   PASS -> INCOMPLETE (fdo#103713)

igt@gem_exec_suspend@basic:
  fi-byt-j1900:   PASS -> INCOMPLETE (fdo#102657)

igt@gem_exec_suspend@basic-s4-devices:
  fi-byt-n2820:   PASS -> INCOMPLETE (fdo#102657)

igt@gem_wait@basic-wait-all:
  fi-skl-gvtdvm:  PASS -> INCOMPLETE (fdo#105600)
  fi-bdw-gvtdvm:  PASS -> INCOMPLETE (fdo#105600)


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

  fdo#102657 https://bugs.freedesktop.org/show_bug.cgi?id=102657
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#105600 https://bugs.freedesktop.org/show_bug.cgi?id=105600
  fdo#106693 https://bugs.freedesktop.org/show_bug.cgi?id=106693
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


== Participating hosts (47 -> 42) ==

  Missing(5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 
fi-hsw-4200u 


== Build changes ==

* Linux: CI_DRM_ -> Patchwork_9564

  CI_DRM_: b153ce72348cbf6639dc5bd8e5e1bb0c180e9b86 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4540: 78071c2fa53db2f04b8eddc6e6118be4fbc5c2fe @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9564: bacf87522060199f7a786f2cc819a8a3cc29cfc4 @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

bacf87522060 drm/i915: Track the last-active inside the i915_vma
a3a860c56328 drm/i915: Track vma activity per fence.context, not per engine
ec40b966f936 drm/i915: Move i915_vma_move_to_active() to i915_vma.c
809b8f016f80 drm/i915: Start returning an error from i915_vma_move_to_active()
fd54dbed2799 drm/i915: Export i915_request_skip()
478556e2da64 drm/i915: Refactor export_fence() after i915_vma_move_to_active()

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9564/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/selftests: Skip live_execlists if the GPU is terminally wedged

2018-07-06 Thread Matthew Auld
On 6 July 2018 at 12:45, Chris Wilson  wrote:
> If the GPU is irrecoverably wedged, we can not execute any requests
> making testing execlists (request execution) pointless. Skip!
>
> Signed-off-by: Chris Wilson 
> Cc: Matthew Auld 
Reviewed-by: Matthew Auld 
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Flush the WCB following a WC write

2018-07-06 Thread Matthew Auld
On 6 July 2018 at 12:54, Chris Wilson  wrote:
> If we have just completed a WC write, we must ensure that the WCB (Write
> Combining Buffer) is flushed out to main memory before we can expect to
> see the results. This is especially important when mixing WC with GTT as
> the physical paths are different and cachelines are not naturally flushed.
>
> Testcase: igt/drv_selftests/live_coherency #gdg
> Signed-off-by: Chris Wilson 
Reviewed-by: Matthew Auld 
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/6] drm/i915: Refactor export_fence() after i915_vma_move_to_active()

2018-07-06 Thread Patchwork
== Series Details ==

Series: series starting with [1/6] drm/i915: Refactor export_fence() after 
i915_vma_move_to_active()
URL   : https://patchwork.freedesktop.org/series/46067/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Commit: drm/i915: Refactor export_fence() after i915_vma_move_to_active()
Okay!

Commit: drm/i915: Export i915_request_skip()
Okay!

Commit: drm/i915: Start returning an error from i915_vma_move_to_active()
Okay!

Commit: drm/i915: Move i915_vma_move_to_active() to i915_vma.c
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3663:16: warning: expression 
using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3660:16: warning: expression 
using sizeof(void)

Commit: drm/i915: Track vma activity per fence.context, not per engine
Okay!

Commit: drm/i915: Track the last-active inside the i915_vma
Okay!

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


[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/6] drm/i915: Refactor export_fence() after i915_vma_move_to_active()

2018-07-06 Thread Patchwork
== Series Details ==

Series: series starting with [1/6] drm/i915: Refactor export_fence() after 
i915_vma_move_to_active()
URL   : https://patchwork.freedesktop.org/series/46067/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
478556e2da64 drm/i915: Refactor export_fence() after i915_vma_move_to_active()
fd54dbed2799 drm/i915: Export i915_request_skip()
809b8f016f80 drm/i915: Start returning an error from i915_vma_move_to_active()
ec40b966f936 drm/i915: Move i915_vma_move_to_active() to i915_vma.c
a3a860c56328 drm/i915: Track vma activity per fence.context, not per engine
bacf87522060 drm/i915: Track the last-active inside the i915_vma
-:96: WARNING:TYPO_SPELLING: 'recieve' may be misspelled - perhaps 'receive'?
#96: FILE: drivers/gpu/drm/i915/i915_vma.c:959:
+* we must be careful as we now only expect to recieve one retire

total: 0 errors, 1 warnings, 0 checks, 99 lines checked

___
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 [1/2] drm/i915: Record logical context support in driver caps (rev2)

2018-07-06 Thread Patchwork
== Series Details ==

Series: series starting with [1/2] drm/i915: Record logical context support in 
driver caps (rev2)
URL   : https://patchwork.freedesktop.org/series/46065/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_ -> Patchwork_9563 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: 
https://patchwork.freedesktop.org/api/1.0/series/46065/revisions/2/mbox/

== Possible new issues ==

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

  === IGT changes ===

 Warnings 

igt@gem_exec_suspend@basic-s4-devices:
  {fi-kbl-8809g}: INCOMPLETE -> DMESG-WARN


== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@gem_exec_suspend@basic-s4-devices:
  fi-kbl-7500u:   PASS -> DMESG-WARN (fdo#105128)

igt@kms_flip@basic-flip-vs-dpms:
  fi-skl-6700hq:  PASS -> DMESG-WARN (fdo#105998)


 Possible fixes 

igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
  fi-bxt-dsi: INCOMPLETE (fdo#103927) -> PASS


  {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#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
  fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998


== Participating hosts (47 -> 41) ==

  Missing(6): fi-ilk-m540 fi-hsw-4200u fi-skl-guc fi-byt-squawks 
fi-bsw-cyan fi-ctg-p8600 


== Build changes ==

* Linux: CI_DRM_ -> Patchwork_9563

  CI_DRM_: b153ce72348cbf6639dc5bd8e5e1bb0c180e9b86 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4540: 78071c2fa53db2f04b8eddc6e6118be4fbc5c2fe @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9563: 8d15879d80384022b90a0425b73c0b7534fe714b @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

8d15879d8038 drm/i915/selftests: Skip live context execution test without 
logical contexts
3d66e5f3e2e2 drm/i915: Record logical context support in driver caps

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9563/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/selftests: Detect unknown swizzling correctly

2018-07-06 Thread Patchwork
== Series Details ==

Series: drm/i915/selftests: Detect unknown swizzling correctly
URL   : https://patchwork.freedesktop.org/series/46026/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4438_full -> Patchwork_9553_full =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_9553_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_9553_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_9553_full:

  === IGT changes ===

 Warnings 

igt@gem_exec_schedule@deep-blt:
  shard-kbl:  PASS -> SKIP +1

igt@gem_mocs_settings@mocs-rc6-bsd1:
  shard-kbl:  SKIP -> PASS


== Known issues ==

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

  === IGT changes ===

 Issues hit 

igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
  shard-glk:  PASS -> FAIL (fdo#105454, fdo#106509)

igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
  shard-glk:  PASS -> FAIL (fdo#105189)

igt@kms_flip@wf_vblank-ts-check:
  shard-glk:  PASS -> FAIL (fdo#100368) +1

igt@kms_flip_tiling@flip-y-tiled:
  shard-glk:  PASS -> FAIL (fdo#103822)

igt@kms_setmode@basic:
  shard-apl:  PASS -> FAIL (fdo#99912)


 Possible fixes 

igt@drv_selftest@live_gtt:
  shard-glk:  FAIL (fdo#107127, fdo#105347) -> PASS

igt@kms_flip@2x-plain-flip-ts-check:
  shard-glk:  FAIL (fdo#100368) -> PASS +1

igt@kms_flip_tiling@flip-to-x-tiled:
  shard-glk:  FAIL (fdo#103822) -> PASS

igt@kms_setmode@basic:
  shard-kbl:  FAIL (fdo#99912) -> PASS


 Warnings 

igt@drv_selftest@live_gtt:
  shard-kbl:  INCOMPLETE (fdo#107127, fdo#103665) -> FAIL 
(fdo#107127, fdo#105347)


  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
  fdo#105189 https://bugs.freedesktop.org/show_bug.cgi?id=105189
  fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347
  fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454
  fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
  fdo#107127 https://bugs.freedesktop.org/show_bug.cgi?id=107127
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

* Linux: CI_DRM_4438 -> Patchwork_9553

  CI_DRM_4438: b689733af687b4b8072fb62a6bfe267c4e888f5f @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4539: 8b3cc74c6911e9b2835fe6e160f84bae463a70ef @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9553: 196d7d8cbc6ad8ab297cd8d972fea78c51663cb4 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ 
git://anongit.freedesktop.org/piglit

== Logs ==

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


  1   2   >