Skip to content

DRM: Remove MM "Pre-Alloc"

David Herrmann dri-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4drm/mm: add "best_match" to drm_mm_insert_node()drivers/gpu/drm/drm_mm.c drivers/gpu/drm/drm_vma_manager.c drivers/gpu/drm/i915/i915_gem.c +3 more+38 -381 reply
1/4drm/mm: add "best_match" flag to drm_mm_insert_node()drivers/gpu/drm/drm_mm.c drivers/gpu/drm/drm_vma_manager.c drivers/gpu/drm/i915/i915_gem.c +5 more+68 -553 replies
2/4drm/ttm: replace drm_mm_pre_get() by direct allocdrivers/gpu/drm/ttm/ttm_bo_manager.c+19 -212 replies
3/4drm/i915: pre-alloc instead of drm_mm search/get_blockdrivers/gpu/drm/i915/i915_gem_stolen.c+47 -257 replies
4/4drm/mm: remove unused APIdrivers/gpu/drm/drm_mm.c include/drm/drm_mm.h+20 -2352 replies

Reviews trailers per patch

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

PatchDaniel Vetter
1/4R-b
1/4R-b
2/4R-b R-b
3/4A-b
4/4A-b A-b

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

Read the v1 thread

Cover letter [PATCH 0/4] DRM: Remove MM "Pre-Alloc"

Hi

See patch 4/4 for a more detailed explanation of this series. I basically kill off the whole drm_mm pre-alloc code as it really doesn't make any sense with todays infrastructure. No drm_mm user runs in atomic context. We use pre-alloc only to allow allocation while holding a spin-lock. But we can easily kzalloc() the node before taking the spinlock and use the drm_mm_insert_*() helpers directly.

This series converts the last pre-alloc users (ttm and i915-gem-stolen) to use the already established kzalloc()+drm_mm_insert_*() helpers.

The last patch removes a bunch of old drm_mm code, so Daniel can tackle his "drm_mm documentation" TODO list.

Cheers
David

David Herrmann (4):
drm/mm: add "best_match" to drm_mm_insert_node() drm/ttm: replace drm_mm_pre_get() by direct alloc drm/i915: pre-alloc instead of drm_mm search/get_block drm/mm: remove unused API

 drivers/gpu/drm/drm_mm.c               | 183 +++++----------------------------
 drivers/gpu/drm/drm_vma_manager.c      |   4 +-
 drivers/gpu/drm/i915/i915_gem.c        |   3 +-
 drivers/gpu/drm/i915/i915_gem_stolen.c |  72 ++++++++-----
 drivers/gpu/drm/sis/sis_mm.c           |   4 +-
 drivers/gpu/drm/ttm/ttm_bo_manager.c   |  40 ++++---
 drivers/gpu/drm/via/via_mm.c           |   4 +-
 include/drm/drm_mm.h                   | 131 +++++------------------
 8 files changed, 123 insertions(+), 318 deletions(-)
Signature · 1 line
1.8.3.3