From: Daniel Vetter Subject: Re: [PATCH 4/9] [v4] drm/i915: Make clear/insert vfuncs args absolute Date: Wed, 5 Mar 2014 15:28:09 +0100 Message-ID: <20140305142809.GZ17001@phenom.ffwll.local> References: <1392925833-6593-1-git-send-email-benjamin.widawsky> <1393380824-14725-1-git-send-email-benjamin.widawsky@intel.com> <20140226072715.GA7532@bwidawsk.net> <20140226073615.GA7575@bwidawsk.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f51.google.com (mail-ee0-f51.google.com [74.125.83.51]) by gabe.freedesktop.org (Postfix) with ESMTP id 85E2BFA73D for ; Wed, 5 Mar 2014 06:28:21 -0800 (PST) Received: by mail-ee0-f51.google.com with SMTP id c13so501575eek.10 for ; Wed, 05 Mar 2014 06:28:20 -0800 (PST) Content-Disposition: inline In-Reply-To: <20140226073615.GA7575@bwidawsk.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Ben Widawsky Cc: Intel GFX List-Id: intel-gfx@lists.freedesktop.org On Tue, Feb 25, 2014 at 11:36:15PM -0800, Ben Widawsky wrote: > On Tue, Feb 25, 2014 at 11:27:15PM -0800, Ben Widawsky wrote: > > On Tue, Feb 25, 2014 at 06:13:44PM -0800, Ben Widawsky wrote: > > > This patch converts insert_entries and clear_range, both functions which > > > are specific to the VM. These functions tend to encapsulate the gen > > > specific PTE writes. Passing absolute addresses to the insert_entries, > > > and clear_range will help make the logic clearer within the functions as > > > to what's going on. Currently, all callers simply do the appropriate > > > page shift, which IMO, ends up looking weird with an upcoming change for > > > the gen8 page table allocations. > > > > > > Up until now, the PPGTT was a funky 2 level page table. GEN8 changes > > > this to look more like a 3 level page table, and to that extent we need > > > a significant amount more memory simply for the page tables. To address > > > this, the allocations will be split up in finer amounts. > > > > > > v2: Replace size_t with uint64_t (Chris, Imre) > > > > > > v3: Fix size in gen8_ppgtt_init (Ben) > > > Fix Size in i915_gem_suspend_gtt_mappings/restore (Imre) > > > > > > v4: Wherever length was introduced in the API, the num_entries > > > calculation should have been (length - start) as opposed to just length. > > > As this is only a bug on clearing entries, it wasn't easily apparent. > > > (Ben) > > > > > > Reviewed-by: Imre Deak > > > Signed-off-by: Ben Widawsky > > > > Give me a sec on this one.... something is still busted. > > > > Ah, yes. v4 is stupid. v3 is still the right one. I got confused by some > future changes I made. Please ignore v4. Well num_entries = length - start should ring all available alarm clocks. Either you want num_entries = length or s/length/end/. length - start makes absolutely no sense at all ;-) Cheers, Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch