* [PATCH] drm/i915: Check context status before looking up our obj/vma
@ 2017-06-21 10:39 Chris Wilson
2017-06-21 11:49 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-06-22 11:54 ` [PATCH] " Tvrtko Ursulin
0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2017-06-21 10:39 UTC (permalink / raw)
To: intel-gfx
Since we keep the context around across the slow lookup where we may
drop the struct_mutex, we should double check that the context is still
valid upon reacquisition.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
drivers/gpu/drm/i915/i915_gem_execbuffer.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index b2457556591c..0ecd2abaef3c 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -672,13 +672,6 @@ static int eb_select_context(struct i915_execbuffer *eb)
if (unlikely(!ctx))
return -ENOENT;
- if (unlikely(i915_gem_context_is_banned(ctx))) {
- DRM_DEBUG("Context %u tried to submit while banned\n",
- ctx->user_handle);
- i915_gem_context_put(ctx);
- return -EIO;
- }
-
eb->ctx = ctx;
eb->vm = ctx->ppgtt ? &ctx->ppgtt->base : &eb->i915->ggtt.base;
@@ -700,6 +693,12 @@ static int eb_lookup_vmas(struct i915_execbuffer *eb)
int slow_pass = -1;
int err;
+ if (unlikely(i915_gem_context_is_closed(eb->ctx)))
+ return -ENOENT;
+
+ if (unlikely(i915_gem_context_is_banned(eb->ctx)))
+ return -EIO;
+
INIT_LIST_HEAD(&eb->relocs);
INIT_LIST_HEAD(&eb->unbound);
--
2.11.0
_______________________________________________
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
* ✓ Fi.CI.BAT: success for drm/i915: Check context status before looking up our obj/vma
2017-06-21 10:39 [PATCH] drm/i915: Check context status before looking up our obj/vma Chris Wilson
@ 2017-06-21 11:49 ` Patchwork
2017-06-22 11:54 ` [PATCH] " Tvrtko Ursulin
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2017-06-21 11:49 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Check context status before looking up our obj/vma
URL : https://patchwork.freedesktop.org/series/26137/
State : success
== Summary ==
Series 26137v1 drm/i915: Check context status before looking up our obj/vma
https://patchwork.freedesktop.org/api/1.0/series/26137/revisions/1/mbox/
Test gem_exec_flush:
Subgroup basic-batch-kernel-default-uc:
pass -> FAIL (fi-snb-2600) fdo#100007
Test gem_exec_suspend:
Subgroup basic-s4-devices:
dmesg-warn -> PASS (fi-kbl-7560u) fdo#100125 +1
Test gem_ringfill:
Subgroup basic-default-hang:
incomplete -> TIMEOUT (fi-blb-e6850) fdo#99093 +1
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
dmesg-warn -> PASS (fi-byt-n2820) fdo#101517
fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
fdo#100125 https://bugs.freedesktop.org/show_bug.cgi?id=100125
fdo#99093 https://bugs.freedesktop.org/show_bug.cgi?id=99093
fdo#101517 https://bugs.freedesktop.org/show_bug.cgi?id=101517
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time:440s
fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time:425s
fi-blb-e6850 total:278 pass:114 dwarn:0 dfail:0 fail:0 skip:32
fi-bsw-n3050 total:278 pass:241 dwarn:1 dfail:0 fail:0 skip:36 time:543s
fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:511s
fi-byt-j1900 total:278 pass:252 dwarn:2 dfail:0 fail:0 skip:24 time:488s
fi-byt-n2820 total:278 pass:249 dwarn:1 dfail:0 fail:0 skip:28 time:477s
fi-glk-2a total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:587s
fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:432s
fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:416s
fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time:409s
fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:499s
fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:474s
fi-kbl-7500u total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:464s
fi-kbl-7560u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:567s
fi-kbl-r total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:584s
fi-pnv-d510 total:146 pass:112 dwarn:0 dfail:0 fail:0 skip:33
fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:460s
fi-skl-6700hq total:278 pass:220 dwarn:3 dfail:0 fail:30 skip:24 time:344s
fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time:469s
fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:472s
fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time:431s
fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:538s
fi-snb-2600 total:278 pass:248 dwarn:0 dfail:0 fail:1 skip:29 time:408s
186f6503dc0750d739db5d9301dc9a507eacc6ef drm-tip: 2017y-06m-21d-10h-08m-42s UTC integration manifest
792cec8 drm/i915: Check context status before looking up our obj/vma
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_5010/
_______________________________________________
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: Check context status before looking up our obj/vma
2017-06-21 10:39 [PATCH] drm/i915: Check context status before looking up our obj/vma Chris Wilson
2017-06-21 11:49 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-06-22 11:54 ` Tvrtko Ursulin
1 sibling, 0 replies; 3+ messages in thread
From: Tvrtko Ursulin @ 2017-06-22 11:54 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On 21/06/2017 11:39, Chris Wilson wrote:
> Since we keep the context around across the slow lookup where we may
> drop the struct_mutex, we should double check that the context is still
> valid upon reacquisition.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem_execbuffer.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index b2457556591c..0ecd2abaef3c 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -672,13 +672,6 @@ static int eb_select_context(struct i915_execbuffer *eb)
> if (unlikely(!ctx))
> return -ENOENT;
>
> - if (unlikely(i915_gem_context_is_banned(ctx))) {
> - DRM_DEBUG("Context %u tried to submit while banned\n",
> - ctx->user_handle);
> - i915_gem_context_put(ctx);
> - return -EIO;
> - }
> -
> eb->ctx = ctx;
> eb->vm = ctx->ppgtt ? &ctx->ppgtt->base : &eb->i915->ggtt.base;
>
> @@ -700,6 +693,12 @@ static int eb_lookup_vmas(struct i915_execbuffer *eb)
> int slow_pass = -1;
> int err;
>
> + if (unlikely(i915_gem_context_is_closed(eb->ctx)))
> + return -ENOENT;
> +
> + if (unlikely(i915_gem_context_is_banned(eb->ctx)))
> + return -EIO;
> +
> INIT_LIST_HEAD(&eb->relocs);
> INIT_LIST_HEAD(&eb->unbound);
>
>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
_______________________________________________
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:[~2017-06-22 11:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-21 10:39 [PATCH] drm/i915: Check context status before looking up our obj/vma Chris Wilson
2017-06-21 11:49 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-06-22 11:54 ` [PATCH] " Tvrtko Ursulin
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.