Skip to content

drm/exec: drm_exec polishing

Thomas Hellström amd-gfx dri-devel intel-xe linux-arm-msm 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 6 repliesIn review
  2. v15 patches 14 repliesSuperseded

Changes in v2 from the cover letter

- An drm/msm patch was already merged.
- Use a unique id for the loop variable (patch 1) (Christian)
- Move assignment to declaration (patch 2) (Christian)
- Declare the retry pointer as void *const. (patch 2)
- Only allow if the drm_exec context is newly initialized. (patch 3) (Christian)
- Fix amdgpu compile error (patch 4) (Intel CI)
- Update the commit message (patch 4)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4drm/exec: Remove the index parameter from drm_exec_for_each_locked_obj[_reverse]drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c drivers/gpu/drm/drm_exec.c +3 more+20 -241 reply
2/4drm/exec: Make the drm_exec_until_all_locked() macro more readableinclude/drm/drm_exec.h+12 -91 reply
3/4drm/exec, drm/xe: Avoid abusing the drm_exec retry pointerdrivers/gpu/drm/drm_exec.c drivers/gpu/drm/xe/xe_validation.h include/drm/drm_exec.h+20 -41 reply
4/4drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct drm_exec::ticketdrivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c drivers/gpu/drm/xe/xe_validation.c +1 more+18 -71 reply

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchChristian König
1/4R-b
2/4R-b
3/4
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] drm/exec: drm_exec polishing

During the work towards enabling exhaustive eviction using full ww locking in TTM, Christian indicated that the path for the drm_exec moving forward was to be a full drm_exec helper with things like userptr validation rather than a WW transaction abstraction. The idea was then briefly discussed to craft a WW transaction helper and then subclass that with drm_exec with the idea that the WW transaction helper could be used in TTM for eviction and for other uses that didn't mandate a full exec sequence.

Regardless whether that actually happens or not, this series aims to clean up abuses of drm_exec internals in drivers so that future development of drm_exec isn't blocked by such driver usage.

Except for patch 2 which is a small cleanup only.

v2:
- An drm/msm patch was already merged.
- Use a unique id for the loop variable (patch 1) (Christian)
- Move assignment to declaration (patch 2) (Christian)
- Declare the retry pointer as void *const. (patch 2)
- Only allow if the drm_exec context is newly initialized. (patch 3) (Christian)
- Fix amdgpu compile error (patch 4) (Intel CI)
- Update the commit message (patch 4)

Thomas Hellström (4):
drm/exec: Remove the index parameter from
drm_exec_for_each_locked_obj[_reverse]
drm/exec: Make the drm_exec_until_all_locked() macro more readable drm/exec, drm/xe: Avoid abusing the drm_exec retry pointer drm/exec, drm/xe, drm/amdgpu: Add an accessor for struct
drm_exec::ticket

 .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c  |  4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c        | 15 ++--
 .../drm/amd/amdgpu/amdgpu_eviction_fence.c    |  3 +-
 drivers/gpu/drm/drm_exec.c                    |  9 +--
 drivers/gpu/drm/drm_gpuvm.c                   |  3 +-
 drivers/gpu/drm/xe/xe_validation.c            |  4 +-
 drivers/gpu/drm/xe/xe_validation.h            |  2 +-
 drivers/gpu/drm/xe/xe_vm.c                    |  3 +-
 include/drm/drm_exec.h                        | 71 ++++++++++++++-----
 9 files changed, 70 insertions(+), 44 deletions(-)
Signature · 1 line
2.54.0