drm/i915/selftests: Query the vm under test for hugepage support
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 17 Jan 2019 23:05:12 +0000 (23:05 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 18 Jan 2019 09:07:06 +0000 (09:07 +0000)
Since we have the ppgtt we want to test, we can ask it directly if it is
suitable for the hugepage test we intend to undertake.

v2: Not everyone has full-ppgtt

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190117230512.4789-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/selftests/huge_pages.c

index a5245011180262c87a6c2c502d12b1a5ab7cd97d..a9a2fa35876fe5537db2e4693334097aae4f7def 100644 (file)
@@ -1449,7 +1449,7 @@ static int igt_ppgtt_pin_update(void *arg)
         * huge-gtt-pages.
         */
 
-       if (!HAS_FULL_48BIT_PPGTT(dev_priv)) {
+       if (!ppgtt || !i915_vm_is_48bit(&ppgtt->vm)) {
                pr_info("48b PPGTT not supported, skipping\n");
                return 0;
        }