From cfd6976f4d4dba9b75f6e9141cd7522062a6a31b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 15 Feb 2020 20:59:27 +0000 Subject: [PATCH] drm/i915/selftests: Mark the mock ring->vma as being in the GGTT The ringbuffer's vma is expected to be in the GGTT and that is now being checked, so make sure the mocked ring declares it so. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200215205927.4170144-1-chris@chris-wilson.co.uk --- drivers/gpu/drm/i915/gt/mock_engine.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/mock_engine.c b/drivers/gpu/drm/i915/gt/mock_engine.c index f2806381733f5..5633515c12e96 100644 --- a/drivers/gpu/drm/i915/gt/mock_engine.c +++ b/drivers/gpu/drm/i915/gt/mock_engine.c @@ -65,6 +65,9 @@ static struct intel_ring *mock_ring(struct intel_engine_cs *engine) return NULL; } i915_active_init(&ring->vma->active, NULL, NULL); + __set_bit(I915_VMA_GGTT_BIT, __i915_vma_flags(ring->vma)); + __set_bit(DRM_MM_NODE_ALLOCATED_BIT, &ring->vma->node.flags); + ring->vma->node.size = sz; intel_ring_update_space(ring); -- 2.39.5