drm/i915: Allow unready gpu to be reset on gen8
Subsystems (2)
PATCH 1/1 drm/i915: Allow unready gpu to be reset on gen8
Gen9 has had demonstrated cases where forcing a not ready gpu into reset has caused system hang [1].
Gen8 has never to this date demonstrated such behaviour.
In our CI tests bsw sometimes ends up in a state where it claims it is not ready for reset, based on reset request, after gpu hang.
Allow gen8 to reset even after claims of nonreadiness in order to keep the gpu accessible. Enhance logging so that it will be clear what conditions led to decision of proceeding or bailing out, so that we will spot if this way of forcing our will against gpu turns out to be foolhardy.
References [1]: https://bugs.freedesktop.org/show_bug.cgi?id=89959
--- drivers/gpu/drm/i915/intel_uncore.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_uncore.c +8 -1
@@ -1504,7 +1504,14 @@ not_ready:I915_WRITE (RING_RESET_CTL (engine->mmio_base),_MASKED_BIT_DISABLE (RESET_CTL_REQUEST_RESET )); -return -EIO ; +if (INTEL_INFO (dev)->gen ==9 ) { +DRM_ERROR ("Reset would risk system stability, bailing out\n" ); +return -EIO ; + } + +DRM_ERROR ("Forcing non ready gpu into reset\n" ); + +return gen6_do_reset (dev); }static int (*intel_get_gpu_reset (struct drm_device *dev))(struct drm_device *)
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 27 lines · Mika Kuoppala
Gen9 has had demonstrated cases where forcing a not ready gpu into reset has caused system hang [1].
Gen8 has never to this date demonstrated such behaviour.
In our CI tests bsw sometimes ends up in a state where it claims it is not ready for reset, based on reset request, after gpu hang.
Allow gen8 to reset even after claims of nonreadiness in order to keep the gpu accessible. Enhance logging so that it will be clear what conditions led to decision of proceeding or bailing out, so that we will spot if this way of forcing our will against gpu turns out to be foolhardy.
References [1]: https://bugs.freedesktop.org/show_bug.cgi?id=89959
Cc Daniel Vetter <[email protected]>Cc Tomi Sarvela <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/intel_uncore.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_uncore.c +0
-0
drivers/gpu/drm/i915/intel_uncore.c not_ready: · line 1507
Quoted 4 lines
drivers/gpu/drm/i915/intel_uncore.c +0
-1@@ -1504,7 +1504,14 @@ not_ready:I915_WRITE (RING_RESET_CTL (engine->mmio_base),_MASKED_BIT_DISABLE (RESET_CTL_REQUEST_RESET )); -return -EIO ;
Where's the reference for where we hit this EIO on gen8?
Quoted 18 lines
drivers/gpu/drm/i915/intel_uncore.c +8
-0+if (INTEL_INFO (dev)->gen ==9 ) { +DRM_ERROR ("Reset would risk system stability, bailing out\n" ); +return -EIO ; + } + +DRM_ERROR ("Forcing non ready gpu into reset\n" ); + +return gen6_do_reset (dev); }static int (*intel_get_gpu_reset (struct drm_device *dev))(struct drm_device *)Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 31 lines · Chris Wilson
Quoted 30 lines · Mika Kuoppala
Gen9 has had demonstrated cases where forcing a not ready gpu into reset has caused system hang [1].
Gen8 has never to this date demonstrated such behaviour.
In our CI tests bsw sometimes ends up in a state where it claims it is not ready for reset, based on reset request, after gpu hang.
Allow gen8 to reset even after claims of nonreadiness in order to keep the gpu accessible. Enhance logging so that it will be clear what conditions led to decision of proceeding or bailing out, so that we will spot if this way of forcing our will against gpu turns out to be foolhardy.
References [1]: https://bugs.freedesktop.org/show_bug.cgi?id=89959
Cc Daniel Vetter <[email protected]>Cc Tomi Sarvela <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/intel_uncore.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_uncore.c +0
-0@@ -1504,7 +1504,14 @@ not_ready:I915_WRITE (RING_RESET_CTL (engine->mmio_base),_MASKED_BIT_DISABLE (RESET_CTL_REQUEST_RESET ));
Quoted 4 lines
drivers/gpu/drm/i915/intel_uncore.c not_ready: · line 1507
Quoted 1 line
drivers/gpu/drm/i915/intel_uncore.c +0
-1-return -EIO ;Where's the reference for where we hit this EIO on gen8?
Internal CI logs, relevant part cutpasted below. If you want full log holler me in irc.
[ 119.147727] kms_pipe_crc_basic: starting subtest hang-read-crc-pipe-A [ 124.785063] [drm] stuck on render ring [ 124.800850] [drm] GPU HANG: ecode 8:0:0xfffffffe, in kms_pipe_crc_ba [5590], reason: Ring hung, action: reset [ 124.801154] [drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace. [ 124.801161] [drm] Please file a _new_ bug report on bugs.freedesktop.org against DRI -> DRM/Intel [ 124.801167] [drm] drm/i915 developers can then reassign to the right component if it's not a kernel issue. [ 124.801173] [drm] The gpu crash dump is required to analyze gpu hangs, so please always attach it. [ 124.801179] [drm] GPU crash dump saved to /sys/class/drm/card0/error [ 124.801785] kobject: 'card0' (ffff880174ad92a0): kobject_uevent_env [ 124.801940] kobject: 'card0' (ffff880174ad92a0): fill_kobj_path: path = '/devices/pci0000:00/0000:00:02.0/drm/card0' [ 124.805032] kobject: 'card0' (ffff880174ad92a0): kobject_uevent_env [ 124.805089] kobject: 'card0' (ffff880174ad92a0): fill_kobj_path: path = '/devices/pci0000:00/0000:00:02.0/drm/card0' [ 125.511744] [drm:gen8_do_reset [i915]] *ERROR* render ring: reset request timeout [ 125.511922] [drm] Simulated gpu hang, resetting stop_rings [ 125.511927] drm/i915: Resetting chip after gpu hang [ 125.511954] [drm:i915_reset [i915]] *ERROR* Failed to reset chip: -5 [ 125.637612] kms_pipe_crc_basic: exiting, ret=0 [ 125.653608] [drm:intel_lr_context_deferred_alloc [i915]] *ERROR* ring create req: -5 [ 125.847695] gem_ctx_param_basic: executing [ 125.850086] [drm:intel_lr_context_deferred_alloc [i915]] *ERROR* ring create req: -5 [ 125.854482] gem_ctx_param_basic: exiting, ret=99 [ 126.038693] kms_addfb_basic: executing [ 126.041754] [drm:intel_lr_context_deferred_alloc [i915]] *ERROR* ring
create req: -5
-Mika
Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/i915/intel_uncore.c +8
-0+if (INTEL_INFO (dev)->gen ==9 ) { +DRM_ERROR ("Reset would risk system stability, bailing out\n" ); +return -EIO ; + } + +DRM_ERROR ("Forcing non ready gpu into reset\n" ); + +return gen6_do_reset (dev); }
Quoted 11 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_uncore.c +0
-0static int (*intel_get_gpu_reset (struct drm_device *dev))(struct drm_device *)Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 1 line
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 33 lines · Mika Kuoppala
Quoted 31 lines · Chris Wilson
Quoted 30 lines · Mika Kuoppala
Gen9 has had demonstrated cases where forcing a not ready gpu into reset has caused system hang [1].
Gen8 has never to this date demonstrated such behaviour.
In our CI tests bsw sometimes ends up in a state where it claims it is not ready for reset, based on reset request, after gpu hang.
Allow gen8 to reset even after claims of nonreadiness in order to keep the gpu accessible. Enhance logging so that it will be clear what conditions led to decision of proceeding or bailing out, so that we will spot if this way of forcing our will against gpu turns out to be foolhardy.
References [1]: https://bugs.freedesktop.org/show_bug.cgi?id=89959
Cc Daniel Vetter <[email protected]>Cc Tomi Sarvela <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/intel_uncore.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_uncore.c +0
-0@@ -1504,7 +1504,14 @@ not_ready:I915_WRITE (RING_RESET_CTL (engine->mmio_base),_MASKED_BIT_DISABLE (RESET_CTL_REQUEST_RESET ));
Quoted 7 lines
Quoted 4 lines
drivers/gpu/drm/i915/intel_uncore.c not_ready: · line 1507
Quoted 1 line
drivers/gpu/drm/i915/intel_uncore.c +0
-1-return -EIO ;Where's the reference for where we hit this EIO on gen8?
Internal CI logs, relevant part cutpasted below. If you want full log holler me in irc.
So you are saying that's there no bugzilla for this... :-p -Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 39 lines · Chris Wilson
Quoted 38 lines · Mika Kuoppala
Quoted 35 lines · Chris Wilson
Quoted 27 lines · Mika Kuoppala
Gen9 has had demonstrated cases where forcing a not ready gpu into reset has caused system hang [1].
Gen8 has never to this date demonstrated such behaviour.
In our CI tests bsw sometimes ends up in a state where it claims it is not ready for reset, based on reset request, after gpu hang.
Allow gen8 to reset even after claims of nonreadiness in order to keep the gpu accessible. Enhance logging so that it will be clear what conditions led to decision of proceeding or bailing out, so that we will spot if this way of forcing our will against gpu turns out to be foolhardy.
References [1]: https://bugs.freedesktop.org/show_bug.cgi?id=89959
Cc Daniel Vetter <[email protected]>Cc Tomi Sarvela <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/intel_uncore.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_uncore.c +0
-0drivers/gpu/drm/i915/intel_uncore.c not_ready: · line 1507
Quoted 4 lines
drivers/gpu/drm/i915/intel_uncore.c +0
-1@@ -1504,7 +1504,14 @@ not_ready:I915_WRITE (RING_RESET_CTL (engine->mmio_base),_MASKED_BIT_DISABLE (RESET_CTL_REQUEST_RESET )); -return -EIO ;Where's the reference for where we hit this EIO on gen8?
Quoted 4 lines
Quoted 2 lines
Internal CI logs, relevant part cutpasted below. If you want full log holler me in irc.
So you are saying that's there no bugzilla for this... :-p
Bugzilla fairy might surprise us after a good weekend rest.
-Mika
Quoted 4 lines
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines
From: Mika Kuoppala [mailto:[email protected]]
Quoted 1 line · Chris Wilson
So you are saying that's there no bugzilla for this... :-p
Bugzilla fairy might surprise us after a good weekend rest.
https://bugs.freedesktop.org/show_bug.cgi?id=92774
Regards,
Tomi
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 drm/i915: Allow unready gpu to be reset on gen8
In reply to Chris WilsonGen9 has had demonstrated cases where forcing a not ready gpu into reset has caused system hang [1].
Gen8 has never to this date demonstrated such behaviour.
In our CI tests there have been two cases of bsw ending in a state where it claims it is not ready for reset, based on reset request, after gpu hang [2]. Both of these cases have happened with kernel where there are lots of debugs enabled. So it is possible that something timing related is at play here like that wait_for_register() usleep wakeups collide badly with forcewake.
If we assume that gen8 is safe to reset even with claims of nonreadiness, we can alleviate this situations by forcing a reset and revive the gpu. Enhance logging so that it will be clear what conditions led to decision of proceeding or bailing out, so that we will spot if this way of forcing our will against gpu turns out to be foolhardy.
v2: - add bugzilla entry for bsw behaviour (Chris)
- improve commit message
References [1]: https://bugs.freedesktop.org/show_bug.cgi?id=89959
References [2]: https://bugs.freedesktop.org/show_bug.cgi?id=92774
--- drivers/gpu/drm/i915/intel_uncore.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_uncore.c +8 -1
@@ -1504,7 +1504,14 @@ not_ready:I915_WRITE (RING_RESET_CTL (engine->mmio_base),_MASKED_BIT_DISABLE (RESET_CTL_REQUEST_RESET )); -return -EIO ; +if (INTEL_INFO (dev)->gen ==9 ) { +DRM_ERROR ("Reset would risk system stability, bailing out\n" ); +return -EIO ; + } + +DRM_ERROR ("Forcing non ready gpu into reset\n" ); + +return gen6_do_reset (dev); }static int (*intel_get_gpu_reset (struct drm_device *dev))(struct drm_device *)
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 36 lines · Mika Kuoppala
Gen9 has had demonstrated cases where forcing a not ready gpu into reset has caused system hang [1].
Gen8 has never to this date demonstrated such behaviour.
In our CI tests there have been two cases of bsw ending in a state where it claims it is not ready for reset, based on reset request, after gpu hang [2]. Both of these cases have happened with kernel where there are lots of debugs enabled. So it is possible that something timing related is at play here like that
wait_for_register()usleep wakeups collide badly with forcewake.If we assume that gen8 is safe to reset even with claims of nonreadiness, we can alleviate this situations by forcing a reset and revive the gpu. Enhance logging so that it will be clear what conditions led to decision of proceeding or bailing out, so that we will spot if this way of forcing our will against gpu turns out to be foolhardy.
v2: - add bugzilla entry for bsw behaviour (Chris)
- improve commit messageReferences [1]: https://bugs.freedesktop.org/show_bug.cgi?id=89959
References [2]: https://bugs.freedesktop.org/show_bug.cgi?id=92774Cc Daniel Vetter <[email protected]>Cc Tomi Sarvela <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/intel_uncore.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_uncore.c +0
-0
drivers/gpu/drm/i915/intel_uncore.c not_ready: · line 1512
Quoted 10 lines
drivers/gpu/drm/i915/intel_uncore.c +6
-1@@ -1504,7 +1504,14 @@ not_ready:I915_WRITE (RING_RESET_CTL (engine->mmio_base),_MASKED_BIT_DISABLE (RESET_CTL_REQUEST_RESET )); -return -EIO ; +if (INTEL_INFO (dev)->gen ==9 ) { +DRM_ERROR ("Reset would risk system stability, bailing out\n" ); +return -EIO ; + } + +DRM_ERROR ("Forcing non ready gpu into reset\n" );
DRM_ERROR will cause dmes-warn failures when running igt. If we agree that this is ok, it should be at most DRM_INFO. I'd got with DRM_DEBUG_DRIVER. Ack with that change.
-Daniel
Quoted 8 lines
drivers/gpu/drm/i915/intel_uncore.c +2
-0+ +return gen6_do_reset (dev); }static int (*intel_get_gpu_reset (struct drm_device *dev))(struct drm_device *)Signature · 1 line
2.5.0
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 40 lines · Daniel Vetter
Quoted 39 lines · Mika Kuoppala
Gen9 has had demonstrated cases where forcing a not ready gpu into reset has caused system hang [1].
Gen8 has never to this date demonstrated such behaviour.
In our CI tests there have been two cases of bsw ending in a state where it claims it is not ready for reset, based on reset request, after gpu hang [2]. Both of these cases have happened with kernel where there are lots of debugs enabled. So it is possible that something timing related is at play here like that
wait_for_register()usleep wakeups collide badly with forcewake.If we assume that gen8 is safe to reset even with claims of nonreadiness, we can alleviate this situations by forcing a reset and revive the gpu. Enhance logging so that it will be clear what conditions led to decision of proceeding or bailing out, so that we will spot if this way of forcing our will against gpu turns out to be foolhardy.
v2: - add bugzilla entry for bsw behaviour (Chris)
- improve commit messageReferences [1]: https://bugs.freedesktop.org/show_bug.cgi?id=89959
References [2]: https://bugs.freedesktop.org/show_bug.cgi?id=92774Cc Daniel Vetter <[email protected]>Cc Tomi Sarvela <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/intel_uncore.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_uncore.c +0
-0@@ -1504,7 +1504,14 @@ not_ready:I915_WRITE (RING_RESET_CTL (engine->mmio_base),_MASKED_BIT_DISABLE (RESET_CTL_REQUEST_RESET ));
Quoted 11 lines
drivers/gpu/drm/i915/intel_uncore.c not_ready: · line 1512
Quoted 7 lines
drivers/gpu/drm/i915/intel_uncore.c +6
-1-return -EIO ; +if (INTEL_INFO (dev)->gen ==9 ) { +DRM_ERROR ("Reset would risk system stability, bailing out\n" ); +return -EIO ; + } + +DRM_ERROR ("Forcing non ready gpu into reset\n" );
DRM_ERRORwill cause dmes-warn failures when running igt. If we agree that this is ok, it should be at mostDRM_INFO. I'd got withDRM_DEBUG_DRIVER. Ack with that change.
This is in the category 'shouldn't never happen' so I would prefer igt to complain loudly if it can't request reset.
The real culprit was forcewakes missing on reset path, so this patch can be forgotten and only resurrected if, even with forcewake fix in, gen8 fails to request reset.
Here is the patch that fixed the underlying issue:
commit 99106bc17e667989b4c0af0a6afcbd6ddbada8fb
Author: Mika Kuoppala <[email protected]> Date: Thu Nov 5 13:11:38 2015 +0200
drm/i915: Do graphics device reset under forcewake
Thanks,
-Mika
Quoted 15 lines
-Daniel
Quoted 8 lines
drivers/gpu/drm/i915/intel_uncore.c +2
-0+ +return gen6_do_reset (dev); }static int (*intel_get_gpu_reset (struct drm_device *dev))(struct drm_device *)Signature · 1 line
2.5.0Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
Reviewed-byQuoted 61 lines · Mika Kuoppala
Quoted 40 lines · Daniel Vetter
Quoted 39 lines · Mika Kuoppala
Gen9 has had demonstrated cases where forcing a not ready gpu into reset has caused system hang [1].
Gen8 has never to this date demonstrated such behaviour.
In our CI tests there have been two cases of bsw ending in a state where it claims it is not ready for reset, based on reset request, after gpu hang [2]. Both of these cases have happened with kernel where there are lots of debugs enabled. So it is possible that something timing related is at play here like that
wait_for_register()usleep wakeups collide badly with forcewake.If we assume that gen8 is safe to reset even with claims of nonreadiness, we can alleviate this situations by forcing a reset and revive the gpu. Enhance logging so that it will be clear what conditions led to decision of proceeding or bailing out, so that we will spot if this way of forcing our will against gpu turns out to be foolhardy.
v2: - add bugzilla entry for bsw behaviour (Chris)
- improve commit messageReferences [1]: https://bugs.freedesktop.org/show_bug.cgi?id=89959
References [2]: https://bugs.freedesktop.org/show_bug.cgi?id=92774Cc Daniel Vetter <[email protected]>Cc Tomi Sarvela <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/intel_uncore.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_uncore.c +0
-0@@ -1504,7 +1504,14 @@ not_ready:I915_WRITE (RING_RESET_CTL (engine->mmio_base),_MASKED_BIT_DISABLE (RESET_CTL_REQUEST_RESET ));Quoted 11 lines
drivers/gpu/drm/i915/intel_uncore.c not_ready: · line 1512
Quoted 7 lines
drivers/gpu/drm/i915/intel_uncore.c +6
-1-return -EIO ; +if (INTEL_INFO (dev)->gen ==9 ) { +DRM_ERROR ("Reset would risk system stability, bailing out\n" ); +return -EIO ; + } + +DRM_ERROR ("Forcing non ready gpu into reset\n" );
DRM_ERRORwill cause dmes-warn failures when running igt. If we agree that this is ok, it should be at mostDRM_INFO. I'd got withDRM_DEBUG_DRIVER. Ack with that change.This is in the category 'shouldn't never happen' so I would prefer igt to complain loudly if it can't request reset.
The real culprit was forcewakes missing on reset path, so this patch can be forgotten and only resurrected if, even with forcewake fix in, gen8 fails to request reset.
Quoted 7 lines
Here is the patch that fixed the underlying issue:
commit
99106bc17e667989b4c0af0a6afcbd6ddbada8fbAuthor: Mika Kuoppala <[email protected]> Date: Thu Nov 5 13:11:38 2015 +0200drm/i915: Do graphics device reset under forcewake
Oh that story. With the above explanation added to the commit message:
Quoted 20 lines
Thanks,
-MikaQuoted 15 lines
-Daniel
Quoted 8 lines
drivers/gpu/drm/i915/intel_uncore.c +2
-0+ +return gen6_do_reset (dev); }static int (*intel_get_gpu_reset (struct drm_device *dev))(struct drm_device *)Signature · 1 line
2.5.0Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 68 lines · Daniel Vetter
Quoted 67 lines · Mika Kuoppala
Quoted 40 lines · Daniel Vetter
Quoted 39 lines · Mika Kuoppala
Gen9 has had demonstrated cases where forcing a not ready gpu into reset has caused system hang [1].
Gen8 has never to this date demonstrated such behaviour.
In our CI tests there have been two cases of bsw ending in a state where it claims it is not ready for reset, based on reset request, after gpu hang [2]. Both of these cases have happened with kernel where there are lots of debugs enabled. So it is possible that something timing related is at play here like that
wait_for_register()usleep wakeups collide badly with forcewake.If we assume that gen8 is safe to reset even with claims of nonreadiness, we can alleviate this situations by forcing a reset and revive the gpu. Enhance logging so that it will be clear what conditions led to decision of proceeding or bailing out, so that we will spot if this way of forcing our will against gpu turns out to be foolhardy.
v2: - add bugzilla entry for bsw behaviour (Chris)
- improve commit messageReferences [1]: https://bugs.freedesktop.org/show_bug.cgi?id=89959
References [2]: https://bugs.freedesktop.org/show_bug.cgi?id=92774Cc Daniel Vetter <[email protected]>Cc Tomi Sarvela <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/intel_uncore.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_uncore.c +0
-0@@ -1504,7 +1504,14 @@ not_ready:I915_WRITE (RING_RESET_CTL (engine->mmio_base),_MASKED_BIT_DISABLE (RESET_CTL_REQUEST_RESET ));Quoted 11 lines
drivers/gpu/drm/i915/intel_uncore.c not_ready: · line 1512
Quoted 7 lines
drivers/gpu/drm/i915/intel_uncore.c +6
-1-return -EIO ; +if (INTEL_INFO (dev)->gen ==9 ) { +DRM_ERROR ("Reset would risk system stability, bailing out\n" ); +return -EIO ; + } + +DRM_ERROR ("Forcing non ready gpu into reset\n" );
DRM_ERRORwill cause dmes-warn failures when running igt. If we agree that this is ok, it should be at mostDRM_INFO. I'd got withDRM_DEBUG_DRIVER. Ack with that change.This is in the category 'shouldn't never happen' so I would prefer igt to complain loudly if it can't request reset.
The real culprit was forcewakes missing on reset path, so this patch can be forgotten and only resurrected if, even with forcewake fix in, gen8 fails to request reset.
Here is the patch that fixed the underlying issue:
commit
99106bc17e667989b4c0af0a6afcbd6ddbada8fbAuthor: Mika Kuoppala <[email protected]> Date: Thu Nov 5 13:11:38 2015 +0200
Quoted 5 lines
Quoted 1 line
drm/i915: Do graphics device reset under forcewake
Oh that story. With the above explanation added to the commit message:
Reviewed-by Daniel Vetter <[email protected]>
Mika, is this patch still relevant? Please repost with the above fixed if it is.
BR,
Jani.
Quoted 21 lines
Quoted 21 lines
Thanks,
-MikaQuoted 15 lines
-Daniel
Quoted 8 lines
drivers/gpu/drm/i915/intel_uncore.c +2
-0+ +return gen6_do_reset (dev); }static int (*intel_get_gpu_reset (struct drm_device *dev))(struct drm_device *)Signature · 1 line
2.5.0Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 69 lines · Jani Nikula
Quoted 68 lines · Daniel Vetter
Quoted 67 lines · Mika Kuoppala
Quoted 40 lines · Daniel Vetter
Quoted 39 lines · Mika Kuoppala
Gen9 has had demonstrated cases where forcing a not ready gpu into reset has caused system hang [1].
Gen8 has never to this date demonstrated such behaviour.
In our CI tests there have been two cases of bsw ending in a state where it claims it is not ready for reset, based on reset request, after gpu hang [2]. Both of these cases have happened with kernel where there are lots of debugs enabled. So it is possible that something timing related is at play here like that
wait_for_register()usleep wakeups collide badly with forcewake.If we assume that gen8 is safe to reset even with claims of nonreadiness, we can alleviate this situations by forcing a reset and revive the gpu. Enhance logging so that it will be clear what conditions led to decision of proceeding or bailing out, so that we will spot if this way of forcing our will against gpu turns out to be foolhardy.
v2: - add bugzilla entry for bsw behaviour (Chris)
- improve commit messageReferences [1]: https://bugs.freedesktop.org/show_bug.cgi?id=89959
References [2]: https://bugs.freedesktop.org/show_bug.cgi?id=92774Cc Daniel Vetter <[email protected]>Cc Tomi Sarvela <[email protected]>Cc Chris Wilson <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/intel_uncore.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_uncore.c +0
-0@@ -1504,7 +1504,14 @@ not_ready:I915_WRITE (RING_RESET_CTL (engine->mmio_base),_MASKED_BIT_DISABLE (RESET_CTL_REQUEST_RESET ));Quoted 11 lines
drivers/gpu/drm/i915/intel_uncore.c not_ready: · line 1512
Quoted 7 lines
drivers/gpu/drm/i915/intel_uncore.c +6
-1-return -EIO ; +if (INTEL_INFO (dev)->gen ==9 ) { +DRM_ERROR ("Reset would risk system stability, bailing out\n" ); +return -EIO ; + } + +DRM_ERROR ("Forcing non ready gpu into reset\n" );
DRM_ERRORwill cause dmes-warn failures when running igt. If we agree that this is ok, it should be at mostDRM_INFO. I'd got withDRM_DEBUG_DRIVER. Ack with that change.This is in the category 'shouldn't never happen' so I would prefer igt to complain loudly if it can't request reset.
The real culprit was forcewakes missing on reset path, so this patch can be forgotten and only resurrected if, even with forcewake fix in, gen8 fails to request reset.
Here is the patch that fixed the underlying issue:
commit
99106bc17e667989b4c0af0a6afcbd6ddbada8fbAuthor: Mika Kuoppala <[email protected]> Date: Thu Nov 5 13:11:38 2015 +0200
Quoted 9 lines
Quoted 5 lines
Quoted 1 line
drm/i915: Do graphics device reset under forcewake
Oh that story. With the above explanation added to the commit message:
Reviewed-by Daniel Vetter <[email protected]>Mika, is this patch still relevant? Please repost with the above fixed if it is.
I think we should forget this and only resurrect it if we ever again see failed resets. As
commit 99106bc17e667989b4c0af0a6afcbd6ddbada8fb
Author: Mika Kuoppala <[email protected]> Date: Thu Nov 5 13:11:38 2015 +0200
drm/i915: Do graphics device reset under forcewake
should have fixed atleast those that we saw on CI.
-Mika
Quoted 16 lines
BR,
Jani.Quoted 12 lines
Quoted 12 lines
Thanks,
-MikaQuoted 6 lines
-Daniel
Quoted 4 lines
drivers/gpu/drm/i915/intel_uncore.c +2
-0+ +return gen6_do_reset (dev); }
Quoted 12 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
drivers/gpu/drm/i915/intel_uncore.c +0
-0static int (*intel_get_gpu_reset (struct drm_device *dev))(struct drm_device *)Signature · 1 line
2.5.0Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.chSignature · 1 line
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 2 lines · Mika Kuoppala
I think we should forget this and only resurrect it if we ever again see failed resets.
Bingo! I have been able to wedge the machine (bdw and bsw) recently so badly that the resets failed with the "reset request timeout".
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx