* [PATCH] drm/i915: Unconditionally flush any chipset buffers before execbuf
@ 2016-08-16 12:14 Chris Wilson
2016-08-16 12:41 ` ✗ Ro.CI.BAT: failure for " Patchwork
2016-08-16 14:01 ` [PATCH] " Mika Kuoppala
0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2016-08-16 12:14 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Vetter, Akash Goel, stable
If userspace is asynchronously streaming into the batch or other
execobjects, we may not flush those writes along with a change in cache
domain (as there is no change). Therefore those writes may end up in
internal chipset buffers and not visible to the GPU upon execution. We
must issue a flush command or otherwise we encounter incoherency in the
batchbuffers and the GPU executing invalid commands (i.e. hanging) quite
regularly.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90841
Fixes: 1816f9236303 ("drm/i915: Support creation of unbound wc user...")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Akash Goel <akash.goel@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Tested-by: Matti Hämäläinen <ccr@tnsp.org>
Cc: stable@vger.kernel.org
---
drivers/gpu/drm/i915/i915_gem_execbuffer.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 699315304748..75957aef6219 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -1016,7 +1016,6 @@ i915_gem_execbuffer_move_to_gpu(struct drm_i915_gem_request *req,
const unsigned int other_rings = eb_other_engines(req);
struct i915_vma *vma;
uint32_t flush_domains = 0;
- bool flush_chipset = false;
int ret;
list_for_each_entry(vma, vmas, exec_list) {
@@ -1029,16 +1028,13 @@ i915_gem_execbuffer_move_to_gpu(struct drm_i915_gem_request *req,
}
if (obj->base.write_domain & I915_GEM_DOMAIN_CPU)
- flush_chipset |= i915_gem_clflush_object(obj, false);
+ i915_gem_clflush_object(obj, false);
flush_domains |= obj->base.write_domain;
}
- if (flush_chipset)
- i915_gem_chipset_flush(req->engine->i915);
-
- if (flush_domains & I915_GEM_DOMAIN_GTT)
- wmb();
+ /* Unconditionally flush any chipset caches (for streaming writes). */
+ i915_gem_chipset_flush(req->engine->i915);
/* Unconditionally invalidate GPU caches and TLBs. */
return req->engine->emit_flush(req, EMIT_INVALIDATE);
--
2.8.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* ✗ Ro.CI.BAT: failure for drm/i915: Unconditionally flush any chipset buffers before execbuf
2016-08-16 12:14 [PATCH] drm/i915: Unconditionally flush any chipset buffers before execbuf Chris Wilson
@ 2016-08-16 12:41 ` Patchwork
2016-08-16 14:01 ` [PATCH] " Mika Kuoppala
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2016-08-16 12:41 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Unconditionally flush any chipset buffers before execbuf
URL : https://patchwork.freedesktop.org/series/11160/
State : failure
== Summary ==
Series 11160v1 drm/i915: Unconditionally flush any chipset buffers before execbuf
http://patchwork.freedesktop.org/api/1.0/series/11160/revisions/1/mbox
Test kms_cursor_legacy:
Subgroup basic-flip-vs-cursor-legacy:
pass -> FAIL (ro-skl3-i5-6260u)
pass -> FAIL (ro-bdw-i5-5250u)
Subgroup basic-flip-vs-cursor-varying-size:
fail -> PASS (ro-skl3-i5-6260u)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
skip -> DMESG-WARN (ro-bdw-i5-5250u)
Subgroup suspend-read-crc-pipe-c:
pass -> DMESG-WARN (ro-bdw-i7-5600u)
fi-kbl-qkkr total:244 pass:187 dwarn:29 dfail:0 fail:2 skip:26
fi-skl-i7-6700k total:244 pass:208 dwarn:4 dfail:2 fail:2 skip:28
fi-snb-i7-2600 total:244 pass:202 dwarn:0 dfail:0 fail:0 skip:42
ro-bdw-i5-5250u total:240 pass:218 dwarn:2 dfail:0 fail:2 skip:18
ro-bdw-i7-5600u total:240 pass:206 dwarn:1 dfail:0 fail:1 skip:32
ro-bsw-n3050 total:240 pass:194 dwarn:0 dfail:0 fail:4 skip:42
ro-byt-n2820 total:240 pass:197 dwarn:0 dfail:0 fail:3 skip:40
ro-hsw-i3-4010u total:240 pass:214 dwarn:0 dfail:0 fail:0 skip:26
ro-hsw-i7-4770r total:240 pass:185 dwarn:0 dfail:0 fail:0 skip:55
ro-ilk1-i5-650 total:235 pass:174 dwarn:0 dfail:0 fail:1 skip:60
ro-ivb-i7-3770 total:240 pass:205 dwarn:0 dfail:0 fail:0 skip:35
ro-ivb2-i7-3770 total:240 pass:209 dwarn:0 dfail:0 fail:0 skip:31
ro-skl3-i5-6260u total:240 pass:223 dwarn:0 dfail:0 fail:3 skip:14
Results at /archive/results/CI_IGT_test/RO_Patchwork_1891/
ab22a8a drm-intel-nightly: 2016y-08m-16d-09h-55m-52s UTC integration manifest
2d7b6da drm/i915: Unconditionally flush any chipset buffers before execbuf
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Unconditionally flush any chipset buffers before execbuf
2016-08-16 12:14 [PATCH] drm/i915: Unconditionally flush any chipset buffers before execbuf Chris Wilson
2016-08-16 12:41 ` ✗ Ro.CI.BAT: failure for " Patchwork
@ 2016-08-16 14:01 ` Mika Kuoppala
1 sibling, 0 replies; 3+ messages in thread
From: Mika Kuoppala @ 2016-08-16 14:01 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: Daniel Vetter, Akash Goel, stable
Chris Wilson <chris@chris-wilson.co.uk> writes:
> If userspace is asynchronously streaming into the batch or other
> execobjects, we may not flush those writes along with a change in cache
> domain (as there is no change). Therefore those writes may end up in
> internal chipset buffers and not visible to the GPU upon execution. We
> must issue a flush command or otherwise we encounter incoherency in the
> batchbuffers and the GPU executing invalid commands (i.e. hanging) quite
> regularly.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90841
> Fixes: 1816f9236303 ("drm/i915: Support creation of unbound wc user...")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Akash Goel <akash.goel@intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Tested-by: Matti Hämäläinen <ccr@tnsp.org>
> Cc: stable@vger.kernel.org
> ---
> drivers/gpu/drm/i915/i915_gem_execbuffer.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index 699315304748..75957aef6219 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -1016,7 +1016,6 @@ i915_gem_execbuffer_move_to_gpu(struct drm_i915_gem_request *req,
> const unsigned int other_rings = eb_other_engines(req);
> struct i915_vma *vma;
> uint32_t flush_domains = 0;
You don't need flush_domains, with this version.
> - bool flush_chipset = false;
> int ret;
>
> list_for_each_entry(vma, vmas, exec_list) {
> @@ -1029,16 +1028,13 @@ i915_gem_execbuffer_move_to_gpu(struct drm_i915_gem_request *req,
> }
>
> if (obj->base.write_domain & I915_GEM_DOMAIN_CPU)
> - flush_chipset |= i915_gem_clflush_object(obj, false);
> + i915_gem_clflush_object(obj, false);
>
> flush_domains |= obj->base.write_domain;
> }
>
> - if (flush_chipset)
> - i915_gem_chipset_flush(req->engine->i915);
> -
> - if (flush_domains & I915_GEM_DOMAIN_GTT)
> - wmb();
> + /* Unconditionally flush any chipset caches (for streaming writes). */
> + i915_gem_chipset_flush(req->engine->i915);
>
> /* Unconditionally invalidate GPU caches and TLBs. */
> return req->engine->emit_flush(req, EMIT_INVALIDATE);
> --
> 2.8.1
>
> _______________________________________________
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-16 14:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-16 12:14 [PATCH] drm/i915: Unconditionally flush any chipset buffers before execbuf Chris Wilson
2016-08-16 12:41 ` ✗ Ro.CI.BAT: failure for " Patchwork
2016-08-16 14:01 ` [PATCH] " Mika Kuoppala
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox