From: Raag Jadav <raag.jadav@intel.com>
To: Tejas Upadhyay <tejas.upadhyay@intel.com>
Cc: intel-xe@lists.freedesktop.org,
Jani Nikula <jani.nikula@linux.intel.com>,
Badal Nilawar <badal.nilawar@intel.com>
Subject: Re: [PATCH] drm/xe: Move drm_client_dev_suspend/resume outside pm block signalling
Date: Wed, 17 Jun 2026 13:56:36 +0200 [thread overview]
Message-ID: <ajKLdJIoHYBCIMiz@black.igk.intel.com> (raw)
In-Reply-To: <20260617082104.610620-2-tejas.upadhyay@intel.com>
On Wed, Jun 17, 2026 at 01:51:05PM +0530, Tejas Upadhyay wrote:
> A circular locking dependency is reported between xe_pm_block_map and
> dev->clientlist_mutex:
>
> &dev->clientlist_mutex --> &vm->lock --> xe_pm_block_map --> &dev->clientlist_mutex
>
> The dependency chain is:
> 1. xe_pm_suspend() calls xe_pm_block_begin_signalling(), then
> xe_display_pm_suspend() which calls drm_client_dev_suspend()
> acquiring clientlist_mutex. (xe_pm_block_map -> clientlist_mutex)
>
> 2. drm_client_dev_unregister() -> drm_file_free() -> xe_file_close() ->
> prelim_xe_eudebug_file_close() acquires discovery_lock.
> (clientlist_mutex -> discovery_lock)
>
> 3. xe_vm_close_and_put() acquires vm->lock under discovery_lock.
> (discovery_lock -> vm->lock)
>
> 4. xe_exec_ioctl() holds vm->lock and calls xe_pm_block_on_suspend()
> which waits on xe_pm_block_map. (vm->lock -> xe_pm_block_map)
>
> Fix this by moving drm_client_dev_suspend() before
> xe_pm_block_begin_signalling() in xe_pm_suspend(), and
> drm_client_dev_resume() after xe_pm_block_end_signalling() in
> xe_pm_resume(). This breaks the xe_pm_block_map -> clientlist_mutex
> edge in the dependency chain.
>
> The drm_client_dev_suspend/resume calls are safe to move because they
> only blank/unblank the fbdev console and don't depend on display power
> state or any operations within the block signalling scope.
Other folks already have interesting comments but just FYI:
We'd want to make sure fbdev is not left blank on suspend/resume failure
so the user atleast have an opportunity to see the failure and possibly
add to the bug report.
You can refer to the comment above xe_display_pm_resume().
Raag
next prev parent reply other threads:[~2026-06-17 11:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 8:21 [PATCH] drm/xe: Move drm_client_dev_suspend/resume outside pm block signalling Tejas Upadhyay
2026-06-17 11:25 ` Matthew Auld
2026-06-17 12:11 ` Upadhyay, Tejas
2026-06-17 14:13 ` Matthew Auld
2026-06-17 11:30 ` Jani Nikula
2026-06-17 11:56 ` Raag Jadav [this message]
2026-06-17 12:12 ` Upadhyay, Tejas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ajKLdJIoHYBCIMiz@black.igk.intel.com \
--to=raag.jadav@intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=tejas.upadhyay@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox