[Intel-xe] [PATCH] drm/xe: Fix an invalid locking wait context bug

Matthew Auld matthew.auld at intel.com
Thu Jul 27 16:08:28 UTC 2023


On 26/07/2023 22:30, Rodrigo Vivi wrote:
> We cannot have spin locks around xe_irq_reset, since it will
> call the intel_display_power_is_enabled() function, and
> that needs a mutex lock. Hence causing the undesired
> "[ BUG: Invalid wait context ]"
> 
> We cannot convert i915's power domain lock to spin lock
> due to the nested dependency of non-atomic context waits.
> 
> So, let's move the xe_irq_reset functions from the
> critical area, while still ensuring that we are protecting
> the irq.enabled and ensuring the right serialization
> in the irq handlers.
> 
> v2: On the first version, I had missed the fact that
> irq.enabled is checked on the xe/display glue layer,
> and that i915 display code is actually using the irq
> spin lock properly. So, this got changed to a version
> suggested by Matthew Auld.
> 
> v3: do not use lockdep_assert for display glue.
>      do not save restore irq from inside IRQ or we can
>      get bogus irq restore warnings
> 
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/463
> Suggested-by: Matthew Auld <matthew.auld at intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
Reviewed-by: Matthew Auld <matthew.auld at intel.com>



More information about the Intel-xe mailing list