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

2016-11-02 Thread Joonas Lahtinen
On ti, 2016-11-01 at 15:27 +0200, Mika Kuoppala wrote: > Comparing pte index to a number of entries is wrong > when clearing a range of pte entries. Use end marker > of 'one past' to correctly point adequate number of > ptes to the scratch page. > > v2: assert early instead of warning late (Chris)

[Intel-gfx] [PATCH 1/2] drm/i915/gtt: Fix pte clear range

2016-11-01 Thread Mika Kuoppala
Comparing pte index to a number of entries is wrong when clearing a range of pte entries. Use end marker of 'one past' to correctly point adequate number of ptes to the scratch page. v2: assert early instead of warning late (Chris) v3: removed consts (Joonas) Fixes: d209b9c3cd28 ("drm/i915/gtt: S

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

2016-11-01 Thread Chris Wilson
On Tue, Nov 01, 2016 at 12:22:45PM +0200, Mika Kuoppala wrote: > Joonas Lahtinen 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++) > >> -

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

2016-11-01 Thread Mika Kuoppala
Joonas Lahtinen writes: > On ma, 2016-10-31 at 17:55 +0200, Mika Kuoppala wrote: >> @@ -712,13 +712,13 @@ static int gen8_48b_mm_switch(struct i915_hw_ppgtt >> *ppgtt, >>   */ >>  static bool gen8_ppgtt_clear_pt(struct i915_address_space *vm, >>  struct i915_page_tabl

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

2016-11-01 Thread Joonas Lahtinen
On ma, 2016-10-31 at 17:55 +0200, Mika Kuoppala wrote: > @@ -712,13 +712,13 @@ static int gen8_48b_mm_switch(struct i915_hw_ppgtt > *ppgtt, >   */ >  static bool gen8_ppgtt_clear_pt(struct i915_address_space *vm, >   struct i915_page_table *pt, > -

[Intel-gfx] [PATCH 1/2] drm/i915/gtt: Fix pte clear range

2016-10-31 Thread Mika Kuoppala
Comparing pte index to a number of entries is wrong when clearing a range of pte entries. Use end marker of 'one past' to correctly point adequate number of ptes to the scratch page. v2: assert early instead of warning late (Chris) Fixes: d209b9c3cd28 ("drm/i915/gtt: Split gen8_ppgtt_clear_pte_ra

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

2016-10-31 Thread Chris Wilson
On Mon, Oct 31, 2016 at 05:24:45PM +0200, Mika Kuoppala wrote: > Comparing pte index to a number of entries is wrong > when clearing a range of pte entries. Use end marker > of 'one past' to correctly point adequate number of > ptes to the scratch page. > > Fixes: d209b9c3cd28 ("drm/i915/gtt: Spli

[Intel-gfx] [PATCH 1/2] drm/i915/gtt: Fix pte clear range

2016-10-31 Thread Mika Kuoppala
Comparing pte index to a number of entries is wrong when clearing a range of pte entries. Use end marker of 'one past' to correctly point adequate number of ptes to the scratch page. Fixes: d209b9c3cd28 ("drm/i915/gtt: Split gen8_ppgtt_clear_pte_range") References: https://bugs.freedesktop.org/sho