git: drm/ttm: convert to unified vma offset manager

Francois Tigeot ftigeot at crater.dragonflybsd.org
Tue Mar 12 11:51:02 PDT 2019


commit a34b416832c4fc3e662679437ead3ece25111e86
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Mar 9 11:09:14 2019 -0800

    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).

Summary of changes:
 sys/dev/drm/drm_drv.c                       |   3 +-
 sys/dev/drm/drm_mm.c                        |  71 +--
 sys/dev/drm/include/drm/drmP.h              |   2 +-
 sys/dev/drm/include/drm/drm_mm.h            |  29 --
 sys/dev/drm/include/drm/ttm/ttm_bo_api.h    |  92 ++--
 sys/dev/drm/include/drm/ttm/ttm_bo_driver.h |  57 +--
 sys/dev/drm/include/linux/mm.h              |  24 +
 sys/dev/drm/include/linux/rbtree.h          |   8 +-
 sys/dev/drm/include/linux/sched.h           |   7 +
 sys/dev/drm/radeon/radeon_object.c          |   7 -
 sys/dev/drm/radeon/radeon_object.h          |  10 +-
 sys/dev/drm/radeon/radeon_test.c            |  69 +--
 sys/dev/drm/radeon/radeon_ttm.c             |  14 +-
 sys/dev/drm/ttm/ttm_bo.c                    | 292 +++++-------
 sys/dev/drm/ttm/ttm_bo_manager.c            |  28 +-
 sys/dev/drm/ttm/ttm_bo_util.c               |   7 +-
 sys/dev/drm/ttm/ttm_bo_vm.c                 | 680 ++++++++++++++++++++++------
 17 files changed, 849 insertions(+), 551 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a34b416832c4fc3e662679437ead3ece25111e86


-- 
DragonFly BSD source repository



More information about the Commits mailing list