OSDN Git Service

drm/i915/selftests: exercise_ggtt may have nothing to do
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 15 Nov 2017 15:25:58 +0000 (15:25 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 16 Nov 2017 15:47:17 +0000 (15:47 +0000)
When operating on the live_ggtt we have to find a usuable hole for our
test. It is possible for there to be no hole we can use, so initialise
the err to 0 for the early exit.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171115152558.31252-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c

index d9560d8..3dcf886 100644 (file)
@@ -958,7 +958,7 @@ static int exercise_ggtt(struct drm_i915_private *i915,
        u64 hole_start, hole_end, last = 0;
        struct drm_mm_node *node;
        IGT_TIMEOUT(end_time);
-       int err = -ENODEV;
+       int err = 0;
 
        mutex_lock(&i915->drm.struct_mutex);
 restart: