[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Do not enable movntdqa optimization in hypervisor guest (rev2)

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

Series: drm/i915: Do not enable movntdqa optimization in hypervisor guest (rev2)
URL   : https://patchwork.freedesktop.org/series/35711/
State : failure

== Summary ==

Applying: drm/i915: Do not enable movntdqa optimization in hypervisor guest
Using index info to reconstruct a base tree...
M   drivers/gpu/drm/i915/i915_memcpy.c
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.

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


[Intel-gfx] [PATCH v2] drm/i915: Do not enable movntdqa optimization in hypervisor guest

2017-12-24 Thread changbin . du
From: Changbin Du 

Our QA reported a problem caused by movntdqa instructions. Currently,
the KVM hypervisor doesn't support VEX-prefix instructions emulation.
If users passthrough a GPU to guest with vfio option 'x-no-mmap=on',
then all access to the BARs will be trapped and emulated. The KVM
hypervisor would raise an inertal error to qemu which cause the guest
killed. (Since 'movntdqa' ins is not supported.)

This patch try not to enable movntdqa optimization if the driver is
running in hypervisor guest.

v2: update comment.

Signed-off-by: Changbin Du 
Reviewed-by: Chris Wilson 
---
 drivers/gpu/drm/i915/i915_memcpy.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_memcpy.c 
b/drivers/gpu/drm/i915/i915_memcpy.c
index 49a0794..79f8ec7 100644
--- a/drivers/gpu/drm/i915/i915_memcpy.c
+++ b/drivers/gpu/drm/i915/i915_memcpy.c
@@ -96,6 +96,11 @@ bool i915_memcpy_from_wc(void *dst, const void *src, 
unsigned long len)
 
 void i915_memcpy_init_early(struct drm_i915_private *dev_priv)
 {
-   if (static_cpu_has(X86_FEATURE_XMM4_1))
+   /*
+* Some hypervisors (e.g. KVM) don't support VEX-prefix instructions
+* emulation. So don't enable movntdqa in hypervisor guest.
+*/
+   if (static_cpu_has(X86_FEATURE_XMM4_1) &&
+   !boot_cpu_has(X86_FEATURE_HYPERVISOR))
static_branch_enable(&has_movntdqa);
 }
-- 
2.7.4

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


Re: [Intel-gfx] [PATCH] drm/i915: Do not enable movntdqa optimization in hypervisor guest

2017-12-24 Thread Du, Changbin
On Fri, Dec 22, 2017 at 11:11:15AM +, Chris Wilson wrote:
> Quoting changbin...@intel.com (2017-12-22 06:31:49)
> > From: Changbin Du 
> > 
> > Our QA reported a problem caused by movntdqa instructions. Currently,
> > the KVM hypervisor doesn't support VEX-prefix instructions emulation.
> > If users passthrough a GPU to guest with vfio option 'x-no-mmap=on',
> > then all access to the BARs will be trapped and emulated. The KVM
> > hypervisor would raise an inertal error to qemu which cause the guest
> > killed. (Since 'movntdqa' ins is not supported.)
> > 
> > This patch try not to enable movntdqa optimization if the driver is
> > running in hypervisor guest.
> > 
> > Signed-off-by: Changbin Du 
> > ---
> >  drivers/gpu/drm/i915/i915_memcpy.c | 7 ++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_memcpy.c 
> > b/drivers/gpu/drm/i915/i915_memcpy.c
> > index 49a0794..8921f40 100644
> > --- a/drivers/gpu/drm/i915/i915_memcpy.c
> > +++ b/drivers/gpu/drm/i915/i915_memcpy.c
> > @@ -96,6 +96,11 @@ bool i915_memcpy_from_wc(void *dst, const void *src, 
> > unsigned long len)
> >  
> >  void i915_memcpy_init_early(struct drm_i915_private *dev_priv)
> >  {
> > -   if (static_cpu_has(X86_FEATURE_XMM4_1))
> > +   /**
> 
> This isn't a kerneldoc, so just /* for a regular comment.
>
Thanks, will update.
 
> > +* Some hypervisors (e.g. KVM) don't support VEX-prefix instructions
> > +* emulation. So don't enable movntdqa in hypervisor guest.
> > +*/
> > +   if (static_cpu_has(X86_FEATURE_XMM4_1) &&
> > +   !boot_cpu_has(X86_FEATURE_HYPERVISOR))
> > static_branch_enable(&has_movntdqa);
> 
> Code checks out, and I believe you that some hypervisor setups may trap
> those instructions, so
> 
> Reviewed-by: Chris Wilson 
> 
> We could try and jigger the init order about, but we do need this setup
> quite early so that we use the knowledge in other setup. Considering
> that, an explicit check for a hypervisor seems sensible.
> -Chris
And this check is not only for GVTg, but also for physical GPU passthrough. So
it is beyong intel_vgpu_active().

-- 
Thanks,
Changbin Du
___
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: Try EDID bitbanging on HDMI after failed read

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

Series: drm/i915: Try EDID bitbanging on HDMI after failed read
URL   : https://patchwork.freedesktop.org/series/35770/
State : failure

== Summary ==

Test gem_tiled_swapping:
Subgroup non-threaded:
pass   -> INCOMPLETE (shard-hsw) fdo#104218
Test kms_setmode:
Subgroup basic:
pass   -> FAIL   (shard-hsw) fdo#99912
Test kms_chv_cursor_fail:
Subgroup pipe-c-128x128-right-edge:
pass   -> DMESG-FAIL (shard-hsw)
Test kms_flip:
Subgroup vblank-vs-suspend-interruptible:
incomplete -> PASS   (shard-hsw) fdo#100368
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-primscrn-pri-indfb-draw-render:
pass   -> FAIL   (shard-hsw) fdo#101623

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

shard-hswtotal:2692 pass:1523 dwarn:1   dfail:1   fail:11  skip:1155 
time:9130s
shard-snbtotal:2713 pass:1311 dwarn:1   dfail:0   fail:10  skip:1391 
time:8063s
Blacklisted hosts:
shard-apltotal:2713 pass:1687 dwarn:1   dfail:0   fail:24  skip:1001 
time:13900s
shard-kbltotal:2698 pass:1796 dwarn:1   dfail:0   fail:26  skip:874 
time:10784s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7584/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: Try EDID bitbanging on HDMI after failed read

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

Series: drm/i915: Try EDID bitbanging on HDMI after failed read
URL   : https://patchwork.freedesktop.org/series/35770/
State : success

== Summary ==

Series 35770v1 drm/i915: Try EDID bitbanging on HDMI after failed read
https://patchwork.freedesktop.org/api/1.0/series/35770/revisions/1/mbox/

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:433s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:435s
fi-blb-e6850 total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  
time:388s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:492s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:276s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:495s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:484s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:482s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:473s
fi-elk-e7500 total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551   total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 
time:262s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:527s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:407s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:414s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:428s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:478s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:427s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:476s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:519s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:468s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:528s
fi-pnv-d510  total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  
time:580s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:437s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:533s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:557s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:503s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:504s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:448s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:559s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:412s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:593s
fi-cnl-y total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:612s
fi-glk-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:476s

f5f92cee6de1044b4736c9577211f247e639260d drm-tip: 2017y-12m-24d-18h-13m-59s UTC 
integration manifest
371798dc4182 drm/i915: Try EDID bitbanging on HDMI after failed read

== Logs ==

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


[Intel-gfx] [PATCH v1] drm/i915: Try EDID bitbanging on HDMI after failed read

2017-12-24 Thread Stefan Brüns
The ACK/NACK implementation as found in e.g. the G965 has the falling
clock edge and the release of the data line to ACK the received byte
happen at the same time.

Some HDMI-to-VGA converters apparently read the ACK not in the middle of
the clock high phase, but at the rising clock edge, so instead of an ACK
sometimes a NACK is read and the slave (i.e. the EDID ROM) ends the
transfer.

The bitbanging releases the data line for the ACK only 1/4 bit time after
the falling clock edge, so a slave will see the correct value no matter
if is samples at the rising or the falling clock edge or in the center.

Fallback to bitbanging is already done for the CRT connector.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92685

Signed-off-by: Stefan Brüns 

---

 drivers/gpu/drm/i915/intel_hdmi.c | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c 
b/drivers/gpu/drm/i915/intel_hdmi.c
index 4dea833f9d1b..847cda4c017c 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1573,12 +1573,20 @@ intel_hdmi_set_edid(struct drm_connector *connector)
struct intel_hdmi *intel_hdmi = intel_attached_hdmi(connector);
struct edid *edid;
bool connected = false;
+   struct i2c_adapter *i2c;
 
intel_display_power_get(dev_priv, POWER_DOMAIN_GMBUS);
 
-   edid = drm_get_edid(connector,
-   intel_gmbus_get_adapter(dev_priv,
-   intel_hdmi->ddc_bus));
+   i2c = intel_gmbus_get_adapter(dev_priv, intel_hdmi->ddc_bus);
+
+   edid = drm_get_edid(connector, i2c);
+
+   if (!edid && !intel_gmbus_is_forced_bit(i2c)) {
+   DRM_DEBUG_KMS("HDMI GMBUS EDID read failed, retry using GPIO 
bit-banging\n");
+   intel_gmbus_force_bit(i2c, true);
+   edid = drm_get_edid(connector, i2c);
+   intel_gmbus_force_bit(i2c, false);
+   }
 
intel_hdmi_dp_dual_mode_detect(connector, edid != NULL);
 
-- 
2.15.1

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


[Intel-gfx] ✓ Fi.CI.IGT: success for meson: Bump required version to 0.44.0

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

Series: meson: Bump required version to 0.44.0
URL   : https://patchwork.freedesktop.org/series/35766/
State : success

== Summary ==

Test drv_suspend:
Subgroup debugfs-reader:
skip   -> PASS   (shard-hsw)
Test gem_eio:
Subgroup in-flight-contexts:
dmesg-warn -> PASS   (shard-snb) fdo#104058
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
fail   -> PASS   (shard-snb) fdo#101623 +1
Test kms_flip:
Subgroup plain-flip-ts-check:
pass   -> FAIL   (shard-snb) fdo#100368

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

shard-hswtotal:2637 pass:1492 dwarn:1   dfail:0   fail:9   skip:1135 
time:8993s
shard-snbtotal:2713 pass:1309 dwarn:1   dfail:0   fail:12  skip:1391 
time:8046s
Blacklisted hosts:
shard-apltotal:2713 pass:1688 dwarn:1   dfail:0   fail:23  skip:1001 
time:13790s
shard-kbltotal:2713 pass:1803 dwarn:1   dfail:0   fail:28  skip:881 
time:11144s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_732/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 meson: Bump required version to 0.44.0

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

Series: meson: Bump required version to 0.44.0
URL   : https://patchwork.freedesktop.org/series/35766/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
6d27acafa3a2d80b6330e2380a3548bc98dcc3e5 igt/gem_exec_await: Flush the WCB 
before attempting to queue more work

with latest DRM-Tip kernel build CI_DRM_3580
03944fd7a7f9 drm-tip: 2017y-12m-24d-14h-15m-52s UTC integration manifest

No testlist changes.

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

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

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:438s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:446s
fi-blb-e6850 total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  
time:388s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:499s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:278s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:496s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:502s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:486s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:465s
fi-elk-e7500 total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551   total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 
time:261s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:536s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:412s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:414s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:431s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:477s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:436s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:482s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:527s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:467s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:524s
fi-pnv-d510  total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  
time:597s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:443s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:538s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:565s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:505s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:485s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:445s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:552s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:409s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:582s
fi-cnl-y total:219  pass:198  dwarn:0   dfail:0   fail:0   skip:20 
fi-glk-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:482s

== Logs ==

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


[Intel-gfx] [PATCH i-g-t] meson: Bump required version to 0.44.0

2017-12-24 Thread Rhys Kidd
warning() needs that, which was introduced in a 865a47ca failure path.

Otherwise we get error messages on that failure path like:
  ...
  Program leg found: NO

  Meson encountered an error in file overlay/meson.build, line 62, column 1:
  Unknown function "warning".
  FAILED: build.ninja
  ...

Fixes: 865a47ca ("overlay: parse tracepoints from sysfs to figure out fields' 
location")
Signed-off-by: Rhys Kidd 
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 0950d3c7..20064ae1 100644
--- a/meson.build
+++ b/meson.build
@@ -5,7 +5,7 @@ project('IGT gpu tests', 'c',
   'c_std=gnu99',
 ],
license : 'MIT',
-   meson_version : '>0.40.0')
+   meson_version : '>=0.44.0')
 
 cc = meson.get_compiler('c')
 
-- 
2.14.1

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