From: Chris Wilson Date: Fri, 6 Jul 2018 06:53:07 +0000 (+0100) Subject: drm/i915/selftests: Destroy partial tiling vma after use X-Git-Tag: v5.15~6763^2~28^2~985 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e5d2435bfaeee3f4045e03441d3902c63254b618;p=platform%2Fkernel%2Flinux-starfive.git drm/i915/selftests: Destroy partial tiling vma after use As we keep VMA around until the object is destroyed, when testing partial tiling we instantiate many, many VMA (as the object is huge allowing for many different partial regions). We test elsewhere our handling of populating large objects with a full set of VMA and checking we can retrieve them afterwards, but in this test we incur the cost of flushing all VMA after every GTT write, dramatically slowing down the test. References: https://bugs.freedesktop.org/show_bug.cgi?id=107130 Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20180706065332.15214-2-chris@chris-wilson.co.uk --- diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_object.c b/drivers/gpu/drm/i915/selftests/i915_gem_object.c index 88515326..232e5cc 100644 --- a/drivers/gpu/drm/i915/selftests/i915_gem_object.c +++ b/drivers/gpu/drm/i915/selftests/i915_gem_object.c @@ -288,6 +288,8 @@ static int check_partial_mapping(struct drm_i915_gem_object *obj, kunmap(p); if (err) return err; + + i915_vma_destroy(vma); } return 0;