DragonFlyBSD/src a34b416sys/dev/drm drm_mm.c drm_drv.c, sys/dev/drm/include/drm drm_mm.h drmP.h

drm/ttm: convert to unified vma offset manager

* Add TTM_BO_PRIV_FLAG_ACTIVE.

* Changes so we can use more of the linux ttm_bo_vm.c code.  Fake
  struct vm_fault, fake struct vm_operations_struct, and adjust
  struct vm_area_struct.  Also add related flags.

  The VM interface to DragonFlyBSD is now (mostly) a wrapper around
  the linux code.

* The linux red/black tree code uses some of the DFly RB macros.
  This means that struct rb_root must be compatible.  Add missing
  fields.  This fixes RB_REMOVE breakage due to it trying to iterate
  rbh_inprog.

* Add set_need_resched() (empty)

* radeon_bo_is_reserved() is no longer applicable and has been removed,
  allowing us to avoid implementintg ttm_bo_is_reserved().  Note that
  linux-current does not have these functions.

* Refactor radeon_do_test_moves() so reflect the linux code a bit
  better.  This fixes a few error paths.

* radeon_verify_access() remains empty.  We need the struct file
  (which we don't have) to implement it.

* Make some adjustments to ttm_mem_type_from_pace() and other
  API functions which use struct ttm_place instead of uint32_t.
  This better reflects the linux code and fixes compile-time breakage
  due to the partial API patch.

  Make other struct ttm_place adjustments.

* bdev->dev_mapping is broken (partial API update in WIP) and is
  still always NULL because ttm_bo_device_init() does not yet initialize
  it (needs an argument passed from the chipset code).

* refactor ttm_bo_man_get_node() to fix compile issues.

* Completely rewrite the DragonFly API interfacing code in ttm_bo_vm.c.
  Hopefully the fault code is now far, far more robust than it was before.

  Add debug code to check for duplicate vm_page insertions, in case
  we hit that panic again (it had problems due to bdev->dev_mapping being
  NULL before that issue was tracked down).
DeltaFile
+567-151sys/dev/drm/ttm/ttm_bo_vm.c
+115-177sys/dev/drm/ttm/ttm_bo.c
+44-48sys/dev/drm/include/drm/ttm/ttm_bo_api.h
+6-65sys/dev/drm/drm_mm.c
+37-32sys/dev/drm/radeon/radeon_test.c
+31-28sys/dev/drm/include/drm/ttm/ttm_bo_driver.h
+0-29sys/dev/drm/include/drm/drm_mm.h
+13-15sys/dev/drm/ttm/ttm_bo_manager.c
+24-0sys/dev/drm/include/linux/mm.h
+13-1sys/dev/drm/radeon/radeon_ttm.c
+1-9sys/dev/drm/radeon/radeon_object.h
+5-3sys/dev/drm/include/linux/rbtree.h
+7-0sys/dev/drm/include/linux/sched.h
+0-7sys/dev/drm/radeon/radeon_object.c
+4-3sys/dev/drm/ttm/ttm_bo_util.c
+1-2sys/dev/drm/drm_drv.c
+1-1sys/dev/drm/include/drm/drmP.h
+869-57117 files

UnifiedSplitRaw