drm/i915: Don't skip request retirement if the active list is empty
Subsystems (2)
PATCH 1/1 drm/i915: Don't skip request retirement if the active list is empty
From: Ville Syrjälä <[email protected]>
Apparently we can have requests even if though the active list is empty, so do the request retirement regardless of whether there's anything on the active list.
The way it happened here is that during suspend intel_ring_idle() notices the olr hanging around and then proceeds to get rid of it by adding a request. However since there was nothing on the active lists i915_gem_retire_requests() didn't clean those up, and so the idle work never runs, and we leave the GPU "busy" during suspend resulting in a WARN later.
--- drivers/gpu/drm/i915/i915_gem.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/i915/i915_gem.c +0 -3
@@ -2813,9 +2813,6 @@ i915_gem_retire_requests_ring(struct intel_engine_cs *ring) {WARN_ON (i915_verify_lists (ring->dev)); -if (list_empty (&ring->active_list)) -return ; -/* Retire requests first as we use it above for the early return. * If we retire requests last, we may use a later seqno and so clear * the requests lists without clearing the active list, leading to
Signature · 6 lines
2.3.6 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · On Thu, May 28, 2015 at 06:32:36PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Apparently we can have requests even if though the active list is empty, so do the request retirement regardless of whether there's anything on the active list.
Quoted 6 lines
The way it happened here is that during suspend
intel_ring_idle()notices the olr hanging around and then proceeds to get rid of it by adding a request. However since there was nothing on the active listsi915_gem_retire_requests()didn't clean those up, and so the idle work never runs, and we leave the GPU "busy" during suspend resulting in a WARN later.
Whlist I agree (I use list_empty(&ring->request_list);) I strongly suspect something (i.e. execlists) isn't managing the active_list correctly. Pretty much the only thing that can generate a request without an object (and so avoid touching the active_list) is a CS flip, and I doubt you are using those...
Anyway,
-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 14 lines · Chris Wilson
Quoted 6 lines · On Thu, May 28, 2015 at 06:32:36PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Apparently we can have requests even if though the active list is empty, so do the request retirement regardless of whether there's anything on the active list.
Quoted 6 lines
The way it happened here is that during suspend
intel_ring_idle()notices the olr hanging around and then proceeds to get rid of it by adding a request. However since there was nothing on the active listsi915_gem_retire_requests()didn't clean those up, and so the idle work never runs, and we leave the GPU "busy" during suspend resulting in a WARN later.
Quoted 5 lines
Whlist I agree (I use
list_empty(&ring->request_list);) I strongly suspect something (i.e. execlists) isn't managing theactive_listcorrectly. Pretty much the only thing that can generate a request without an object (and so avoid touching theactive_list) is a CS flip, and I doubt you are using those...
Oh, I forgot to mention that this was in ringbuffer mode. I guess I should try execlist too.
Quoted 8 lines
Anyway,
Reviewed-by Chris Wilson <[email protected]>-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 15 lines · Ville Syrjälä
Quoted 14 lines · Chris Wilson
Quoted 12 lines · On Thu, May 28, 2015 at 06:32:36PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Apparently we can have requests even if though the active list is empty, so do the request retirement regardless of whether there's anything on the active list.
The way it happened here is that during suspend
intel_ring_idle()notices the olr hanging around and then proceeds to get rid of it by adding a request. However since there was nothing on the active listsi915_gem_retire_requests()didn't clean those up, and so the idle work never runs, and we leave the GPU "busy" during suspend resulting in a WARN later.
Quoted 8 lines
Quoted 5 lines
Whlist I agree (I use
list_empty(&ring->request_list);) I strongly suspect something (i.e. execlists) isn't managing theactive_listcorrectly. Pretty much the only thing that can generate a request without an object (and so avoid touching theactive_list) is a CS flip, and I doubt you are using those...Oh, I forgot to mention that this was in ringbuffer mode. I guess I should try execlist too.
Now I am even more curious where the partial request came from. Anyhow, it is immaterial since olr is just a great big wart overdue for replacement.
-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 20 lines · Chris Wilson
Quoted 6 lines · On Thu, May 28, 2015 at 06:32:36PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Apparently we can have requests even if though the active list is empty, so do the request retirement regardless of whether there's anything on the active list.
Quoted 6 lines
The way it happened here is that during suspend
intel_ring_idle()notices the olr hanging around and then proceeds to get rid of it by adding a request. However since there was nothing on the active listsi915_gem_retire_requests()didn't clean those up, and so the idle work never runs, and we leave the GPU "busy" during suspend resulting in a WARN later.Whlist I agree (I use
list_empty(&ring->request_list);) I strongly suspect something (i.e. execlists) isn't managing theactive_listcorrectly. Pretty much the only thing that can generate a request without an object (and so avoid touching theactive_list) is a CS flip, and I doubt you are using those...
Quoted 3 lines
Anyway,
Reviewed-by Chris Wilson <[email protected]>
Pushed to drm-intel-fixes, thanks for the patch and review.
BR,
Jani.
Quoted 8 lines
-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
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 21 lines · Jani Nikula
Quoted 20 lines · Chris Wilson
Quoted 6 lines · On Thu, May 28, 2015 at 06:32:36PM +0300, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Apparently we can have requests even if though the active list is empty, so do the request retirement regardless of whether there's anything on the active list.
Quoted 6 lines
The way it happened here is that during suspend
intel_ring_idle()notices the olr hanging around and then proceeds to get rid of it by adding a request. However since there was nothing on the active listsi915_gem_retire_requests()didn't clean those up, and so the idle work never runs, and we leave the GPU "busy" during suspend resulting in a WARN later.Whlist I agree (I use
list_empty(&ring->request_list);) I strongly suspect something (i.e. execlists) isn't managing theactive_listcorrectly. Pretty much the only thing that can generate a request without an object (and so avoid touching theactive_list) is a CS flip, and I doubt you are using those...
Quoted 5 lines
Quoted 3 lines
Anyway,
Reviewed-by Chris Wilson <[email protected]>Pushed to drm-intel-fixes, thanks for the patch and review.
Reverted from drm-intel-fixes because I misapplied it, and applied to drm-intel-next-fixes instead. Sorry for the noise.
BR,
Jani.
Quoted 16 lines
BR,
Jani.Quoted 8 lines
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 1 line
Jani Nikula, Intel Open Source Technology Center
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Task id: 6497 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV 276/276 276/276 ILK 303/303 303/303 SNB -1 315/315 314/315 IVB 343/343 343/343 BYT 287/287 287/287 BDW 320/320 320/320
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*SNB igt@pm_rpm@dpms-mode-unset-non-lpsp PASS(1) DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_uncore.c:#assert_device_not_suspended[i915]()@WARNING:.* at .* assert_device_not_suspended+0x
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx