[PATCH 0/2] drm/xe: adding wait helper for gt async reset

Maciej Patelczyk maciej.patelczyk at intel.com
Mon Dec 9 14:12:08 UTC 2024


GT reset is asynchronous. However, in few places there is an explicit
wait for reset to finish via flush_work. Providing a helper which
clearly express the intention of waiting for reset to finish.

The usage of asynchronous reset in sysfs gt0/tile0/ccs_mode creates
a situation in which a user after changing ccs_mode with immediate
query can receive only partial configuration due to ongoing reset.
For instance a single compute engine where 4 were requested.
This sometimes happens in the EU Debugger tests leading to skips or
even failures (sysfs not accessible).
This forces usage of sleep() in tests to wait for reset to complete.

The first patch provides a helper xe_gt_reset_wait and makes usage
of it.
The second patch makes ccs_mode sysfs write wait for reset to
finish.

Maciej Patelczyk (2):
  drm/xe: introduce xe_gt_reset_wait to wait for async gt reset
  drm/xe: make change ccs_mode a synchronous action

 drivers/gpu/drm/xe/tests/xe_bo.c    |  2 +-
 drivers/gpu/drm/xe/tests/xe_mocs.c  |  2 +-
 drivers/gpu/drm/xe/xe_gt.h          | 12 ++++++++++++
 drivers/gpu/drm/xe/xe_gt_ccs_mode.c |  6 +++++-
 drivers/gpu/drm/xe/xe_gt_debugfs.c  |  2 +-
 5 files changed, 20 insertions(+), 4 deletions(-)

--
2.43.0


More information about the Intel-xe mailing list