mirror-linux/drivers/gpu/drm/xe/display
Rodrigo Vivi 4bfc9c553f
drm/xe/display: Avoid encoder_suspend at runtime suspend
Fix circular locking dependency on runtime suspend.

<4> [74.952215] ======================================================
<4> [74.952217] WARNING: possible circular locking dependency detected
<4> [74.952219] 6.10.0-rc7-xe #1 Not tainted
<4> [74.952221] ------------------------------------------------------
<4> [74.952223] kworker/7:1/82 is trying to acquire lock:
<4> [74.952226] ffff888120548488 (&dev->mode_config.mutex){+.+.}-{3:3}, at: drm_modeset_lock_all+0x40/0x1e0 [drm]
<4> [74.952260]
but task is already holding lock:
<4> [74.952262] ffffffffa0ae59c0 (xe_pm_runtime_lockdep_map){+.+.}-{0:0}, at: xe_pm_runtime_suspend+0x2f/0x340 [xe]
<4> [74.952322]
which lock already depends on the new lock.

The commit 'b1d90a86 ("drm/xe: Use the encoder suspend helper also used
by the i915 driver")' didn't do anything wrong. It actually fixed a
critical bug, because the encoder_suspend was never getting actually
called because it was returning if (has_display(xe)) instead of
if (!has_display(xe)). However, this ended up introducing the encoder
suspend calls in the runtime routines as well, causing the circular
locking dependency.

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2304
Fixes: b1d90a862c ("drm/xe: Use the encoder suspend helper also used by the i915 driver")
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240830183507.298351-2-rodrigo.vivi@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
(cherry picked from commit 8da19441d0)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2024-09-04 12:24:47 -04:00
..
ext drm/xe/display: drop i915_drv.h include from xe code 2024-06-06 16:02:33 +03:00
intel_fb_bo.c drm/xe/display: drop i915_drv.h include from xe code 2024-06-06 16:02:33 +03:00
intel_fb_bo.h
intel_fbdev_fb.c drm/xe/display: drop i915_drv.h include from xe code 2024-06-06 16:02:33 +03:00
xe_display.c drm/xe/display: Avoid encoder_suspend at runtime suspend 2024-09-04 12:24:47 -04:00
xe_display.h drm/xe: Prepare display for D3Cold 2024-05-23 11:54:07 -04:00
xe_display_misc.c
xe_display_rps.c
xe_dsb_buffer.c drm/xe/bmg: implement Wa_16023588340 2024-08-19 13:30:41 -04:00
xe_fb_pin.c drm/xe/bmg: implement Wa_16023588340 2024-08-19 13:30:41 -04:00
xe_hdcp_gsc.c drm next for 6.11-rc1: 2024-07-18 09:34:02 -07:00
xe_plane_initial.c drm/i915: Introduce the plane->min_alignment() vfunc 2024-06-24 17:09:50 +03:00
xe_tdf.c drm/i915/display: perform transient flush 2024-05-03 13:15:54 -07:00