From: Laurent Pinchart Subject: Re: [PATCH 0/6] DRM: Unified VMA Offset Manager Date: Wed, 03 Jul 2013 01:59:46 +0200 Message-ID: <1533028.1hqpVnNvpn@avalon> References: <1372703583-9550-1-git-send-email-dh.herrmann@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [95.142.166.194]) by gabe.freedesktop.org (Postfix) with ESMTP id 748F8E6262 for ; Tue, 2 Jul 2013 16:59:17 -0700 (PDT) In-Reply-To: <1372703583-9550-1-git-send-email-dh.herrmann@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org Cc: Dave Airlie List-Id: dri-devel@lists.freedesktop.org Hi David, On Monday 01 July 2013 20:32:57 David Herrmann wrote: > Hi > > I picked up the initial work from Dave [1], fixed several bugs, rewrote the > drm_mm node handling and adjusted the different drivers. > The series tries to replace the VMA-offset managers from GEM and TTM with a > single unified implementation. It uses the TTM RBTree idea to allow > sub-mappings (which wouldn't be feasible with hashtables). Nice work, thank you. Could you please also update Documentation/DocBook/drm.tmpl ? > Changes to Dave's v1: > * Fixed a ref-count bug in TTM during object lookup > * Use embedded drm_mm_node objects to avoid allocations > * Document drm_vma_* API > * Reviewed TTM locking > * Fixed all new drivers > * Use node->vm_pages instead of obj->size for GEM size calculations > > Notes: > * Tested on nouveau only! I will try to test i915 this week. However, the > gem changes seem pretty trivial. > * I couldn't even compile-test the ARM drivers. However, the omapdrm diffs > are the only changes that are non-trivial. Is there any ongoing work to > remove the arch-deps in DRM drivers? > * _DRM_GEM is no longer used, but I guess we need to keep it for backwards > compat? > * If we replace node_list in drm_mm with an rbtree, we can drop it from > drm_vma_offset_manager completely. However, I wanted to avoid heavy > drm_mm changes and left this for follow up patches. > * This is currently based on linux-3.10 from today. Next series will be > rebased on drm-next/linux-next, but the current -next trees continously > break my machines.. > But the only changes should be to fix additional drivers. I didn't see > any other things to fix for drm-next. > > Another series, which I will send later, adds "struct file" lists for each > drm-vma-offset so we can get access control over gem objects. Also, I have > an experimental series to remove the allocation helpers in drm_mm and let > drivers embed drm_mm_node instead. Lets see how that works out. > > Comments welcome! > Cheers > David > > [1]: http://cgit.freedesktop.org/~airlied/linux/log/?h=drm-vma-manager > > David Herrmann (6): > drm: make drm_mm_init() return void > drm: mm: add drm_mm_node_linked() helper > drm: add unified vma offset manager > drm: gem: convert to new unified vma manager > drm: ttm: convert to unified vma offset manager > drm: provide generic drm_vma_node_unmap() helper > > drivers/gpu/drm/Makefile | 2 +- > drivers/gpu/drm/ast/ast_main.c | 2 +- > drivers/gpu/drm/cirrus/cirrus_main.c | 2 +- > drivers/gpu/drm/drm_gem.c | 93 ++---------- > drivers/gpu/drm/drm_gem_cma_helper.c | 9 +- > drivers/gpu/drm/drm_mm.c | 5 +- > drivers/gpu/drm/drm_vma_manager.c | 224 ++++++++++++++++++++++++++ > drivers/gpu/drm/exynos/exynos_drm_gem.c | 7 +- > drivers/gpu/drm/gma500/gem.c | 8 +- > drivers/gpu/drm/i915/i915_gem.c | 13 +- > drivers/gpu/drm/mgag200/mgag200_main.c | 2 +- > drivers/gpu/drm/nouveau/nouveau_display.c | 2 +- > drivers/gpu/drm/nouveau/nouveau_gem.c | 2 +- > drivers/gpu/drm/omapdrm/omap_gem.c | 11 +- > drivers/gpu/drm/omapdrm/omap_gem_helpers.c | 49 +------ > drivers/gpu/drm/qxl/qxl_object.h | 2 +- > drivers/gpu/drm/qxl/qxl_release.c | 2 +- > drivers/gpu/drm/radeon/radeon_object.h | 5 +- > drivers/gpu/drm/ttm/ttm_bo.c | 82 ++--------- > drivers/gpu/drm/ttm/ttm_bo_manager.c | 8 +- > drivers/gpu/drm/ttm/ttm_bo_util.c | 3 +- > drivers/gpu/drm/ttm/ttm_bo_vm.c | 81 ++++------- > drivers/gpu/drm/udl/udl_gem.c | 6 +- > drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 4 +- > include/drm/drmP.h | 7 +- > include/drm/drm_mm.h | 11 +- > include/drm/drm_vma_manager.h | 122 ++++++++++++++++ > include/drm/ttm/ttm_bo_api.h | 15 +- > include/drm/ttm/ttm_bo_driver.h | 7 +- > include/uapi/drm/drm.h | 2 +- > 30 files changed, 464 insertions(+), 324 deletions(-) > create mode 100644 drivers/gpu/drm/drm_vma_manager.c > create mode 100644 include/drm/drm_vma_manager.h -- Regards, Laurent Pinchart