From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: TTM and AGP conflicts Date: Thu, 5 Jan 2012 21:26:20 -0500 Message-ID: <20120106022620.GA5598@phenom.dumpdata.com> References: <20120103224340.GA3026@homer.localdomain> <20120103225933.GA14711@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by gabe.freedesktop.org (Postfix) with ESMTP id 871E7A02BA for ; Thu, 5 Jan 2012 18:28:05 -0800 (PST) Content-Disposition: inline In-Reply-To: <20120103225933.GA14711@phenom.dumpdata.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: Jerome Glisse Cc: DRI development list List-Id: dri-devel@lists.freedesktop.org On Tue, Jan 03, 2012 at 05:59:33PM -0500, Konrad Rzeszutek Wilk wrote: > On Tue, Jan 03, 2012 at 05:43:40PM -0500, Jerome Glisse wrote: > > On Fri, Dec 23, 2011 at 01:19:43AM +0000, James Simmons wrote: > > > = > > > > > Hi! > > > > > > > > > > =A0 =A0 =A0 =A0I updated the openchrome tree and while testing on= the AGP system > > > > > discovered some interesting problems with the new TTM changes. The > > > > > problems center around the ttm_tt_[un]populate which I modeled af= ter the > > > > > radeon and nouveau driver. > > > > > =A0 =A0 =A0 =A0First problem I noticed was on a AGP system that m= y ttm_tt_populate > > > > > function would oops. Tracking it down I found the problem was the > > > > > ttm_agp_tt_create calls ttm_tt_init instead of ttm_dma_tt_init so= once my > > > > > ttm_tt_populate function would attempt to touch the dma_address i= t would > > > > > oops. The second issue is the assumption of the cast for struct t= tm_tt in > > > > > both the populate and unpopulate function. For the AGP case the p= roper > > > > > case would be to ttm_agp_backend. > > > > > =A0 =A0 =A0 =A0At this point my assumption is the ttm_bo_move fun= ction has to be > > > > > rewritten to handle the AGP case to avoid calling ttm_tt_bind and= in all > > > > > cases ttm_tt_bind needs to be avoided. Looking at the radeon and = nouveau > > > > > drivers I don't see that testing happening. Am I just missing som= ething? > > > > = > > > > Happens on AGP radeons as well: > > > > https://bugs.freedesktop.org/show_bug.cgi?id=3D43719 > > > = > > > So I'm not crazy, so this needs to be fixed. Here is what my = > > > understanding of the TTM layer is. My impression is that struct ttm_b= o_driver > > > handles multiple domains, AGP, pcie etc and in each method you have t= o = > > > handle each specific domain you support. Also *move gives the impress= ion of > > > moving between these different domains. = > > > Where as for struct ttm_backend_func was more for allocating from > > > a specific domain. Also I never saw a clear way to handle multiple ba= ckends. = > > > For example my AGP systems can also do pci dma as well. = > > = > > > _______________________________________________ > > > dri-devel mailing list > > > dri-devel@lists.freedesktop.org > > > http://lists.freedesktop.org/mailman/listinfo/dri-devel > > = > > Attached is patch to fix this, so sorry about that, i must have lost my > > agp change along the way when working on the patchset. This patch is not > > extensively tested, i will do more testing tomorrow on more gpu, might > > even found an nvidia agp i can try. Again sorry for breaking this. > = > Hey Jerome, > = > Was going to look at this week and see how it performs before (and after) > the squash ttm bind+populate operation. Any thoughts of what benchmarks I > should run? OK, Reviewed-by: Konrad Rzeszutek Wilk I ran it on my radeon AGP cards and they performed nicely. I do need to run it with the nouveau AGP card tomorrow (barring any move_notify issues).