mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 00:43:12 +00:00
drm/i915: Assert that the context-switch completion matches our context
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 <[email protected]> Cc: Joonas Lahtinen <[email protected]> Cc: Tvrtko Ursulin <[email protected]> Cc: Mika Kuoppala <[email protected]> Reviewed-by: Mika Kuoppala <[email protected]> Reviewed-by: Joonas Lahtinen <[email protected]> Reviewed-by: Tvrtko Ursulin <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user