[Intel-gfx] [PATCH 03/19] drm/i915: Micro-optimise gen8_ppgtt_insert_entries()

Chris Wilson chris at chris-wilson.co.uk
Thu Feb 2 16:10:11 UTC 2017


On Thu, Feb 02, 2017 at 03:57:43PM +0000, Tvrtko Ursulin wrote:
> 
> On 02/02/2017 15:32, Chris Wilson wrote:
> >On Thu, Feb 02, 2017 at 03:02:32PM +0000, Chris Wilson wrote:
> >>Improve the sg iteration and in hte process eliminate a bug in
> >>miscomputing the pml4 length as orig_nents<<PAGE_SHIFT is no longer the
> >>full length of the sg table.
> >>
> >
> >which fixes a corner case of 0c40ce130e38
> >Fixes: 0c40ce130e38 ("drm/i915: Trim the object sg table")
> 
> What do you mean? oring_nents is definitely the full length of the
> sg table, especially after i915_sg_trim. Before it orig_nents was
> often larger than the real length of the sg table.

The code is using orig_nents as obj->base.size/vma->size (a page count,
not the sg count), if I read it correctly as it is computing the address
range.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list