drm/i915/selftests: Skip aperture remapping selftest where there is no aperture
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 12 Apr 2021 09:05:08 +0000 (10:05 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Tue, 20 Apr 2021 09:48:55 +0000 (10:48 +0100)
If there is no mappable aperture, we cannot remap it for access, and the
selftest is void.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210412090526.30547-2-matthew.auld@intel.com
drivers/gpu/drm/i915/selftests/i915_vma.c

index 5fe7b80..dd06072 100644 (file)
@@ -967,6 +967,9 @@ static int igt_vma_remapped_gtt(void *arg)
        intel_wakeref_t wakeref;
        int err = 0;
 
+       if (!i915_ggtt_has_aperture(&i915->ggtt))
+               return 0;
+
        obj = i915_gem_object_create_internal(i915, 10 * 10 * PAGE_SIZE);
        if (IS_ERR(obj))
                return PTR_ERR(obj);