drm/i915: Warn when execlists changes context without IRQs
Subsystems (2)
PATCH 1/1 drm/i915: Warn when execlists changes context without IRQs
If an batch ends while the IRQs are not turned on the notification can go missing and the GPU can hang. So generate a warning in this case.
--- drivers/gpu/drm/i915/intel_lrc.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/i915/intel_lrc.c +6 -0
@@ -394,6 +394,12 @@ static void execlists_context_unqueue(struct intel_engine_cs *ring)assert_spin_locked (&ring->execlist_lock); +/* +* If irqs are not active generate a warning as batches that finish +* without the irqs may get lost and a GPU Hang may occur. +*/ +WARN_ON (!intel_irqs_enabled (ring->dev->dev_private)); +if (list_empty (&ring->execlist_queue))return ;
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
AppliedQuoted 4 lines · Peter Antoine
If an batch ends while the IRQs are not turned on the notification can go missing and the GPU can hang. So generate a warning in this case.
Signed-off-by Peter Antoine <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Quoted 24 lines
--- drivers/gpu/drm/i915/intel_lrc.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/gpu/drm/i915/intel_lrc.c +6
-0@@ -394,6 +394,12 @@ static void execlists_context_unqueue(struct intel_engine_cs *ring)assert_spin_locked (&ring->execlist_lock); +/* +* If irqs are not active generate a warning as batches that finish +* without the irqs may get lost and a GPU Hang may occur. +*/ +WARN_ON (!intel_irqs_enabled (ring->dev->dev_private)); +if (list_empty (&ring->execlist_queue))return ;Signature · 1 line
1.9.1
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 7 lines · Daniel Vetter
Quoted 4 lines · Peter Antoine
If an batch ends while the IRQs are not turned on the notification can go missing and the GPU can hang. So generate a warning in this case.
Signed-off-by Peter Antoine <[email protected]>Queued for -next, thanks for the patch.
Please drop this. We already have the test inside the irq handler. The instance where you want the guard is during resume, inside intel_lr_context_render_state_init() where you can even emit an error code!
-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 5 lines · Chris Wilson
Quoted 4 lines · Daniel Vetter
Quoted 3 lines · Peter Antoine
If an batch ends while the IRQs are not turned on the notification can go missing and the GPU can hang. So generate a warning in this case.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Peter Antoine <[email protected]>Queued for -next, thanks for the patch.
Please drop this. We already have the test inside the irq handler. The instance where you want the guard is during resume, inside
intel_lr_context_render_state_init()where you can even emit an error code!
_unqueue is also called from intel_logical_ring_advance_and_submit and should cover us I hope. And I don't think we should add error handling for this, that has cost of its own.
-Daniel
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 10 lines · Daniel Vetter
Quoted 9 lines · Chris Wilson
Quoted 7 lines · Daniel Vetter
Quoted 4 lines · Peter Antoine
If an batch ends while the IRQs are not turned on the notification can go missing and the GPU can hang. So generate a warning in this case.
Signed-off-by Peter Antoine <[email protected]>Queued for -next, thanks for the patch.
Quoted 8 lines
Quoted 4 lines
Please drop this. We already have the test inside the irq handler. The instance where you want the guard is during resume, inside
intel_lr_context_render_state_init()where you can even emit an error code!
_unqueueis also called fromintel_logical_ring_advance_and_submitand should cover us I hope. And I don't think we should add error handling for this, that has cost of its own.
Pardon? Your explanation for adding it to the *interrupt* handler after an existing check is that it also catches the initial submission? -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 16 lines · Chris Wilson
Quoted 15 lines · Daniel Vetter
Quoted 13 lines · Chris Wilson
Quoted 7 lines · Daniel Vetter
Quoted 4 lines · Peter Antoine
If an batch ends while the IRQs are not turned on the notification can go missing and the GPU can hang. So generate a warning in this case.
Signed-off-by Peter Antoine <[email protected]>Queued for -next, thanks for the patch.
Please drop this. We already have the test inside the irq handler. The instance where you want the guard is during resume, inside
intel_lr_context_render_state_init()where you can even emit an error code!
Quoted 6 lines
Quoted 3 lines
_unqueueis also called fromintel_logical_ring_advance_and_submitand should cover us I hope. And I don't think we should add error handling for this, that has cost of its own.Pardon? Your explanation for adding it to the *interrupt* handler after an existing check is that it also catches the initial submission?
I wanted to add it as low down as possible to increase changes of the check surviving refactoring. This way it's as close to possible to the writes to the submit ports. Yes that means it's also run from interrupt context when requeueing, but I'm fairly meh about that. What's your concern?
-Daniel
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 21 lines · Daniel Vetter
Quoted 20 lines · Chris Wilson
Quoted 18 lines · Daniel Vetter
Quoted 5 lines · Chris Wilson
Quoted 4 lines · Daniel Vetter
Quoted 3 lines · Peter Antoine
If an batch ends while the IRQs are not turned on the notification can go missing and the GPU can hang. So generate a warning in this case.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Peter Antoine <[email protected]>Queued for -next, thanks for the patch.
Please drop this. We already have the test inside the irq handler. The instance where you want the guard is during resume, inside
intel_lr_context_render_state_init()where you can even emit an error code!
_unqueueis also called fromintel_logical_ring_advance_and_submitand should cover us I hope. And I don't think we should add error handling for this, that has cost of its own.
Quoted 8 lines
Quoted 2 lines
Pardon? Your explanation for adding it to the *interrupt* handler after an existing check is that it also catches the initial submission?
I wanted to add it as low down as possible to increase changes of the check surviving refactoring. This way it's as close to possible to the writes to the submit ports. Yes that means it's also run from interrupt context when requeueing, but I'm fairly meh about that. What's your concern?
The interrupt handler + submission is the ratelimiting factor in execlists throughput. Tests for external factors really should be on the boundary.
-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
Task id: 6381 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV 276/276 276/276 ILK 302/302 302/302 SNB -1 314/314 313/314 IVB 338/338 338/338 BYT 286/286 286/286
BDW -1 320/320 319/320
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
SNB igt@pm_rpm@dpms-mode-unset-non-lpsp DMESG_WARN(13)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
*BDW igt@gem_gtt_hog PASS(3) DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_display.c:#assert_plane[i915]()@WARNING:.* at .* assert_plane assertion_failure@assertion failure
WARNING:at_drivers/gpu/drm/drm_irq.c:#drm_wait_one_vblank[drm]()@WARNING:.* at .* drm_wait_one_vblank+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