From: Chris Wilson Date: Fri, 17 Feb 2017 14:14:55 +0000 (+0000) Subject: drm/i915: Only apply legacy PDE overflow detection to 3lvl machines X-Git-Tag: v4.12-rc1~116^2~34^2~170 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5a55b527af43423fea51e9927185a1a6e9c80ee7;p=karo-tx-linux.git drm/i915: Only apply legacy PDE overflow detection to 3lvl machines Prevent the overflow check from firing on machines with the full 4lvl page tables, that are not restricted to GEN8_LEGACY_PDES. v2: Also fix the off-by-one in the compare Fixes: 894ccebee2b0 ("drm/i915: Micro-optimise gen8_ppgtt_insert_entries()") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/20170217141455.19877-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala --- diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 47a38272f54c..a5162cbc0ea0 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -854,7 +854,8 @@ gen8_ppgtt_insert_pte_entries(struct i915_hw_ppgtt *ppgtt, break; } - GEM_BUG_ON(pdpe > GEN8_LEGACY_PDPES); + GEM_BUG_ON(!i915_vm_is_48bit(&ppgtt->base) && + pdpe >= GEN8_LEGACY_PDPES); pd = pdp->page_directory[pdpe]; pde = 0; }