drm/mm: add "best_match" flag to drm_mm_insert_node()
Add a "best_match" flag similar to the drm_mm_search_*() helpers so we can convert TTM to use them in follow up patches. We can also inline the non-generic helpers and move them into the header to allow compile-time optimizations. To make calls to drm_mm_{search,insert}_node() more readable, this converts the boolean argument to a flagset. There are pending patches that add additional flags for top-down allocators and more. v2: - use flag parameter instead of boolean "best_match" - convert *_search_free() helpers to also use flags argument Signed-off-by:David Herrmann <dh.herrmann@gmail.com> Reviewed-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by:
Dave Airlie <airlied@redhat.com>
Showing
- drivers/gpu/drm/drm_mm.c 12 additions, 25 deletionsdrivers/gpu/drm/drm_mm.c
- drivers/gpu/drm/drm_vma_manager.c 2 additions, 2 deletionsdrivers/gpu/drm/drm_vma_manager.c
- drivers/gpu/drm/i915/i915_gem.c 2 additions, 1 deletiondrivers/gpu/drm/i915/i915_gem.c
- drivers/gpu/drm/i915/i915_gem_stolen.c 8 additions, 4 deletionsdrivers/gpu/drm/i915/i915_gem_stolen.c
- drivers/gpu/drm/sis/sis_mm.c 4 additions, 2 deletionsdrivers/gpu/drm/sis/sis_mm.c
- drivers/gpu/drm/ttm/ttm_bo_manager.c 2 additions, 1 deletiondrivers/gpu/drm/ttm/ttm_bo_manager.c
- drivers/gpu/drm/via/via_mm.c 2 additions, 2 deletionsdrivers/gpu/drm/via/via_mm.c
- include/drm/drm_mm.h 36 additions, 18 deletionsinclude/drm/drm_mm.h
Loading
Please register or sign in to comment