Re: [PATCH 4/9] [v4] drm/i915: Make clear/insert vfuncs args absolute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <imre.deak@xxxxxxxxx>
> > > Signed-off-by: Ben Widawsky <ben@xxxxxxxxxxxx>
> > 
> > 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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux