[Intel-gfx] [PATCH 4/9] drm/i915: Make clear/insert vfuncs args absolute

Ben Widawsky ben at bwidawsk.net
Thu Feb 13 01:34:25 CET 2014


On Thu, Feb 13, 2014 at 12:14:15AM +0000, Chris Wilson wrote:
> On Wed, Feb 12, 2014 at 02:28:47PM -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.
> 
> Why size_t? Having a type that changes size irrespective of the GPU
> seems like asking for trouble.
> -Chris
> 

For GGTT, I agree with you. The only trouble I could think of is if you
used 48b PPGTT addressing on i386. I suspect there is some reason this
won't work, but I've not read the spec.

In the case of a field named, "length" I don't really think we need the
size_t type to help self-document. So that's not useful... I can live
with it if you want the change, I do think size_t still makes sense.

> -- 
> Chris Wilson, Intel Open Source Technology Centre

-- 
Ben Widawsky, Intel Open Source Technology Center



More information about the Intel-gfx mailing list