* [PATCH] drm/i915: get a runtime PM ref in i915_wedged_set
@ 2017-03-14 0:26 Michel Thierry
2017-03-14 0:47 ` ✓ Fi.CI.BAT: success for " Patchwork
` (6 more replies)
0 siblings, 7 replies; 12+ messages in thread
From: Michel Thierry @ 2017-03-14 0:26 UTC (permalink / raw)
To: intel-gfx
At least in bxt (with decoupled mmio), it prevents a warning while
capturing the reg state:
[ ] WARNING: assert_rpm_wakelock_held.part.4+0x1e/0x20 [i915]
[ ] RPM wakelock ref not held during HW access
[ ] Call Trace:
[ ] dump_stack+0x63/0x87
[ ] __warn+0xd1/0xf0
[ ] ? fwtable_write32+0x1a0/0x1a0 [i915]
[ ] warn_slowpath_fmt+0x4f/0x60
[ ] ? vprintk_default+0x29/0x50
[ ] assert_rpm_wakelock_held.part.4+0x1e/0x20 [i915]
[ ] gen9_decoupled_read32+0x18a/0x1a0 [i915]
[ ] ? fwtable_write32+0x1a0/0x1a0 [i915]
[ ] i915_handle_error+0x1d0/0x260 [i915]
[ ] ? __check_object_size+0x170/0x1aa
[ ] i915_wedged_set+0x25/0x30 [i915]
These get/put were removed by commit 9c870d03674f ("drm/i915: Use RPM as the
barrier for controlling user mmap access"), before decoupled mmio was
added in commit 85ee17ebeedd ("drm/i915/bxt: Broxton decoupled MMIO).
Reported-by: Antonio Argenziano <antonio.argenziano@intel.com>
Signed-off-by: Michel Thierry <michel.thierry@intel.com>
---
drivers/gpu/drm/i915/i915_debugfs.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 9fcc4f1a86fc..89f211391ef9 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -4155,9 +4155,13 @@ i915_wedged_set(void *data, u64 val)
if (i915_reset_in_progress(&dev_priv->gpu_error))
return -EAGAIN;
+ intel_runtime_pm_get(dev_priv);
+
i915_handle_error(dev_priv, val,
"Manually setting wedged to %llu", val);
+ intel_runtime_pm_put(dev_priv);
+
return 0;
}
--
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] 12+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: get a runtime PM ref in i915_wedged_set
2017-03-14 0:26 [PATCH] drm/i915: get a runtime PM ref in i915_wedged_set Michel Thierry
@ 2017-03-14 0:47 ` Patchwork
2017-03-14 9:09 ` [PATCH] " Chris Wilson
` (5 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2017-03-14 0:47 UTC (permalink / raw)
To: Michel Thierry; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: get a runtime PM ref in i915_wedged_set
URL : https://patchwork.freedesktop.org/series/21184/
State : success
== Summary ==
Series 21184v1 drm/i915: get a runtime PM ref in i915_wedged_set
https://patchwork.freedesktop.org/api/1.0/series/21184/revisions/1/mbox/
Test gem_exec_flush:
Subgroup basic-batch-kernel-default-uc:
pass -> FAIL (fi-snb-2600) fdo#100007
fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time: 452s
fi-bsw-n3050 total:278 pass:239 dwarn:0 dfail:0 fail:0 skip:39 time: 585s
fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time: 542s
fi-bxt-t5700 total:278 pass:258 dwarn:0 dfail:0 fail:0 skip:20 time: 582s
fi-byt-j1900 total:278 pass:251 dwarn:0 dfail:0 fail:0 skip:27 time: 500s
fi-byt-n2820 total:278 pass:247 dwarn:0 dfail:0 fail:0 skip:31 time: 498s
fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time: 435s
fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time: 433s
fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time: 443s
fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 503s
fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 498s
fi-kbl-7500u total:278 pass:259 dwarn:1 dfail:0 fail:0 skip:18 time: 481s
fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time: 504s
fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 time: 595s
fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time: 502s
fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time: 533s
fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time: 545s
fi-snb-2600 total:278 pass:248 dwarn:0 dfail:0 fail:1 skip:29 time: 420s
7748ac05e8cd90e45f039d434ac4e600e54fe6e9 drm-tip: 2017y-03m-13d-20h-07m-51s UTC integration manifest
0248f02 drm/i915: get a runtime PM ref in i915_wedged_set
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4159/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/i915: get a runtime PM ref in i915_wedged_set
2017-03-14 0:26 [PATCH] drm/i915: get a runtime PM ref in i915_wedged_set Michel Thierry
2017-03-14 0:47 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-03-14 9:09 ` Chris Wilson
2017-03-14 17:05 ` Michel Thierry
2017-03-14 16:37 ` Antonio Argenziano
` (4 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Chris Wilson @ 2017-03-14 9:09 UTC (permalink / raw)
To: Michel Thierry; +Cc: intel-gfx
On Mon, Mar 13, 2017 at 05:26:06PM -0700, Michel Thierry wrote:
> At least in bxt (with decoupled mmio), it prevents a warning while
> capturing the reg state:
>
> [ ] WARNING: assert_rpm_wakelock_held.part.4+0x1e/0x20 [i915]
> [ ] RPM wakelock ref not held during HW access
> [ ] Call Trace:
> [ ] dump_stack+0x63/0x87
> [ ] __warn+0xd1/0xf0
> [ ] ? fwtable_write32+0x1a0/0x1a0 [i915]
> [ ] warn_slowpath_fmt+0x4f/0x60
> [ ] ? vprintk_default+0x29/0x50
> [ ] assert_rpm_wakelock_held.part.4+0x1e/0x20 [i915]
> [ ] gen9_decoupled_read32+0x18a/0x1a0 [i915]
> [ ] ? fwtable_write32+0x1a0/0x1a0 [i915]
> [ ] i915_handle_error+0x1d0/0x260 [i915]
> [ ] ? __check_object_size+0x170/0x1aa
> [ ] i915_wedged_set+0x25/0x30 [i915]
>
> These get/put were removed by commit 9c870d03674f ("drm/i915: Use RPM as the
> barrier for controlling user mmap access"), before decoupled mmio was
> added in commit 85ee17ebeedd ("drm/i915/bxt: Broxton decoupled MMIO).
>
> Reported-by: Antonio Argenziano <antonio.argenziano@intel.com>
> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 9fcc4f1a86fc..89f211391ef9 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -4155,9 +4155,13 @@ i915_wedged_set(void *data, u64 val)
> if (i915_reset_in_progress(&dev_priv->gpu_error))
> return -EAGAIN;
>
> + intel_runtime_pm_get(dev_priv);
They don't belong here. i915_handle_error is already taking rpm, it just
forgot a path.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/i915: get a runtime PM ref in i915_wedged_set
2017-03-14 0:26 [PATCH] drm/i915: get a runtime PM ref in i915_wedged_set Michel Thierry
2017-03-14 0:47 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-03-14 9:09 ` [PATCH] " Chris Wilson
@ 2017-03-14 16:37 ` Antonio Argenziano
2017-03-14 17:18 ` [PATCH] drm/i915: Extend rpm wakelock during i915_handle_error() Chris Wilson
` (3 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Antonio Argenziano @ 2017-03-14 16:37 UTC (permalink / raw)
To: Michel Thierry, intel-gfx
On 13/03/17 17:26, Michel Thierry wrote:
> At least in bxt (with decoupled mmio), it prevents a warning while
> capturing the reg state:
>
> [ ] WARNING: assert_rpm_wakelock_held.part.4+0x1e/0x20 [i915]
> [ ] RPM wakelock ref not held during HW access
> [ ] Call Trace:
> [ ] dump_stack+0x63/0x87
> [ ] __warn+0xd1/0xf0
> [ ] ? fwtable_write32+0x1a0/0x1a0 [i915]
> [ ] warn_slowpath_fmt+0x4f/0x60
> [ ] ? vprintk_default+0x29/0x50
> [ ] assert_rpm_wakelock_held.part.4+0x1e/0x20 [i915]
> [ ] gen9_decoupled_read32+0x18a/0x1a0 [i915]
> [ ] ? fwtable_write32+0x1a0/0x1a0 [i915]
> [ ] i915_handle_error+0x1d0/0x260 [i915]
> [ ] ? __check_object_size+0x170/0x1aa
> [ ] i915_wedged_set+0x25/0x30 [i915]
>
> These get/put were removed by commit 9c870d03674f ("drm/i915: Use RPM as the
> barrier for controlling user mmap access"), before decoupled mmio was
> added in commit 85ee17ebeedd ("drm/i915/bxt: Broxton decoupled MMIO).
>
> Reported-by: Antonio Argenziano <antonio.argenziano@intel.com>
> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
Tested-By: Antonio Argenziano <antonio.argenziano@intel.com>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 9fcc4f1a86fc..89f211391ef9 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -4155,9 +4155,13 @@ i915_wedged_set(void *data, u64 val)
> if (i915_reset_in_progress(&dev_priv->gpu_error))
> return -EAGAIN;
>
> + intel_runtime_pm_get(dev_priv);
> +
> i915_handle_error(dev_priv, val,
> "Manually setting wedged to %llu", val);
>
> + intel_runtime_pm_put(dev_priv);
> +
> return 0;
> }
>
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/i915: get a runtime PM ref in i915_wedged_set
2017-03-14 9:09 ` [PATCH] " Chris Wilson
@ 2017-03-14 17:05 ` Michel Thierry
2017-03-14 17:12 ` Chris Wilson
0 siblings, 1 reply; 12+ messages in thread
From: Michel Thierry @ 2017-03-14 17:05 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On 3/14/2017 2:09 AM, Chris Wilson wrote:
> On Mon, Mar 13, 2017 at 05:26:06PM -0700, Michel Thierry wrote:
>> At least in bxt (with decoupled mmio), it prevents a warning while
>> capturing the reg state:
>>
>> [ ] WARNING: assert_rpm_wakelock_held.part.4+0x1e/0x20 [i915]
>> [ ] RPM wakelock ref not held during HW access
>> [ ] Call Trace:
>> [ ] dump_stack+0x63/0x87
>> [ ] __warn+0xd1/0xf0
>> [ ] ? fwtable_write32+0x1a0/0x1a0 [i915]
>> [ ] warn_slowpath_fmt+0x4f/0x60
>> [ ] ? vprintk_default+0x29/0x50
>> [ ] assert_rpm_wakelock_held.part.4+0x1e/0x20 [i915]
>> [ ] gen9_decoupled_read32+0x18a/0x1a0 [i915]
>> [ ] ? fwtable_write32+0x1a0/0x1a0 [i915]
>> [ ] i915_handle_error+0x1d0/0x260 [i915]
>> [ ] ? __check_object_size+0x170/0x1aa
>> [ ] i915_wedged_set+0x25/0x30 [i915]
>>
>> These get/put were removed by commit 9c870d03674f ("drm/i915: Use RPM as the
>> barrier for controlling user mmap access"), before decoupled mmio was
>> added in commit 85ee17ebeedd ("drm/i915/bxt: Broxton decoupled MMIO).
>>
>> Reported-by: Antonio Argenziano <antonio.argenziano@intel.com>
>> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
>> ---
>> drivers/gpu/drm/i915/i915_debugfs.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
>> index 9fcc4f1a86fc..89f211391ef9 100644
>> --- a/drivers/gpu/drm/i915/i915_debugfs.c
>> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
>> @@ -4155,9 +4155,13 @@ i915_wedged_set(void *data, u64 val)
>> if (i915_reset_in_progress(&dev_priv->gpu_error))
>> return -EAGAIN;
>>
>> + intel_runtime_pm_get(dev_priv);
>
> They don't belong here. i915_handle_error is already taking rpm, it just
> forgot a path.
Oh, I should have looked at your tree first ;)
(https://cgit.freedesktop.org/~ickle/linux-2.6/commit/drivers/gpu/drm/i915?h=prescheduler&id=e190db9f6898b60dc8905d6c5bf2dcd7ec759d7f)
But the rpm still needs to cover capture_error_state.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/i915: get a runtime PM ref in i915_wedged_set
2017-03-14 17:05 ` Michel Thierry
@ 2017-03-14 17:12 ` Chris Wilson
0 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2017-03-14 17:12 UTC (permalink / raw)
To: Michel Thierry; +Cc: intel-gfx
On Tue, Mar 14, 2017 at 10:05:08AM -0700, Michel Thierry wrote:
> On 3/14/2017 2:09 AM, Chris Wilson wrote:
> >On Mon, Mar 13, 2017 at 05:26:06PM -0700, Michel Thierry wrote:
> >>At least in bxt (with decoupled mmio), it prevents a warning while
> >>capturing the reg state:
> >>
> >> [ ] WARNING: assert_rpm_wakelock_held.part.4+0x1e/0x20 [i915]
> >> [ ] RPM wakelock ref not held during HW access
> >> [ ] Call Trace:
> >> [ ] dump_stack+0x63/0x87
> >> [ ] __warn+0xd1/0xf0
> >> [ ] ? fwtable_write32+0x1a0/0x1a0 [i915]
> >> [ ] warn_slowpath_fmt+0x4f/0x60
> >> [ ] ? vprintk_default+0x29/0x50
> >> [ ] assert_rpm_wakelock_held.part.4+0x1e/0x20 [i915]
> >> [ ] gen9_decoupled_read32+0x18a/0x1a0 [i915]
> >> [ ] ? fwtable_write32+0x1a0/0x1a0 [i915]
> >> [ ] i915_handle_error+0x1d0/0x260 [i915]
> >> [ ] ? __check_object_size+0x170/0x1aa
> >> [ ] i915_wedged_set+0x25/0x30 [i915]
> >>
> >>These get/put were removed by commit 9c870d03674f ("drm/i915: Use RPM as the
> >>barrier for controlling user mmap access"), before decoupled mmio was
> >>added in commit 85ee17ebeedd ("drm/i915/bxt: Broxton decoupled MMIO).
> >>
> >>Reported-by: Antonio Argenziano <antonio.argenziano@intel.com>
> >>Signed-off-by: Michel Thierry <michel.thierry@intel.com>
> >>---
> >> drivers/gpu/drm/i915/i915_debugfs.c | 4 ++++
> >> 1 file changed, 4 insertions(+)
> >>
> >>diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> >>index 9fcc4f1a86fc..89f211391ef9 100644
> >>--- a/drivers/gpu/drm/i915/i915_debugfs.c
> >>+++ b/drivers/gpu/drm/i915/i915_debugfs.c
> >>@@ -4155,9 +4155,13 @@ i915_wedged_set(void *data, u64 val)
> >> if (i915_reset_in_progress(&dev_priv->gpu_error))
> >> return -EAGAIN;
> >>
> >>+ intel_runtime_pm_get(dev_priv);
> >
> >They don't belong here. i915_handle_error is already taking rpm, it just
> >forgot a path.
>
> Oh, I should have looked at your tree first ;)
> (https://cgit.freedesktop.org/~ickle/linux-2.6/commit/drivers/gpu/drm/i915?h=prescheduler&id=e190db9f6898b60dc8905d6c5bf2dcd7ec759d7f)
Ho hum.
> But the rpm still needs to cover capture_error_state.
And the error register reset, yeah.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] drm/i915: Extend rpm wakelock during i915_handle_error()
2017-03-14 0:26 [PATCH] drm/i915: get a runtime PM ref in i915_wedged_set Michel Thierry
` (2 preceding siblings ...)
2017-03-14 16:37 ` Antonio Argenziano
@ 2017-03-14 17:18 ` Chris Wilson
2017-03-14 17:24 ` Michel Thierry
2017-03-15 8:32 ` ✗ Fi.CI.BAT: failure for drm/i915: get a runtime PM ref in i915_wedged_set (rev2) Patchwork
` (2 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Chris Wilson @ 2017-03-14 17:18 UTC (permalink / raw)
To: intel-gfx
We take the runtime pm wakelock during i915_handle_error() to ensure
that all paths that reach the error capture keep the device awake during
the hw reads. However, we need to extend that from the reset handler to
include the earlier capture routines.
Reported-by: Antonio Argenziano <antonio.argenziano@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michel Thierry <michel.thierry@intel.com>
---
drivers/gpu/drm/i915/i915_irq.c | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 31f0d7c8992f..52e1fe8a98fb 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2664,14 +2664,6 @@ static void i915_reset_and_wakeup(struct drm_i915_private *dev_priv)
DRM_DEBUG_DRIVER("resetting chip\n");
kobject_uevent_env(kobj, KOBJ_CHANGE, reset_event);
- /*
- * In most cases it's guaranteed that we get here with an RPM
- * reference held, for example because there is a pending GPU
- * request that won't finish until the reset is done. This
- * isn't the case at least when we get here by doing a
- * simulated reset via debugs, so get an RPM reference.
- */
- intel_runtime_pm_get(dev_priv);
intel_prepare_reset(dev_priv);
do {
@@ -2693,7 +2685,6 @@ static void i915_reset_and_wakeup(struct drm_i915_private *dev_priv)
HZ));
intel_finish_reset(dev_priv);
- intel_runtime_pm_put(dev_priv);
if (!test_bit(I915_WEDGED, &dev_priv->gpu_error.flags))
kobject_uevent_env(kobj,
@@ -2780,15 +2771,24 @@ void i915_handle_error(struct drm_i915_private *dev_priv,
vscnprintf(error_msg, sizeof(error_msg), fmt, args);
va_end(args);
+ /*
+ * In most cases it's guaranteed that we get here with an RPM
+ * reference held, for example because there is a pending GPU
+ * request that won't finish until the reset is done. This
+ * isn't the case at least when we get here by doing a
+ * simulated reset via debugfs, so get an RPM reference.
+ */
+ intel_runtime_pm_get(dev_priv);
+
i915_capture_error_state(dev_priv, engine_mask, error_msg);
i915_clear_error_registers(dev_priv);
if (!engine_mask)
- return;
+ goto out;
if (test_and_set_bit(I915_RESET_IN_PROGRESS,
&dev_priv->gpu_error.flags))
- return;
+ goto out;
/*
* Wakeup waiting processes so that the reset function
@@ -2805,6 +2805,9 @@ void i915_handle_error(struct drm_i915_private *dev_priv,
i915_error_wake_up(dev_priv);
i915_reset_and_wakeup(dev_priv);
+
+out:
+ intel_runtime_pm_put(dev_priv);
}
/* Called from drm generic code, passed 'crtc' which
--
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] 12+ messages in thread
* Re: [PATCH] drm/i915: Extend rpm wakelock during i915_handle_error()
2017-03-14 17:18 ` [PATCH] drm/i915: Extend rpm wakelock during i915_handle_error() Chris Wilson
@ 2017-03-14 17:24 ` Michel Thierry
2017-03-15 15:45 ` Chris Wilson
0 siblings, 1 reply; 12+ messages in thread
From: Michel Thierry @ 2017-03-14 17:24 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On 3/14/2017 10:18 AM, Chris Wilson wrote:
> We take the runtime pm wakelock during i915_handle_error() to ensure
> that all paths that reach the error capture keep the device awake during
> the hw reads. However, we need to extend that from the reset handler to
> include the earlier capture routines.
>
> Reported-by: Antonio Argenziano <antonio.argenziano@intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michel Thierry <michel.thierry@intel.com>
> ---
> drivers/gpu/drm/i915/i915_irq.c | 25 ++++++++++++++-----------
> 1 file changed, 14 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 31f0d7c8992f..52e1fe8a98fb 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -2664,14 +2664,6 @@ static void i915_reset_and_wakeup(struct drm_i915_private *dev_priv)
> DRM_DEBUG_DRIVER("resetting chip\n");
> kobject_uevent_env(kobj, KOBJ_CHANGE, reset_event);
>
> - /*
> - * In most cases it's guaranteed that we get here with an RPM
> - * reference held, for example because there is a pending GPU
> - * request that won't finish until the reset is done. This
> - * isn't the case at least when we get here by doing a
> - * simulated reset via debugs, so get an RPM reference.
> - */
> - intel_runtime_pm_get(dev_priv);
> intel_prepare_reset(dev_priv);
>
> do {
> @@ -2693,7 +2685,6 @@ static void i915_reset_and_wakeup(struct drm_i915_private *dev_priv)
> HZ));
>
> intel_finish_reset(dev_priv);
> - intel_runtime_pm_put(dev_priv);
>
> if (!test_bit(I915_WEDGED, &dev_priv->gpu_error.flags))
> kobject_uevent_env(kobj,
> @@ -2780,15 +2771,24 @@ void i915_handle_error(struct drm_i915_private *dev_priv,
> vscnprintf(error_msg, sizeof(error_msg), fmt, args);
> va_end(args);
>
> + /*
> + * In most cases it's guaranteed that we get here with an RPM
> + * reference held, for example because there is a pending GPU
> + * request that won't finish until the reset is done. This
> + * isn't the case at least when we get here by doing a
> + * simulated reset via debugfs, so get an RPM reference.
> + */
> + intel_runtime_pm_get(dev_priv);
> +
> i915_capture_error_state(dev_priv, engine_mask, error_msg);
> i915_clear_error_registers(dev_priv);
>
> if (!engine_mask)
> - return;
> + goto out;
>
> if (test_and_set_bit(I915_RESET_IN_PROGRESS,
> &dev_priv->gpu_error.flags))
> - return;
> + goto out;
>
> /*
> * Wakeup waiting processes so that the reset function
> @@ -2805,6 +2805,9 @@ void i915_handle_error(struct drm_i915_private *dev_priv,
> i915_error_wake_up(dev_priv);
>
> i915_reset_and_wakeup(dev_priv);
> +
> +out:
> + intel_runtime_pm_put(dev_priv);
> }
>
> /* Called from drm generic code, passed 'crtc' which
>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* ✗ Fi.CI.BAT: failure for drm/i915: get a runtime PM ref in i915_wedged_set (rev2)
2017-03-14 0:26 [PATCH] drm/i915: get a runtime PM ref in i915_wedged_set Michel Thierry
` (3 preceding siblings ...)
2017-03-14 17:18 ` [PATCH] drm/i915: Extend rpm wakelock during i915_handle_error() Chris Wilson
@ 2017-03-15 8:32 ` Patchwork
2017-03-15 8:44 ` Patchwork
2017-03-15 8:50 ` ✓ Fi.CI.BAT: success " Patchwork
6 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2017-03-15 8:32 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: get a runtime PM ref in i915_wedged_set (rev2)
URL : https://patchwork.freedesktop.org/series/21184/
State : failure
== Summary ==
Series 21184v2 drm/i915: get a runtime PM ref in i915_wedged_set
https://patchwork.freedesktop.org/api/1.0/series/21184/revisions/2/mbox/
Test gem_exec_flush:
Subgroup basic-batch-kernel-default-uc:
pass -> INCOMPLETE (fi-skl-6700k) fdo#100130
Subgroup basic-uc-pro-default:
pass -> INCOMPLETE (fi-skl-6700hq) fdo#100130
Subgroup basic-uc-ro-default:
pass -> INCOMPLETE (fi-skl-6770hq) fdo#100130
Subgroup basic-uc-set-default:
pass -> INCOMPLETE (fi-skl-6260u)
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-atomic:
fail -> PASS (fi-snb-2520m)
fdo#100130 https://bugs.freedesktop.org/show_bug.cgi?id=100130
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time: 463s
fi-bsw-n3050 total:278 pass:239 dwarn:0 dfail:0 fail:0 skip:39 time: 570s
fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time: 539s
fi-bxt-t5700 total:278 pass:258 dwarn:0 dfail:0 fail:0 skip:20 time: 554s
fi-byt-j1900 total:278 pass:251 dwarn:0 dfail:0 fail:0 skip:27 time: 502s
fi-byt-n2820 total:278 pass:247 dwarn:0 dfail:0 fail:0 skip:31 time: 500s
fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time: 433s
fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 495s
fi-skl-6260u total:57 pass:55 dwarn:0 dfail:0 fail:0 skip:1 time: 0s
fi-skl-6700hq total:53 pass:45 dwarn:0 dfail:0 fail:0 skip:7 time: 0s
fi-skl-6700k total:51 pass:43 dwarn:0 dfail:0 fail:0 skip:7 time: 0s
fi-skl-6770hq total:55 pass:53 dwarn:0 dfail:0 fail:0 skip:1 time: 0s
fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time: 546s
fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time: 415s
c641417b70c6b78efca29ae732d7cbf5716ac6d5 drm-tip: 2017y-03m-14d-16h-04m-56s UTC integration manifest
e53fbbf drm/i915: Extend rpm wakelock during i915_handle_error()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4169/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* ✗ Fi.CI.BAT: failure for drm/i915: get a runtime PM ref in i915_wedged_set (rev2)
2017-03-14 0:26 [PATCH] drm/i915: get a runtime PM ref in i915_wedged_set Michel Thierry
` (4 preceding siblings ...)
2017-03-15 8:32 ` ✗ Fi.CI.BAT: failure for drm/i915: get a runtime PM ref in i915_wedged_set (rev2) Patchwork
@ 2017-03-15 8:44 ` Patchwork
2017-03-15 8:50 ` ✓ Fi.CI.BAT: success " Patchwork
6 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2017-03-15 8:44 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: get a runtime PM ref in i915_wedged_set (rev2)
URL : https://patchwork.freedesktop.org/series/21184/
State : failure
== Summary ==
Series 21184v2 drm/i915: get a runtime PM ref in i915_wedged_set
https://patchwork.freedesktop.org/api/1.0/series/21184/revisions/2/mbox/
Test gem_exec_flush:
Subgroup basic-batch-kernel-default-uc:
pass -> INCOMPLETE (fi-skl-6700k) fdo#100130
Subgroup basic-uc-pro-default:
pass -> INCOMPLETE (fi-skl-6700hq) fdo#100130
Subgroup basic-uc-ro-default:
pass -> INCOMPLETE (fi-skl-6770hq) fdo#100130
Subgroup basic-uc-set-default:
pass -> INCOMPLETE (fi-skl-6260u)
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-atomic:
fail -> PASS (fi-snb-2520m)
fdo#100130 https://bugs.freedesktop.org/show_bug.cgi?id=100130
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time: 463s
fi-bsw-n3050 total:278 pass:239 dwarn:0 dfail:0 fail:0 skip:39 time: 570s
fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time: 539s
fi-bxt-t5700 total:278 pass:258 dwarn:0 dfail:0 fail:0 skip:20 time: 554s
fi-byt-j1900 total:278 pass:251 dwarn:0 dfail:0 fail:0 skip:27 time: 502s
fi-byt-n2820 total:278 pass:247 dwarn:0 dfail:0 fail:0 skip:31 time: 500s
fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time: 433s
fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 495s
fi-skl-6260u total:57 pass:55 dwarn:0 dfail:0 fail:0 skip:1 time: 0s
fi-skl-6700hq total:53 pass:45 dwarn:0 dfail:0 fail:0 skip:7 time: 0s
fi-skl-6700k total:51 pass:43 dwarn:0 dfail:0 fail:0 skip:7 time: 0s
fi-skl-6770hq total:55 pass:53 dwarn:0 dfail:0 fail:0 skip:1 time: 0s
fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time: 546s
fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time: 415s
c641417b70c6b78efca29ae732d7cbf5716ac6d5 drm-tip: 2017y-03m-14d-16h-04m-56s UTC integration manifest
e53fbbf drm/i915: Extend rpm wakelock during i915_handle_error()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4169/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: get a runtime PM ref in i915_wedged_set (rev2)
2017-03-14 0:26 [PATCH] drm/i915: get a runtime PM ref in i915_wedged_set Michel Thierry
` (5 preceding siblings ...)
2017-03-15 8:44 ` Patchwork
@ 2017-03-15 8:50 ` Patchwork
6 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2017-03-15 8:50 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: get a runtime PM ref in i915_wedged_set (rev2)
URL : https://patchwork.freedesktop.org/series/21184/
State : success
== Summary ==
Series 21184v2 drm/i915: get a runtime PM ref in i915_wedged_set
https://patchwork.freedesktop.org/api/1.0/series/21184/revisions/2/mbox/
Test gem_exec_flush:
Subgroup basic-batch-kernel-default-uc:
pass -> INCOMPLETE (fi-skl-6700k) fdo#100130
Subgroup basic-uc-pro-default:
pass -> INCOMPLETE (fi-skl-6700hq) fdo#100130
Subgroup basic-uc-ro-default:
pass -> INCOMPLETE (fi-skl-6770hq) fdo#100130
Subgroup basic-uc-set-default:
pass -> INCOMPLETE (fi-skl-6260u) fdo#100130
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-atomic:
fail -> PASS (fi-snb-2520m)
fdo#100130 https://bugs.freedesktop.org/show_bug.cgi?id=100130
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time: 463s
fi-bsw-n3050 total:278 pass:239 dwarn:0 dfail:0 fail:0 skip:39 time: 570s
fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time: 539s
fi-bxt-t5700 total:278 pass:258 dwarn:0 dfail:0 fail:0 skip:20 time: 554s
fi-byt-j1900 total:278 pass:251 dwarn:0 dfail:0 fail:0 skip:27 time: 502s
fi-byt-n2820 total:278 pass:247 dwarn:0 dfail:0 fail:0 skip:31 time: 500s
fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time: 433s
fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 495s
fi-skl-6260u total:57 pass:55 dwarn:0 dfail:0 fail:0 skip:1 time: 0s
fi-skl-6700hq total:53 pass:45 dwarn:0 dfail:0 fail:0 skip:7 time: 0s
fi-skl-6700k total:51 pass:43 dwarn:0 dfail:0 fail:0 skip:7 time: 0s
fi-skl-6770hq total:55 pass:53 dwarn:0 dfail:0 fail:0 skip:1 time: 0s
fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time: 546s
fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time: 415s
c641417b70c6b78efca29ae732d7cbf5716ac6d5 drm-tip: 2017y-03m-14d-16h-04m-56s UTC integration manifest
e53fbbf drm/i915: Extend rpm wakelock during i915_handle_error()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4169/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/i915: Extend rpm wakelock during i915_handle_error()
2017-03-14 17:24 ` Michel Thierry
@ 2017-03-15 15:45 ` Chris Wilson
0 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2017-03-15 15:45 UTC (permalink / raw)
To: Michel Thierry; +Cc: intel-gfx
On Tue, Mar 14, 2017 at 10:24:42AM -0700, Michel Thierry wrote:
>
>
> On 3/14/2017 10:18 AM, Chris Wilson wrote:
> >We take the runtime pm wakelock during i915_handle_error() to ensure
> >that all paths that reach the error capture keep the device awake during
> >the hw reads. However, we need to extend that from the reset handler to
> >include the earlier capture routines.
> >
> >Reported-by: Antonio Argenziano <antonio.argenziano@intel.com>
> >Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> >Cc: Michel Thierry <michel.thierry@intel.com>
> >---
> > drivers/gpu/drm/i915/i915_irq.c | 25 ++++++++++++++-----------
> > 1 file changed, 14 insertions(+), 11 deletions(-)
> >
> >diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> >index 31f0d7c8992f..52e1fe8a98fb 100644
> >--- a/drivers/gpu/drm/i915/i915_irq.c
> >+++ b/drivers/gpu/drm/i915/i915_irq.c
> >@@ -2664,14 +2664,6 @@ static void i915_reset_and_wakeup(struct drm_i915_private *dev_priv)
> > DRM_DEBUG_DRIVER("resetting chip\n");
> > kobject_uevent_env(kobj, KOBJ_CHANGE, reset_event);
> >
> >- /*
> >- * In most cases it's guaranteed that we get here with an RPM
> >- * reference held, for example because there is a pending GPU
> >- * request that won't finish until the reset is done. This
> >- * isn't the case at least when we get here by doing a
> >- * simulated reset via debugs, so get an RPM reference.
> >- */
> >- intel_runtime_pm_get(dev_priv);
> > intel_prepare_reset(dev_priv);
> >
> > do {
> >@@ -2693,7 +2685,6 @@ static void i915_reset_and_wakeup(struct drm_i915_private *dev_priv)
> > HZ));
> >
> > intel_finish_reset(dev_priv);
> >- intel_runtime_pm_put(dev_priv);
> >
> > if (!test_bit(I915_WEDGED, &dev_priv->gpu_error.flags))
> > kobject_uevent_env(kobj,
> >@@ -2780,15 +2771,24 @@ void i915_handle_error(struct drm_i915_private *dev_priv,
> > vscnprintf(error_msg, sizeof(error_msg), fmt, args);
> > va_end(args);
> >
> >+ /*
> >+ * In most cases it's guaranteed that we get here with an RPM
> >+ * reference held, for example because there is a pending GPU
> >+ * request that won't finish until the reset is done. This
> >+ * isn't the case at least when we get here by doing a
> >+ * simulated reset via debugfs, so get an RPM reference.
> >+ */
> >+ intel_runtime_pm_get(dev_priv);
> >+
> > i915_capture_error_state(dev_priv, engine_mask, error_msg);
> > i915_clear_error_registers(dev_priv);
> >
> > if (!engine_mask)
> >- return;
> >+ goto out;
> >
> > if (test_and_set_bit(I915_RESET_IN_PROGRESS,
> > &dev_priv->gpu_error.flags))
> >- return;
> >+ goto out;
> >
> > /*
> > * Wakeup waiting processes so that the reset function
> >@@ -2805,6 +2805,9 @@ void i915_handle_error(struct drm_i915_private *dev_priv,
> > i915_error_wake_up(dev_priv);
> >
> > i915_reset_and_wakeup(dev_priv);
> >+
> >+out:
> >+ intel_runtime_pm_put(dev_priv);
> > }
> >
> > /* Called from drm generic code, passed 'crtc' which
> >
>
> Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Thanks for the original patch, now CI has an idle moment, pushed.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2017-03-15 15:46 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-14 0:26 [PATCH] drm/i915: get a runtime PM ref in i915_wedged_set Michel Thierry
2017-03-14 0:47 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-03-14 9:09 ` [PATCH] " Chris Wilson
2017-03-14 17:05 ` Michel Thierry
2017-03-14 17:12 ` Chris Wilson
2017-03-14 16:37 ` Antonio Argenziano
2017-03-14 17:18 ` [PATCH] drm/i915: Extend rpm wakelock during i915_handle_error() Chris Wilson
2017-03-14 17:24 ` Michel Thierry
2017-03-15 15:45 ` Chris Wilson
2017-03-15 8:32 ` ✗ Fi.CI.BAT: failure for drm/i915: get a runtime PM ref in i915_wedged_set (rev2) Patchwork
2017-03-15 8:44 ` Patchwork
2017-03-15 8:50 ` ✓ Fi.CI.BAT: success " 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.