drm/i915/gtt: Fix pte clear range
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Tue, 1 Nov 2016 13:27:36 +0000 (15:27 +0200)
committerMika Kuoppala <mika.kuoppala@intel.com>
Wed, 2 Nov 2016 09:58:03 +0000 (11:58 +0200)
commit37c6393431bf526d6f465e095c1201c1b890dd51
tree74b381229ea8e2e71745351f8aa118b58088f7a7
parent0a379e27db5164a7e49a3717b16a59469d944b5d
drm/i915/gtt: Fix pte clear range

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: Split gen8_ppgtt_clear_pte_range")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98282
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Michel Thierry <michel.thierry@intel.com>
Cc: MichaƂ Winiarski <michal.winiarski@intel.com>
Reported-by: Mike Lothian <mike@fireburn.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
drivers/gpu/drm/i915/i915_gem_gtt.c