All of lore.kernel.org
 help / color / mirror / Atom feed
* A pair of trivial band-aids
@ 2018-07-30  7:53 Chris Wilson
  2018-07-30  7:53 ` [PATCH 1/2] drm/i915: Kick waiters on resetting legacy rings Chris Wilson
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Chris Wilson @ 2018-07-30  7:53 UTC (permalink / raw)
  To: intel-gfx; +Cc: matthew.auld

Just a pair of bug silencers that should be quite tame,
-Chris


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

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

* [PATCH 1/2] drm/i915: Kick waiters on resetting legacy rings
  2018-07-30  7:53 A pair of trivial band-aids Chris Wilson
@ 2018-07-30  7:53 ` Chris Wilson
  2018-07-30  9:27   ` Matthew Auld
  2018-07-30  7:53 ` [PATCH 2/2] drm/i915/selftests: Replace opencoded clflush with drm_clflush_virt_range Chris Wilson
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Chris Wilson @ 2018-07-30  7:53 UTC (permalink / raw)
  To: intel-gfx; +Cc: matthew.auld

For reasons unknown, interrupts following a reset do not arrive, but
this can be papered over by kicking any waiter and peeking at the
breadcrumbs following the reset.

Testcase: igt/gem_eio/reset-stress
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index d1e03b7fbffa..c03f4fa4f350 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -527,6 +527,7 @@ static int init_ring_common(struct intel_engine_cs *engine)
 	if (INTEL_GEN(dev_priv) > 2)
 		I915_WRITE_MODE(engine, _MASKED_BIT_DISABLE(STOP_RING));
 
+	intel_engine_wakeup(engine);
 out:
 	intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
 
-- 
2.18.0

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

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

* [PATCH 2/2] drm/i915/selftests: Replace opencoded clflush with drm_clflush_virt_range
  2018-07-30  7:53 A pair of trivial band-aids Chris Wilson
  2018-07-30  7:53 ` [PATCH 1/2] drm/i915: Kick waiters on resetting legacy rings Chris Wilson
@ 2018-07-30  7:53 ` Chris Wilson
  2018-07-30  9:18   ` Matthew Auld
  2018-07-30  8:39 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Kick waiters on resetting legacy rings Patchwork
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Chris Wilson @ 2018-07-30  7:53 UTC (permalink / raw)
  To: intel-gfx; +Cc: matthew.auld

We occasionally see that the clflush prior to a read of GPU data is
returning stale data, reminiscent of much earlier bugs fixed by adding a
second clflush for serialisation. As drm_clflush_virt_range() already
supplies the workaround, use it rather than open code the clflush
instruction.

References: 396f5d62d1a5 ("drm: Restore double clflush on the last partial cacheline")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 .../drm/i915/selftests/i915_gem_coherency.c   | 38 +++++++++----------
 1 file changed, 17 insertions(+), 21 deletions(-)

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c b/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
index 3a095c37c120..4e6a221063ac 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
@@ -33,7 +33,8 @@ static int cpu_set(struct drm_i915_gem_object *obj,
 {
 	unsigned int needs_clflush;
 	struct page *page;
-	u32 *map;
+	void *map;
+	u32 *cpu;
 	int err;
 
 	err = i915_gem_obj_prepare_shmem_write(obj, &needs_clflush);
@@ -42,24 +43,19 @@ static int cpu_set(struct drm_i915_gem_object *obj,
 
 	page = i915_gem_object_get_page(obj, offset >> PAGE_SHIFT);
 	map = kmap_atomic(page);
+	cpu = map + offset_in_page(offset);
 
-	if (needs_clflush & CLFLUSH_BEFORE) {
-		mb();
-		clflush(map+offset_in_page(offset) / sizeof(*map));
-		mb();
-	}
+	if (needs_clflush & CLFLUSH_BEFORE)
+		drm_clflush_virt_range(cpu, sizeof(*cpu));
 
-	map[offset_in_page(offset) / sizeof(*map)] = v;
+	*cpu = v;
 
-	if (needs_clflush & CLFLUSH_AFTER) {
-		mb();
-		clflush(map+offset_in_page(offset) / sizeof(*map));
-		mb();
-	}
+	if (needs_clflush & CLFLUSH_AFTER)
+		drm_clflush_virt_range(cpu, sizeof(*cpu));
 
 	kunmap_atomic(map);
-
 	i915_gem_obj_finish_shmem_access(obj);
+
 	return 0;
 }
 
@@ -69,7 +65,8 @@ static int cpu_get(struct drm_i915_gem_object *obj,
 {
 	unsigned int needs_clflush;
 	struct page *page;
-	u32 *map;
+	void *map;
+	u32 *cpu;
 	int err;
 
 	err = i915_gem_obj_prepare_shmem_read(obj, &needs_clflush);
@@ -78,17 +75,16 @@ static int cpu_get(struct drm_i915_gem_object *obj,
 
 	page = i915_gem_object_get_page(obj, offset >> PAGE_SHIFT);
 	map = kmap_atomic(page);
+	cpu = map + offset_in_page(offset);
 
-	if (needs_clflush & CLFLUSH_BEFORE) {
-		mb();
-		clflush(map+offset_in_page(offset) / sizeof(*map));
-		mb();
-	}
+	if (needs_clflush & CLFLUSH_BEFORE)
+		drm_clflush_virt_range(cpu, sizeof(*cpu));
 
-	*v = map[offset_in_page(offset) / sizeof(*map)];
-	kunmap_atomic(map);
+	*v = *cpu;
 
+	kunmap_atomic(map);
 	i915_gem_obj_finish_shmem_access(obj);
+
 	return 0;
 }
 
-- 
2.18.0

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

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

* ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Kick waiters on resetting legacy rings
  2018-07-30  7:53 A pair of trivial band-aids Chris Wilson
  2018-07-30  7:53 ` [PATCH 1/2] drm/i915: Kick waiters on resetting legacy rings Chris Wilson
  2018-07-30  7:53 ` [PATCH 2/2] drm/i915/selftests: Replace opencoded clflush with drm_clflush_virt_range Chris Wilson
@ 2018-07-30  8:39 ` Patchwork
  2018-07-30  9:02 ` ✓ Fi.CI.BAT: success " Patchwork
  2018-07-30 10:12 ` ✓ Fi.CI.IGT: " Patchwork
  4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2018-07-30  8:39 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Kick waiters on resetting legacy rings
URL   : https://patchwork.freedesktop.org/series/47412/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
cf9560edd0f1 drm/i915: Kick waiters on resetting legacy rings
7b97a6bafa89 drm/i915/selftests: Replace opencoded clflush with drm_clflush_virt_range
-:13: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#13: 
References: 396f5d62d1a5 ("drm: Restore double clflush on the last partial cacheline")

-:13: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 396f5d62d1a5 ("drm: Restore double clflush on the last partial cacheline")'
#13: 
References: 396f5d62d1a5 ("drm: Restore double clflush on the last partial cacheline")

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

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

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

* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Kick waiters on resetting legacy rings
  2018-07-30  7:53 A pair of trivial band-aids Chris Wilson
                   ` (2 preceding siblings ...)
  2018-07-30  8:39 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Kick waiters on resetting legacy rings Patchwork
@ 2018-07-30  9:02 ` Patchwork
  2018-07-30 10:12 ` ✓ Fi.CI.IGT: " Patchwork
  4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2018-07-30  9:02 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Kick waiters on resetting legacy rings
URL   : https://patchwork.freedesktop.org/series/47412/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4591 -> Patchwork_9804 =

== Summary - SUCCESS ==

  No regressions found.

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

== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_workarounds:
      {fi-cfl-8109u}:     PASS -> DMESG-FAIL (fdo#107292)
      fi-cnl-psr:         PASS -> DMESG-FAIL (fdo#107292)

    
    ==== Possible fixes ====

    igt@drv_module_reload@basic-reload-inject:
      fi-hsw-4770r:       DMESG-WARN -> PASS

    igt@drv_selftest@live_coherency:
      fi-gdg-551:         DMESG-FAIL (fdo#107164) -> PASS

    igt@drv_selftest@live_requests:
      {fi-bsw-kefka}:     INCOMPLETE (fdo#105876) -> PASS

    igt@drv_selftest@live_workarounds:
      {fi-bsw-kefka}:     DMESG-FAIL (fdo#107292) -> PASS
      {fi-skl-iommu}:     DMESG-FAIL (fdo#107292) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-snb-2520m:       INCOMPLETE (fdo#103713) -> PASS

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

    
    ==== Warnings ====

    {igt@kms_psr@primary_page_flip}:
      fi-cnl-psr:         DMESG-FAIL (fdo#107372) -> DMESG-WARN (fdo#107372)

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

  fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
  fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
  fdo#105876 https://bugs.freedesktop.org/show_bug.cgi?id=105876
  fdo#107164 https://bugs.freedesktop.org/show_bug.cgi?id=107164
  fdo#107292 https://bugs.freedesktop.org/show_bug.cgi?id=107292
  fdo#107372 https://bugs.freedesktop.org/show_bug.cgi?id=107372


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

  Additional (1): fi-kbl-7560u 
  Missing    (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper 


== Build changes ==

    * Linux: CI_DRM_4591 -> Patchwork_9804

  CI_DRM_4591: d0ce5b9270afa8f8a3d78ccfc32917aa12ac15a1 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4580: f1c868dae24056ebc27e4f3c197724ce9b956a8a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9804: 7b97a6bafa8916efff7339bc2566d0ebf53a2489 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

7b97a6bafa89 drm/i915/selftests: Replace opencoded clflush with drm_clflush_virt_range
cf9560edd0f1 drm/i915: Kick waiters on resetting legacy rings

== Logs ==

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

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

* Re: [PATCH 2/2] drm/i915/selftests: Replace opencoded clflush with drm_clflush_virt_range
  2018-07-30  7:53 ` [PATCH 2/2] drm/i915/selftests: Replace opencoded clflush with drm_clflush_virt_range Chris Wilson
@ 2018-07-30  9:18   ` Matthew Auld
  0 siblings, 0 replies; 9+ messages in thread
From: Matthew Auld @ 2018-07-30  9:18 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Intel Graphics Development, Matthew Auld

On 30 July 2018 at 08:53, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> We occasionally see that the clflush prior to a read of GPU data is
> returning stale data, reminiscent of much earlier bugs fixed by adding a
> second clflush for serialisation. As drm_clflush_virt_range() already
> supplies the workaround, use it rather than open code the clflush
> instruction.
>
> References: 396f5d62d1a5 ("drm: Restore double clflush on the last partial cacheline")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 1/2] drm/i915: Kick waiters on resetting legacy rings
  2018-07-30  7:53 ` [PATCH 1/2] drm/i915: Kick waiters on resetting legacy rings Chris Wilson
@ 2018-07-30  9:27   ` Matthew Auld
  2018-07-30  9:39     ` Chris Wilson
  0 siblings, 1 reply; 9+ messages in thread
From: Matthew Auld @ 2018-07-30  9:27 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Intel Graphics Development, Matthew Auld

On 30 July 2018 at 08:53, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> For reasons unknown, interrupts following a reset do not arrive, but
> this can be papered over by kicking any waiter and peeking at the
> breadcrumbs following the reset.
>
> Testcase: igt/gem_eio/reset-stress
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Matthew Auld <matthew.auld@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 1/2] drm/i915: Kick waiters on resetting legacy rings
  2018-07-30  9:27   ` Matthew Auld
@ 2018-07-30  9:39     ` Chris Wilson
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2018-07-30  9:39 UTC (permalink / raw)
  To: Matthew Auld; +Cc: Intel Graphics Development, Matthew Auld

Quoting Matthew Auld (2018-07-30 10:27:00)
> On 30 July 2018 at 08:53, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > For reasons unknown, interrupts following a reset do not arrive, but
> > this can be papered over by kicking any waiter and peeking at the
> > breadcrumbs following the reset.
> >
> > Testcase: igt/gem_eio/reset-stress
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Acked-by: Matthew Auld <matthew.auld@intel.com>

Very sensible to ack a band-aid :)
Fortunately it has virtually no cost, so even if we do find the true
cause for the GPU not delivering the interrupts, it can live on.

Pushed as the patches passed full CI earlier, thanks.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915: Kick waiters on resetting legacy rings
  2018-07-30  7:53 A pair of trivial band-aids Chris Wilson
                   ` (3 preceding siblings ...)
  2018-07-30  9:02 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-07-30 10:12 ` Patchwork
  4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2018-07-30 10:12 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Kick waiters on resetting legacy rings
URL   : https://patchwork.freedesktop.org/series/47412/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4591_full -> Patchwork_9804_full =

== Summary - SUCCESS ==

  No regressions found.

  

== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

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

    
    ==== Possible fixes ====

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

    
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  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_4591 -> Patchwork_9804

  CI_DRM_4591: d0ce5b9270afa8f8a3d78ccfc32917aa12ac15a1 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4580: f1c868dae24056ebc27e4f3c197724ce9b956a8a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9804: 7b97a6bafa8916efff7339bc2566d0ebf53a2489 @ 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_9804/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2018-07-30 10:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-30  7:53 A pair of trivial band-aids Chris Wilson
2018-07-30  7:53 ` [PATCH 1/2] drm/i915: Kick waiters on resetting legacy rings Chris Wilson
2018-07-30  9:27   ` Matthew Auld
2018-07-30  9:39     ` Chris Wilson
2018-07-30  7:53 ` [PATCH 2/2] drm/i915/selftests: Replace opencoded clflush with drm_clflush_virt_range Chris Wilson
2018-07-30  9:18   ` Matthew Auld
2018-07-30  8:39 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Kick waiters on resetting legacy rings Patchwork
2018-07-30  9:02 ` ✓ Fi.CI.BAT: success " Patchwork
2018-07-30 10:12 ` ✓ Fi.CI.IGT: " 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.