* [CI 1/2] drm/i915: Assert that the kernel_context is hw-id 0
@ 2017-01-23 11:31 Chris Wilson
2017-01-23 11:31 ` [CI 2/2] drm/i915: Assert that the context-switch completion matches our context Chris Wilson
2017-01-23 12:22 ` ✗ Fi.CI.BAT: warning for series starting with [CI,1/2] drm/i915: Assert that the kernel_context is hw-id 0 Patchwork
0 siblings, 2 replies; 6+ messages in thread
From: Chris Wilson @ 2017-01-23 11:31 UTC (permalink / raw)
To: intel-gfx
For easy recognisability, we want the kernel context to have id 0 and
all user contexts to have non-zero ids.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_gem_context.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index 17f90c618208..77458da9627d 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -451,6 +451,11 @@ int i915_gem_context_init(struct drm_i915_private *dev_priv)
return PTR_ERR(ctx);
}
+ /* For easy recognisablity, we want the kernel context to be 0 and then
+ * all user contexts will have non-zero hw_id.
+ */
+ GEM_BUG_ON(ctx->hw_id);
+
i915_gem_context_clear_bannable(ctx);
ctx->priority = I915_PRIORITY_MIN; /* lowest priority; idle task */
dev_priv->kernel_context = ctx;
--
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] 6+ messages in thread
* [CI 2/2] drm/i915: Assert that the context-switch completion matches our context
2017-01-23 11:31 [CI 1/2] drm/i915: Assert that the kernel_context is hw-id 0 Chris Wilson
@ 2017-01-23 11:31 ` Chris Wilson
2017-01-23 11:49 ` Joonas Lahtinen
2017-01-23 11:59 ` Tvrtko Ursulin
2017-01-23 12:22 ` ✗ Fi.CI.BAT: warning for series starting with [CI,1/2] drm/i915: Assert that the kernel_context is hw-id 0 Patchwork
1 sibling, 2 replies; 6+ messages in thread
From: Chris Wilson @ 2017-01-23 11:31 UTC (permalink / raw)
To: intel-gfx
When execlists signals the context completion, it also provides the
context id for the status event. Assert that id matches the one we expect.
v2: The upper dword of the context status is a duplicate of the upper
dword from elsp submission (i.e. includes the group id as well as the
context id). Include this check as well.
v3: Only check against lrc_desc (as this contains the hw_id check)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
drivers/gpu/drm/i915/intel_lrc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 432ee495dec2..eceffe25c022 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -595,6 +595,11 @@ static void intel_lrc_irq_handler(unsigned long data)
if (!(status & GEN8_CTX_STATUS_COMPLETED_MASK))
continue;
+ /* Check the context/desc id for this event matches */
+ GEM_BUG_ON(readl(buf + 2 * idx + 1) !=
+ upper_32_bits(intel_lr_context_descriptor(port[0].request->ctx,
+ engine)));
+
GEM_BUG_ON(port[0].count == 0);
if (--port[0].count == 0) {
GEM_BUG_ON(status & GEN8_CTX_STATUS_PREEMPTED);
--
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] 6+ messages in thread* Re: [CI 2/2] drm/i915: Assert that the context-switch completion matches our context
2017-01-23 11:31 ` [CI 2/2] drm/i915: Assert that the context-switch completion matches our context Chris Wilson
@ 2017-01-23 11:49 ` Joonas Lahtinen
2017-01-23 11:59 ` Tvrtko Ursulin
1 sibling, 0 replies; 6+ messages in thread
From: Joonas Lahtinen @ 2017-01-23 11:49 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On ma, 2017-01-23 at 11:31 +0000, Chris Wilson wrote:
> When execlists signals the context completion, it also provides the
> context id for the status event. Assert that id matches the one we expect.
>
> v2: The upper dword of the context status is a duplicate of the upper
> dword from elsp submission (i.e. includes the group id as well as the
> context id). Include this check as well.
> v3: Only check against lrc_desc (as this contains the hw_id check)
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
In the spirit of my original suggestion, so;
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [CI 2/2] drm/i915: Assert that the context-switch completion matches our context
2017-01-23 11:31 ` [CI 2/2] drm/i915: Assert that the context-switch completion matches our context Chris Wilson
2017-01-23 11:49 ` Joonas Lahtinen
@ 2017-01-23 11:59 ` Tvrtko Ursulin
1 sibling, 0 replies; 6+ messages in thread
From: Tvrtko Ursulin @ 2017-01-23 11:59 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On 23/01/2017 11:31, Chris Wilson wrote:
> When execlists signals the context completion, it also provides the
> context id for the status event. Assert that id matches the one we expect.
>
> v2: The upper dword of the context status is a duplicate of the upper
> dword from elsp submission (i.e. includes the group id as well as the
> context id). Include this check as well.
> v3: Only check against lrc_desc (as this contains the hw_id check)
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
> drivers/gpu/drm/i915/intel_lrc.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 432ee495dec2..eceffe25c022 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -595,6 +595,11 @@ static void intel_lrc_irq_handler(unsigned long data)
> if (!(status & GEN8_CTX_STATUS_COMPLETED_MASK))
> continue;
>
> + /* Check the context/desc id for this event matches */
> + GEM_BUG_ON(readl(buf + 2 * idx + 1) !=
> + upper_32_bits(intel_lr_context_descriptor(port[0].request->ctx,
> + engine)));
> +
> GEM_BUG_ON(port[0].count == 0);
> if (--port[0].count == 0) {
> GEM_BUG_ON(status & GEN8_CTX_STATUS_PREEMPTED);
>
I'm happy with this one as well.
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] 6+ messages in thread
* ✗ Fi.CI.BAT: warning for series starting with [CI,1/2] drm/i915: Assert that the kernel_context is hw-id 0
2017-01-23 11:31 [CI 1/2] drm/i915: Assert that the kernel_context is hw-id 0 Chris Wilson
2017-01-23 11:31 ` [CI 2/2] drm/i915: Assert that the context-switch completion matches our context Chris Wilson
@ 2017-01-23 12:22 ` Patchwork
2017-01-23 12:28 ` Chris Wilson
1 sibling, 1 reply; 6+ messages in thread
From: Patchwork @ 2017-01-23 12:22 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: series starting with [CI,1/2] drm/i915: Assert that the kernel_context is hw-id 0
URL : https://patchwork.freedesktop.org/series/18402/
State : warning
== Summary ==
Series 18402v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/18402/revisions/1/mbox/
Test kms_force_connector_basic:
Subgroup force-edid:
pass -> DMESG-WARN (fi-snb-2520m)
fi-bdw-5557u total:246 pass:232 dwarn:0 dfail:0 fail:0 skip:14
fi-bsw-n3050 total:246 pass:207 dwarn:0 dfail:0 fail:0 skip:39
fi-bxt-j4205 total:246 pass:224 dwarn:0 dfail:0 fail:0 skip:22
fi-byt-j1900 total:246 pass:219 dwarn:0 dfail:0 fail:0 skip:27
fi-byt-n2820 total:246 pass:215 dwarn:0 dfail:0 fail:0 skip:31
fi-hsw-4770 total:246 pass:227 dwarn:0 dfail:0 fail:0 skip:19
fi-hsw-4770r total:246 pass:227 dwarn:0 dfail:0 fail:0 skip:19
fi-ivb-3520m total:246 pass:225 dwarn:0 dfail:0 fail:0 skip:21
fi-ivb-3770 total:246 pass:225 dwarn:0 dfail:0 fail:0 skip:21
fi-kbl-7500u total:246 pass:225 dwarn:0 dfail:0 fail:0 skip:21
fi-skl-6260u total:246 pass:233 dwarn:0 dfail:0 fail:0 skip:13
fi-skl-6700hq total:246 pass:226 dwarn:0 dfail:0 fail:0 skip:20
fi-skl-6700k total:246 pass:222 dwarn:3 dfail:0 fail:0 skip:21
fi-skl-6770hq total:246 pass:233 dwarn:0 dfail:0 fail:0 skip:13
fi-snb-2520m total:246 pass:214 dwarn:1 dfail:0 fail:0 skip:31
fi-snb-2600 total:246 pass:214 dwarn:0 dfail:0 fail:0 skip:32
fi-bxt-t5700 failed to collect. IGT log at Patchwork_3580/fi-bxt-t5700/igt.log
3599f990bcb8b72f9ae062a97140439ab9df22b7 drm-tip: 2017y-01m-23d-09h-16m-39s UTC integration manifest
978d2eb drm/i915: Assert that the context-switch completion matches our context
82d9e98 drm/i915: Assert that the kernel_context is hw-id 0
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3580/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-01-23 12:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-23 11:31 [CI 1/2] drm/i915: Assert that the kernel_context is hw-id 0 Chris Wilson
2017-01-23 11:31 ` [CI 2/2] drm/i915: Assert that the context-switch completion matches our context Chris Wilson
2017-01-23 11:49 ` Joonas Lahtinen
2017-01-23 11:59 ` Tvrtko Ursulin
2017-01-23 12:22 ` ✗ Fi.CI.BAT: warning for series starting with [CI,1/2] drm/i915: Assert that the kernel_context is hw-id 0 Patchwork
2017-01-23 12:28 ` Chris Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox