All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/xe/guc: handle exec queue teardown after hot-unplug
@ 2026-08-11 13:37 Nitin Gote
  2026-08-11 13:07 ` ✓ CI.KUnit: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Nitin Gote @ 2026-08-11 13:37 UTC (permalink / raw)
  To: intel-xe; +Cc: Nitin Gote

This series moves the hot-unplug handling for GuC exec queue teardown into
the GuC message submision layer.

The issue was seen with the new core_hotunplug "with-load" IGT subtests,
where an exec queue can be destroyed from a deferred fd close after the
device has already been hot-unplugged:

  guc_exec_queue_add_msg()
  guc_exec_queue_destroy()
  xe_exec_queue_destroy()
  xe_file_close()

The warning is:

  Missing outer runtime PM protection

After some debugging, this does not look like a missing runtime PM
reference or a zero usage count. At the warning point I saw:
usage_count=3, status=RPM_SUSPENDED and disable_depth=1

During hot-unplug, the PCI remove path disables runtime PM. The old
struct device can still remain alive because the old drm_device is still
referenced by an open fd. When that fd is finally closed,
guc_exec_queue_destroy() runs on the old device where runtime PM is
already disabled. In that state pm_runtime_get_if_in_use() returns
-EINVAL even with a non-zero usage count, so
xe_pm_runtime_get_noresume() cannot observe the existing PM state and
warns.

Instead of suppressing the warning in xe_pm_runtime_get_noresume(), this
series handles the unplug case where the GuC exec queue message is queued
and processed.

Patch 1 reworks the GuC exec queue message teardown handling.
Patch 2 removes EXEC_QUEUE_FLAG_PERMANENT, which is no longer needed.

Observed with new igt tests:

  igt@core_hotunplug@hotreplug-with-load
  igt@core_hotunplug@hotunplug-rescan-with-load
  
Link: https://patchwork.freedesktop.org/patch/725773/?series=166744&rev=4

v2:
 - Drop the drm_dev_is_unplugged() bypass from guc_exec_queue_destroy()
   and instead exclude hot-unplug from the WARN in
   xe_pm_runtime_get_noresume().

v3:
 - Rework the fix in the message-submission layer instead of touching the
   WARN; gate PM/HW work on drm_dev_enter() and route all queues through
   the CLEANUP message. (Matthew Brost)
 - Prove the root cause (runtime PM disabled on unplug, not a zero
   refcount) and record it in the commit message. (Matt B, Raag Jadav)
 - Also remove EXEC_QUEUE_FLAG_PERMANENT flag in
   separate patch (Matthew Brost)


Nitin Gote (2):
  drm/xe/guc: rework exec queue teardown PM/unplug handling
  drm/xe: remove EXEC_QUEUE_FLAG_PERMANENT

 drivers/gpu/drm/xe/xe_exec_queue.c       |  3 -
 drivers/gpu/drm/xe/xe_exec_queue_types.h | 14 ++--
 drivers/gpu/drm/xe/xe_gsc.c              |  3 +-
 drivers/gpu/drm/xe/xe_guc_submit.c       | 98 ++++++++++++------------
 drivers/gpu/drm/xe/xe_migrate.c          |  2 -
 drivers/gpu/drm/xe/xe_pm.c               |  5 ++
 drivers/gpu/drm/xe/xe_pxp_submit.c       |  5 +-
 drivers/gpu/drm/xe/xe_sriov_vf_ccs.c     |  1 -
 drivers/gpu/drm/xe/xe_vm.c               |  1 -
 9 files changed, 65 insertions(+), 67 deletions(-)

-- 
2.50.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-08-19  6:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-11 13:37 [PATCH 0/2] drm/xe/guc: handle exec queue teardown after hot-unplug Nitin Gote
2026-08-11 13:07 ` ✓ CI.KUnit: success for " Patchwork
2026-08-11 13:37 ` [PATCH 1/2] drm/xe/guc: rework exec queue teardown PM/unplug handling Nitin Gote
2026-08-13  6:46   ` Upadhyay, Tejas
2026-08-19  5:29   ` Gupta, Varun
2026-08-19  6:18     ` Gote, Nitin R
2026-08-11 13:37 ` [PATCH 2/2] drm/xe: remove EXEC_QUEUE_FLAG_PERMANENT Nitin Gote
2026-08-11 23:36   ` Matthew Brost
2026-08-13  6:40   ` Upadhyay, Tejas
2026-08-11 13:45 ` ✓ Xe.CI.BAT: success for drm/xe/guc: handle exec queue teardown after hot-unplug Patchwork
2026-08-11 14:50 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-08-14  4:23   ` Gote, Nitin R

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.