Skip to content

Fix DRM scheduler layering violations in Xe

Matthew Brost intel-xe 10 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest posting 2/27 patches 0 repliesNew
  2. v9 posting 1/22 patches 0 repliesSuperseded
  3. v82 patches 0 repliesSuperseded
Earlier versions · 7
VersionPostedPatchesRepliesStatus
v79 patches17 repliesSuperseded
v68 patches1 replySuperseded
v58 patches1 replySuperseded
v48 patches13 repliesSuperseded
v37 patches19 repliesSuperseded
v2 RFC4 patches2 repliesSuperseded
v1 RFC4 patches6 repliesSuperseded

Changes in v9 from the cover letter

- CI rerun

Patches in v9 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7drm/xe: Add dedicated message lockdrivers/gpu/drm/xe/xe_gpu_scheduler.c drivers/gpu/drm/xe/xe_gpu_scheduler.h drivers/gpu/drm/xe/xe_gpu_scheduler_types.h+7 -40 replies
2/7drm/xe: Stop abusing DRM scheduler internalsdrivers/gpu/drm/xe/xe_gpu_scheduler.c drivers/gpu/drm/xe/xe_gpu_scheduler.h drivers/gpu/drm/xe/xe_guc_submit.c +3 more+26 -1190 replies
3/7drm/xe: Only toggle scheduling in TDR if GuC is runningdrivers/gpu/drm/xe/xe_guc_submit.c+2 -10 replies
4/7drm/xe: Do not deregister queues in TDRdrivers/gpu/drm/xe/xe_guc_submit.c+10 -600 replies
5/7drm/xe: Remove special casing for LR queues in submissiondrivers/gpu/drm/xe/xe_guc_exec_queue_types.h drivers/gpu/drm/xe/xe_guc_submit.c drivers/gpu/drm/xe/xe_trace.h+11 -1270 replies
6/7drm/xe: Disable timestamp WA on VFsdrivers/gpu/drm/xe/xe_lrc.c+3 -00 replies
7/7drm/xe: Avoid toggling schedule state to check LRC timestamp in TDRdrivers/gpu/drm/xe/xe_guc_submit.c drivers/gpu/drm/xe/xe_lrc.c drivers/gpu/drm/xe/xe_lrc.h +3 more+78 -960 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchNiranjana VishwanathapuraPhilipp StannerUmesh Nerlige Ramappa
1/7R-b A-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v9 thread

Cover letter [PATCH v9 0/7] Fix DRM scheduler layering violations in Xe

At XDC, we discussed that drivers should avoid accessing DRM scheduler internals, misusing DRM scheduler locks, and adopt a well-defined pending job list iterator. This series proposes the necessary changes to the DRM scheduler to bring Xe in line with that agreement and updates Xe to use the new DRM scheduler API.

While here, cleanup LR queue handling and simplify GuC state machine in Xe too. Also rework LRC timestamp sampling to avoid scheduling toggle.

v2:
- Fix checkpatch / naming issues
v3:
- Only allow pending job list iterator to be called on stopped schedulers
- Cleanup LR queue handling / fix a few misselanous Xe scheduler issues
v4:
- Address Niranjana's feedback
- Add patch to avoid toggling scheduler state in the TDR
v5:
- Rebase
- Fixup LRC timeout check (Umesh)
v6:
- Fix VF bugs (Testing)
v7:
- Disable timestamp WA on VF
v9:
- CI rerun

Matt

Matthew Brost (7):
drm/xe: Add dedicated message lock
drm/xe: Stop abusing DRM scheduler internals
drm/xe: Only toggle scheduling in TDR if GuC is running drm/xe: Do not deregister queues in TDR
drm/xe: Remove special casing for LR queues in submission drm/xe: Disable timestamp WA on VFs
drm/xe: Avoid toggling schedule state to check LRC timestamp in TDR

 drivers/gpu/drm/xe/xe_gpu_scheduler.c        |   9 +-
 drivers/gpu/drm/xe/xe_gpu_scheduler.h        |  37 +-
 drivers/gpu/drm/xe/xe_gpu_scheduler_types.h  |   2 +
 drivers/gpu/drm/xe/xe_guc_exec_queue_types.h |   2 -
 drivers/gpu/drm/xe/xe_guc_submit.c           | 366 +++----------------
 drivers/gpu/drm/xe/xe_guc_submit_types.h     |  11 -
 drivers/gpu/drm/xe/xe_hw_fence.c             |  16 -
 drivers/gpu/drm/xe/xe_hw_fence.h             |   2 -
 drivers/gpu/drm/xe/xe_lrc.c                  |  45 ++-
 drivers/gpu/drm/xe/xe_lrc.h                  |   3 +-
 drivers/gpu/drm/xe/xe_ring_ops.c             |  25 +-
 drivers/gpu/drm/xe/xe_sched_job.c            |   1 +
 drivers/gpu/drm/xe/xe_sched_job_types.h      |   2 +
 drivers/gpu/drm/xe/xe_trace.h                |   5 -
 14 files changed, 128 insertions(+), 398 deletions(-)
Signature · 1 line
2.34.1