From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH 29/66] drm: pre allocate node for create_block Date: Mon, 1 Jul 2013 11:30:27 -0700 Message-ID: <20130701183027.GB4242@bwidawsk.net> References: <1372375867-1003-1-git-send-email-ben@bwidawsk.net> <1372375867-1003-30-git-send-email-ben@bwidawsk.net> <20130630123443.GI18285@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from shiva.localdomain (unknown [209.20.75.48]) by gabe.freedesktop.org (Postfix) with ESMTP id 55A11E5CB7 for ; Mon, 1 Jul 2013 11:30:40 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130630123443.GI18285@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Daniel Vetter Cc: Intel GFX List-Id: intel-gfx@lists.freedesktop.org On Sun, Jun 30, 2013 at 02:34:43PM +0200, Daniel Vetter wrote: > On Thu, Jun 27, 2013 at 04:30:30PM -0700, Ben Widawsky wrote: > > For an upcoming patch where we introduce the i915 VMA, it's ideal to > > have the drm_mm_node as part of the VMA struct (ie. it's pre-allocated). > > Part of the conversion to VMAs is to kill off obj->gtt_space. Doing this > > will break a bunch of code, but amongst them are 2 callers of > > drm_mm_create_block(), both related to stolen memory. > > > > As a side note, this patch has is able to leverage all the existing > > drm_mm_put_block because the node is still kzalloc'd. When the > > aforementioned VMA code comes into play, that too has to change. > > > > Signed-off-by: Ben Widawsky > > Same here about cc'ing dri-devel. Furthermore I think it'd be nice to kill > the interfaces from drm_mm.c which allocate the drm_mm_node themselves. > The last user outside of drm/i915 is ttm, killing that one would also > allow us to remove the (racy) preallocation madness. > > So if you convert over all of drm/i915 to the preallcoate functions which > pass in the drm_mm_node, I'll volunteer myself to fix up ttm. > -Daniel I will do that and send it as a separate series. -- Ben Widawsky, Intel Open Source Technology Center