Re: [PATCH 1/2] drm/i915/gtt: Fix pte clear range

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

 



On Tue, Nov 01, 2016 at 12:22:45PM +0200, Mika Kuoppala wrote:
> Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx> writes:
> >> @@ -735,8 +737,8 @@ static bool gen8_ppgtt_clear_pt(struct i915_address_space *vm,
> >>  
> >>  	pt_vaddr = kmap_px(pt);
> >>  
> >> -	for (pte = pte_start; pte < num_entries; pte++)
> >> -		pt_vaddr[pte] = scratch_pte;
> >> +	while (pte < pte_end)
> >> +		pt_vaddr[pte++] = scratch_pte;
> >
> > I'd prefer the for loop still. Just fix "pte < pte_end".
> >
> 
> I changed to this due to pte being already set and
> used before the loop, to get rid of superfluous pte_start.

Yes, I think the change to while() made sense with the new flow of pte
being used a few times before we set the scratch_pte.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://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