From: Michel =?ISO-8859-1?Q?D=E4nzer?= Subject: Re: [PATCH] drm/radeon: allocate page tables on demand v3 Date: Mon, 08 Oct 2012 15:59:50 +0200 Message-ID: <1349704790.17758.186.camel@thor.local> References: <1349615202-5100-1-git-send-email-deathsimple@vodafone.de> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail.gna.ch (darkcity.gna.ch [195.226.6.51]) by gabe.freedesktop.org (Postfix) with ESMTP id 80DA69E7BA for ; Mon, 8 Oct 2012 07:00:05 -0700 (PDT) In-Reply-To: <1349615202-5100-1-git-send-email-deathsimple@vodafone.de> 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: Christian =?ISO-8859-1?Q?K=F6nig?= Cc: dri-devel@lists.freedesktop.org, dcherkassov@gmail.com List-Id: dri-devel@lists.freedesktop.org On Son, 2012-10-07 at 15:06 +0200, Christian K=F6nig wrote: = > Based on Dmitries work, but splitting the code into page > directory and page table handling makes it far more > readable and (hopefully) more reliable. > = > Allocations of page tables are made from the SA on demand, > that should still work fine since all page tables are of > the same size. > = > Also using the fact that allocations from the SA are mostly > continuously (except for end of buffer wraps and under very > high memory pressure) to group updates send to the chipset > specific code into larger chunks. > = > v3: mostly a rewrite of Dmitries previous patch. > = > Signed-off-by: Dmitry Cherkasov > Signed-off-by: Christian K=F6nig Tested-by: Michel D=E4nzer There are some checkpatch errors and warnings though, e.g. trailing whitespace. Also, I noticed a few typos: > + /* initial clear the page directory */ 'Initially' > @@ -865,6 +906,155 @@ uint64_t radeon_vm_map_gart(struct radeon_device *r= dev, uint64_t addr) > } > = > /** > + * radeon_vm_update_pdes - make sure that page directory is valid > + * > + * @rdev: radeon_device pointer > + * @vm: requested vm > + * @start: start of GPU address range > + * @end: end of GPU address range > + * > + * Allocates new page tables if nessasary 'necessary' -- = Earthling Michel D=E4nzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer