All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Move device_info.has_snoop into the static tables
@ 2017-09-05 13:47 Chris Wilson
  2017-09-05 13:47 ` [PATCH 2/2] drm/i915: Disable snooping (userptr, set-cache-level) on gen4 Chris Wilson
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Chris Wilson @ 2017-09-05 13:47 UTC (permalink / raw)
  To: intel-gfx

Currently we define any !llc machine as using snoop instead. However,
some platforms run into trouble using snoop that we would like to
disable, and to do so easily we want to be able to use the static
device_info tables.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_pci.c          | 7 +++++++
 drivers/gpu/drm/i915/intel_device_info.c | 2 --
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 201ed1fe81b6..e6e75a9d140e 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -63,6 +63,7 @@
 	.hws_needs_physical = 1, \
 	.unfenced_needs_alignment = 1, \
 	.ring_mask = RENDER_RING, \
+	.has_snoop = true, \
 	GEN_DEFAULT_PIPEOFFSETS, \
 	CURSOR_OFFSETS
 
@@ -95,6 +96,7 @@ static const struct intel_device_info intel_i865g_info __initconst = {
 	.gen = 3, .num_pipes = 2, \
 	.has_gmch_display = 1, \
 	.ring_mask = RENDER_RING, \
+	.has_snoop = true, \
 	GEN_DEFAULT_PIPEOFFSETS, \
 	CURSOR_OFFSETS
 
@@ -157,6 +159,7 @@ static const struct intel_device_info intel_pineview_info __initconst = {
 	.has_hotplug = 1, \
 	.has_gmch_display = 1, \
 	.ring_mask = RENDER_RING, \
+	.has_snoop = true, \
 	GEN_DEFAULT_PIPEOFFSETS, \
 	CURSOR_OFFSETS
 
@@ -197,6 +200,7 @@ static const struct intel_device_info intel_gm45_info __initconst = {
 	.has_hotplug = 1, \
 	.has_gmbus_irq = 1, \
 	.ring_mask = RENDER_RING | BSD_RING, \
+	.has_snoop = true, \
 	GEN_DEFAULT_PIPEOFFSETS, \
 	CURSOR_OFFSETS
 
@@ -321,6 +325,7 @@ static const struct intel_device_info intel_valleyview_info __initconst = {
 	.has_hotplug = 1,
 	.has_aliasing_ppgtt = 1,
 	.has_full_ppgtt = 1,
+	.has_snoop = true,
 	.ring_mask = RENDER_RING | BSD_RING | BLT_RING,
 	.display_mmio_offset = VLV_DISPLAY_BASE,
 	GEN_DEFAULT_PIPEOFFSETS,
@@ -412,6 +417,7 @@ static const struct intel_device_info intel_cherryview_info __initconst = {
 	.has_aliasing_ppgtt = 1,
 	.has_full_ppgtt = 1,
 	.has_reset_engine = 1,
+	.has_snoop = true,
 	.display_mmio_offset = VLV_DISPLAY_BASE,
 	GEN_CHV_PIPEOFFSETS,
 	CURSOR_OFFSETS,
@@ -474,6 +480,7 @@ static const struct intel_device_info intel_skylake_gt4_info __initconst = {
 	.has_full_ppgtt = 1, \
 	.has_full_48bit_ppgtt = 1, \
 	.has_reset_engine = 1, \
+	.has_snoop = true, \
 	GEN_DEFAULT_PIPEOFFSETS, \
 	IVB_CURSOR_OFFSETS, \
 	BDW_COLORS
diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
index 05ef5e1b1750..d9c998fc4707 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -418,8 +418,6 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
 	else if (INTEL_INFO(dev_priv)->gen >= 9)
 		gen9_sseu_info_init(dev_priv);
 
-	info->has_snoop = !info->has_llc;
-
 	DRM_DEBUG_DRIVER("slice mask: %04x\n", info->sseu.slice_mask);
 	DRM_DEBUG_DRIVER("slice total: %u\n", hweight8(info->sseu.slice_mask));
 	DRM_DEBUG_DRIVER("subslice total: %u\n",
-- 
2.14.1

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] drm/i915: Disable snooping (userptr, set-cache-level) on gen4
  2017-09-05 13:47 [PATCH 1/2] drm/i915: Move device_info.has_snoop into the static tables Chris Wilson
@ 2017-09-05 13:47 ` Chris Wilson
  2017-09-05 19:01   ` Ville Syrjälä
  2017-09-05 14:07 ` [PATCH 1/2] drm/i915: Move device_info.has_snoop into the static tables Chris Wilson
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Chris Wilson @ 2017-09-05 13:47 UTC (permalink / raw)
  To: intel-gfx

The original gen4 has an issue where writes (both render and blt) into
snoopable pages are lost. We've previously worked around this in
userspace (ddx, igt) by simply not requesting snoopable buffers, but upon
rediscovering this problem for a third time, make the kernel reject such
requests with -ENODEV.

This disables snooping on userspace buffers for i965 and i965gm (original
gen4) machines.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_pci.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index e6e75a9d140e..f060536cc405 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -168,6 +168,7 @@ static const struct intel_device_info intel_i965g_info __initconst = {
 	.platform = INTEL_I965G,
 	.has_overlay = 1,
 	.hws_needs_physical = 1,
+	.has_snoop = false,
 };
 
 static const struct intel_device_info intel_i965gm_info __initconst = {
@@ -177,6 +178,7 @@ static const struct intel_device_info intel_i965gm_info __initconst = {
 	.has_overlay = 1,
 	.supports_tv = 1,
 	.hws_needs_physical = 1,
+	.has_snoop = false,
 };
 
 static const struct intel_device_info intel_g45_info __initconst = {
-- 
2.14.1

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] drm/i915: Move device_info.has_snoop into the static tables
  2017-09-05 13:47 [PATCH 1/2] drm/i915: Move device_info.has_snoop into the static tables Chris Wilson
  2017-09-05 13:47 ` [PATCH 2/2] drm/i915: Disable snooping (userptr, set-cache-level) on gen4 Chris Wilson
@ 2017-09-05 14:07 ` Chris Wilson
  2017-09-05 14:17 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2017-09-05 14:07 UTC (permalink / raw)
  To: intel-gfx

Quoting Chris Wilson (2017-09-05 14:47:34)
> Currently we define any !llc machine as using snoop instead. However,
> some platforms run into trouble using snoop that we would like to
> disable, and to do so easily we want to be able to use the static
> device_info tables.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_pci.c          | 7 +++++++
>  drivers/gpu/drm/i915/intel_device_info.c | 2 --
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
> index 201ed1fe81b6..e6e75a9d140e 100644
> --- a/drivers/gpu/drm/i915/i915_pci.c
> +++ b/drivers/gpu/drm/i915/i915_pci.c
> @@ -63,6 +63,7 @@
>         .hws_needs_physical = 1, \
>         .unfenced_needs_alignment = 1, \
>         .ring_mask = RENDER_RING, \
> +       .has_snoop = true, \
>         GEN_DEFAULT_PIPEOFFSETS, \
>         CURSOR_OFFSETS
>  
> @@ -95,6 +96,7 @@ static const struct intel_device_info intel_i865g_info __initconst = {
>         .gen = 3, .num_pipes = 2, \
>         .has_gmch_display = 1, \
>         .ring_mask = RENDER_RING, \
> +       .has_snoop = true, \
>         GEN_DEFAULT_PIPEOFFSETS, \
>         CURSOR_OFFSETS
>  
> @@ -157,6 +159,7 @@ static const struct intel_device_info intel_pineview_info __initconst = {
>         .has_hotplug = 1, \
>         .has_gmch_display = 1, \
>         .ring_mask = RENDER_RING, \
> +       .has_snoop = true, \
>         GEN_DEFAULT_PIPEOFFSETS, \
>         CURSOR_OFFSETS
>  
> @@ -197,6 +200,7 @@ static const struct intel_device_info intel_gm45_info __initconst = {
>         .has_hotplug = 1, \
>         .has_gmbus_irq = 1, \
>         .ring_mask = RENDER_RING | BSD_RING, \
> +       .has_snoop = true, \
>         GEN_DEFAULT_PIPEOFFSETS, \
>         CURSOR_OFFSETS
>  
> @@ -321,6 +325,7 @@ static const struct intel_device_info intel_valleyview_info __initconst = {
>         .has_hotplug = 1,
>         .has_aliasing_ppgtt = 1,
>         .has_full_ppgtt = 1,
> +       .has_snoop = true,
>         .ring_mask = RENDER_RING | BSD_RING | BLT_RING,
>         .display_mmio_offset = VLV_DISPLAY_BASE,
>         GEN_DEFAULT_PIPEOFFSETS,
> @@ -412,6 +417,7 @@ static const struct intel_device_info intel_cherryview_info __initconst = {
>         .has_aliasing_ppgtt = 1,
>         .has_full_ppgtt = 1,
>         .has_reset_engine = 1,
> +       .has_snoop = true,
>         .display_mmio_offset = VLV_DISPLAY_BASE,
>         GEN_CHV_PIPEOFFSETS,
>         CURSOR_OFFSETS,
> @@ -474,6 +480,7 @@ static const struct intel_device_info intel_skylake_gt4_info __initconst = {

To help unravel the confusion, this is actually in
	#define GEN9_LP_FEATURES 
not intel_skylake_gt4_info.

>         .has_full_ppgtt = 1, \
>         .has_full_48bit_ppgtt = 1, \
>         .has_reset_engine = 1, \
> +       .has_snoop = true, \
>         GEN_DEFAULT_PIPEOFFSETS, \
>         IVB_CURSOR_OFFSETS, \
>         BDW_COLORS
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Move device_info.has_snoop into the static tables
  2017-09-05 13:47 [PATCH 1/2] drm/i915: Move device_info.has_snoop into the static tables Chris Wilson
  2017-09-05 13:47 ` [PATCH 2/2] drm/i915: Disable snooping (userptr, set-cache-level) on gen4 Chris Wilson
  2017-09-05 14:07 ` [PATCH 1/2] drm/i915: Move device_info.has_snoop into the static tables Chris Wilson
@ 2017-09-05 14:17 ` Patchwork
  2017-09-05 16:51 ` ✓ Fi.CI.IGT: " Patchwork
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2017-09-05 14:17 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Move device_info.has_snoop into the static tables
URL   : https://patchwork.freedesktop.org/series/29829/
State : success

== Summary ==

Series 29829v1 series starting with [1/2] drm/i915: Move device_info.has_snoop into the static tables
https://patchwork.freedesktop.org/api/1.0/series/29829/revisions/1/mbox/

Test kms_cursor_legacy:
        Subgroup basic-busy-flip-before-cursor-legacy:
                pass       -> FAIL       (fi-snb-2600) fdo#100215
Test kms_flip:
        Subgroup basic-flip-vs-modeset:
                pass       -> SKIP       (fi-skl-x1585l) fdo#101781

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

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:456s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:443s
fi-blb-e6850     total:289  pass:224  dwarn:1   dfail:0   fail:0   skip:64  time:360s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:548s
fi-bwr-2160      total:289  pass:184  dwarn:0   dfail:0   fail:0   skip:105 time:255s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:524s
fi-byt-j1900     total:289  pass:254  dwarn:1   dfail:0   fail:0   skip:34  time:525s
fi-byt-n2820     total:289  pass:250  dwarn:1   dfail:0   fail:0   skip:38  time:514s
fi-elk-e7500     total:289  pass:230  dwarn:0   dfail:0   fail:0   skip:59  time:440s
fi-glk-2a        total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:614s
fi-hsw-4770      total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:444s
fi-hsw-4770r     total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:428s
fi-ilk-650       total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:427s
fi-ivb-3520m     total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:514s
fi-ivb-3770      total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:475s
fi-kbl-7500u     total:289  pass:264  dwarn:1   dfail:0   fail:0   skip:24  time:515s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:600s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:600s
fi-pnv-d510      total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:533s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:468s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:540s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:514s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:449s
fi-skl-x1585l    total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:483s
fi-snb-2520m     total:289  pass:251  dwarn:0   dfail:0   fail:0   skip:38  time:558s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:1   skip:39  time:403s

229aae71d40f142bc0fbc011d6610ac4ddbd7cd6 drm-tip: 2017y-09m-05d-11h-05m-56s UTC integration manifest
020e9a03a1e5 drm/i915: Disable snooping (userptr, set-cache-level) on gen4
a7ce1ce2b25c drm/i915: Move device_info.has_snoop into the static tables

== Logs ==

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915: Move device_info.has_snoop into the static tables
  2017-09-05 13:47 [PATCH 1/2] drm/i915: Move device_info.has_snoop into the static tables Chris Wilson
                   ` (2 preceding siblings ...)
  2017-09-05 14:17 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
@ 2017-09-05 16:51 ` Patchwork
  2017-09-05 17:28 ` [PATCH 1/2] " Ville Syrjälä
  2017-09-06  7:21 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] " Patchwork
  5 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2017-09-05 16:51 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Move device_info.has_snoop into the static tables
URL   : https://patchwork.freedesktop.org/series/29829/
State : success

== Summary ==

shard-hsw        total:2255 pass:1225 dwarn:0   dfail:0   fail:15  skip:1014 time:9480s

== Logs ==

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] drm/i915: Move device_info.has_snoop into the static tables
  2017-09-05 13:47 [PATCH 1/2] drm/i915: Move device_info.has_snoop into the static tables Chris Wilson
                   ` (3 preceding siblings ...)
  2017-09-05 16:51 ` ✓ Fi.CI.IGT: " Patchwork
@ 2017-09-05 17:28 ` Ville Syrjälä
  2017-09-06  8:52   ` Chris Wilson
  2017-09-06  7:21 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] " Patchwork
  5 siblings, 1 reply; 10+ messages in thread
From: Ville Syrjälä @ 2017-09-05 17:28 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Tue, Sep 05, 2017 at 02:47:34PM +0100, Chris Wilson wrote:
> Currently we define any !llc machine as using snoop instead. However,
> some platforms run into trouble using snoop that we would like to
> disable, and to do so easily we want to be able to use the static
> device_info tables.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Can't spot any functional changes, assuming I correctly deduced
which macros are getting updated.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/i915_pci.c          | 7 +++++++
>  drivers/gpu/drm/i915/intel_device_info.c | 2 --
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
> index 201ed1fe81b6..e6e75a9d140e 100644
> --- a/drivers/gpu/drm/i915/i915_pci.c
> +++ b/drivers/gpu/drm/i915/i915_pci.c
> @@ -63,6 +63,7 @@
>  	.hws_needs_physical = 1, \
>  	.unfenced_needs_alignment = 1, \
>  	.ring_mask = RENDER_RING, \
> +	.has_snoop = true, \
>  	GEN_DEFAULT_PIPEOFFSETS, \
>  	CURSOR_OFFSETS
>  
> @@ -95,6 +96,7 @@ static const struct intel_device_info intel_i865g_info __initconst = {
>  	.gen = 3, .num_pipes = 2, \
>  	.has_gmch_display = 1, \
>  	.ring_mask = RENDER_RING, \
> +	.has_snoop = true, \
>  	GEN_DEFAULT_PIPEOFFSETS, \
>  	CURSOR_OFFSETS
>  
> @@ -157,6 +159,7 @@ static const struct intel_device_info intel_pineview_info __initconst = {
>  	.has_hotplug = 1, \
>  	.has_gmch_display = 1, \
>  	.ring_mask = RENDER_RING, \
> +	.has_snoop = true, \
>  	GEN_DEFAULT_PIPEOFFSETS, \
>  	CURSOR_OFFSETS
>  
> @@ -197,6 +200,7 @@ static const struct intel_device_info intel_gm45_info __initconst = {
>  	.has_hotplug = 1, \
>  	.has_gmbus_irq = 1, \
>  	.ring_mask = RENDER_RING | BSD_RING, \
> +	.has_snoop = true, \
>  	GEN_DEFAULT_PIPEOFFSETS, \
>  	CURSOR_OFFSETS
>  
> @@ -321,6 +325,7 @@ static const struct intel_device_info intel_valleyview_info __initconst = {
>  	.has_hotplug = 1,
>  	.has_aliasing_ppgtt = 1,
>  	.has_full_ppgtt = 1,
> +	.has_snoop = true,
>  	.ring_mask = RENDER_RING | BSD_RING | BLT_RING,
>  	.display_mmio_offset = VLV_DISPLAY_BASE,
>  	GEN_DEFAULT_PIPEOFFSETS,
> @@ -412,6 +417,7 @@ static const struct intel_device_info intel_cherryview_info __initconst = {
>  	.has_aliasing_ppgtt = 1,
>  	.has_full_ppgtt = 1,
>  	.has_reset_engine = 1,
> +	.has_snoop = true,
>  	.display_mmio_offset = VLV_DISPLAY_BASE,
>  	GEN_CHV_PIPEOFFSETS,
>  	CURSOR_OFFSETS,
> @@ -474,6 +480,7 @@ static const struct intel_device_info intel_skylake_gt4_info __initconst = {
>  	.has_full_ppgtt = 1, \
>  	.has_full_48bit_ppgtt = 1, \
>  	.has_reset_engine = 1, \
> +	.has_snoop = true, \
>  	GEN_DEFAULT_PIPEOFFSETS, \
>  	IVB_CURSOR_OFFSETS, \
>  	BDW_COLORS
> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
> index 05ef5e1b1750..d9c998fc4707 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.c
> +++ b/drivers/gpu/drm/i915/intel_device_info.c
> @@ -418,8 +418,6 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
>  	else if (INTEL_INFO(dev_priv)->gen >= 9)
>  		gen9_sseu_info_init(dev_priv);
>  
> -	info->has_snoop = !info->has_llc;
> -
>  	DRM_DEBUG_DRIVER("slice mask: %04x\n", info->sseu.slice_mask);
>  	DRM_DEBUG_DRIVER("slice total: %u\n", hweight8(info->sseu.slice_mask));
>  	DRM_DEBUG_DRIVER("subslice total: %u\n",
> -- 
> 2.14.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] drm/i915: Disable snooping (userptr, set-cache-level) on gen4
  2017-09-05 13:47 ` [PATCH 2/2] drm/i915: Disable snooping (userptr, set-cache-level) on gen4 Chris Wilson
@ 2017-09-05 19:01   ` Ville Syrjälä
  2017-09-05 19:43     ` Chris Wilson
  0 siblings, 1 reply; 10+ messages in thread
From: Ville Syrjälä @ 2017-09-05 19:01 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Tue, Sep 05, 2017 at 02:47:35PM +0100, Chris Wilson wrote:
> The original gen4 has an issue where writes (both render and blt) into
> snoopable pages are lost.

BTW is this documented somewhere, or just folk lore? I only found bspec
notes that snooped->snooped and tiled+snooped isn't allowed. But I
guess this is something more generic?

It does appear to match notes in ddx/igt so
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> We've previously worked around this in
> userspace (ddx, igt) by simply not requesting snoopable buffers, but upon
> rediscovering this problem for a third time, make the kernel reject such
> requests with -ENODEV.
> 
> This disables snooping on userspace buffers for i965 and i965gm (original
> gen4) machines.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_pci.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
> index e6e75a9d140e..f060536cc405 100644
> --- a/drivers/gpu/drm/i915/i915_pci.c
> +++ b/drivers/gpu/drm/i915/i915_pci.c
> @@ -168,6 +168,7 @@ static const struct intel_device_info intel_i965g_info __initconst = {
>  	.platform = INTEL_I965G,
>  	.has_overlay = 1,
>  	.hws_needs_physical = 1,
> +	.has_snoop = false,
>  };
>  
>  static const struct intel_device_info intel_i965gm_info __initconst = {
> @@ -177,6 +178,7 @@ static const struct intel_device_info intel_i965gm_info __initconst = {
>  	.has_overlay = 1,
>  	.supports_tv = 1,
>  	.hws_needs_physical = 1,
> +	.has_snoop = false,
>  };
>  
>  static const struct intel_device_info intel_g45_info __initconst = {
> -- 
> 2.14.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] drm/i915: Disable snooping (userptr, set-cache-level) on gen4
  2017-09-05 19:01   ` Ville Syrjälä
@ 2017-09-05 19:43     ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2017-09-05 19:43 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

Quoting Ville Syrjälä (2017-09-05 20:01:03)
> On Tue, Sep 05, 2017 at 02:47:35PM +0100, Chris Wilson wrote:
> > The original gen4 has an issue where writes (both render and blt) into
> > snoopable pages are lost.
> 
> BTW is this documented somewhere, or just folk lore? I only found bspec
> notes that snooped->snooped and tiled+snooped isn't allowed. But I
> guess this is something more generic?

Just experience indeed. Never stumbled across anything to actually
explain it, especially why it is limited to just a couple of machines.
You would have expected it to have at least made the cspec errata list,
if it was a real issue! But having stumbled across the same issue again
with mesa, I don't think it is just the way I implemented the blits.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* ✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: Move device_info.has_snoop into the static tables
  2017-09-05 13:47 [PATCH 1/2] drm/i915: Move device_info.has_snoop into the static tables Chris Wilson
                   ` (4 preceding siblings ...)
  2017-09-05 17:28 ` [PATCH 1/2] " Ville Syrjälä
@ 2017-09-06  7:21 ` Patchwork
  5 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2017-09-06  7:21 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Move device_info.has_snoop into the static tables
URL   : https://patchwork.freedesktop.org/series/29829/
State : warning

== Summary ==

Series 29829v1 series starting with [1/2] drm/i915: Move device_info.has_snoop into the static tables
https://patchwork.freedesktop.org/api/1.0/series/29829/revisions/1/mbox/

Test kms_cursor_legacy:
        Subgroup basic-busy-flip-before-cursor-legacy:
                pass       -> FAIL       (fi-snb-2600) fdo#100215
Test kms_flip:
        Subgroup basic-flip-vs-modeset:
                pass       -> SKIP       (fi-skl-x1585l) fdo#101781
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                pass       -> SKIP       (fi-cfl-s)

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

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:456s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:443s
fi-blb-e6850     total:289  pass:224  dwarn:1   dfail:0   fail:0   skip:64  time:360s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:548s
fi-bwr-2160      total:289  pass:184  dwarn:0   dfail:0   fail:0   skip:105 time:255s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:524s
fi-byt-j1900     total:289  pass:254  dwarn:1   dfail:0   fail:0   skip:34  time:525s
fi-byt-n2820     total:289  pass:250  dwarn:1   dfail:0   fail:0   skip:38  time:514s
fi-cfl-s         total:289  pass:249  dwarn:4   dfail:0   fail:0   skip:36  time:455s
fi-elk-e7500     total:289  pass:230  dwarn:0   dfail:0   fail:0   skip:59  time:440s
fi-glk-2a        total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:614s
fi-hsw-4770      total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:444s
fi-hsw-4770r     total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:428s
fi-ilk-650       total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:427s
fi-ivb-3520m     total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:514s
fi-ivb-3770      total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:475s
fi-kbl-7500u     total:289  pass:264  dwarn:1   dfail:0   fail:0   skip:24  time:515s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:600s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:600s
fi-pnv-d510      total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:533s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:468s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:540s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:514s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:449s
fi-skl-x1585l    total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:483s
fi-snb-2520m     total:289  pass:251  dwarn:0   dfail:0   fail:0   skip:38  time:558s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:1   skip:39  time:403s

229aae71d40f142bc0fbc011d6610ac4ddbd7cd6 drm-tip: 2017y-09m-05d-11h-05m-56s UTC integration manifest
020e9a03a1e5 drm/i915: Disable snooping (userptr, set-cache-level) on gen4
a7ce1ce2b25c drm/i915: Move device_info.has_snoop into the static tables

== Logs ==

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] drm/i915: Move device_info.has_snoop into the static tables
  2017-09-05 17:28 ` [PATCH 1/2] " Ville Syrjälä
@ 2017-09-06  8:52   ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2017-09-06  8:52 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

Quoting Ville Syrjälä (2017-09-05 18:28:50)
> On Tue, Sep 05, 2017 at 02:47:34PM +0100, Chris Wilson wrote:
> > Currently we define any !llc machine as using snoop instead. However,
> > some platforms run into trouble using snoop that we would like to
> > disable, and to do so easily we want to be able to use the static
> > device_info tables.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> 
> Can't spot any functional changes, assuming I correctly deduced
> which macros are getting updated.
> 
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

To double check,

> > diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
> > index 05ef5e1b1750..d9c998fc4707 100644
> > --- a/drivers/gpu/drm/i915/intel_device_info.c
> > +++ b/drivers/gpu/drm/i915/intel_device_info.c
> > @@ -418,8 +418,6 @@ void intel_device_info_runtime_init(struct drm_i915_private *dev_priv)
> >       else if (INTEL_INFO(dev_priv)->gen >= 9)
> >               gen9_sseu_info_init(dev_priv);
> >  
> > -     info->has_snoop = !info->has_llc;

I'll make this an actual WARN_ON() in the first patch and send it
separately. Obviously this has to be then removed in the second patch,
but it should give us a little confidence that we are watertight.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-09-06  8:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-05 13:47 [PATCH 1/2] drm/i915: Move device_info.has_snoop into the static tables Chris Wilson
2017-09-05 13:47 ` [PATCH 2/2] drm/i915: Disable snooping (userptr, set-cache-level) on gen4 Chris Wilson
2017-09-05 19:01   ` Ville Syrjälä
2017-09-05 19:43     ` Chris Wilson
2017-09-05 14:07 ` [PATCH 1/2] drm/i915: Move device_info.has_snoop into the static tables Chris Wilson
2017-09-05 14:17 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
2017-09-05 16:51 ` ✓ Fi.CI.IGT: " Patchwork
2017-09-05 17:28 ` [PATCH 1/2] " Ville Syrjälä
2017-09-06  8:52   ` Chris Wilson
2017-09-06  7:21 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.