1f0c02c1bSTvrtko Ursulin /* 2f0c02c1bSTvrtko Ursulin * SPDX-License-Identifier: MIT 3f0c02c1bSTvrtko Ursulin * 4f0c02c1bSTvrtko Ursulin * Copyright © 2017-2018 Intel Corporation 5f0c02c1bSTvrtko Ursulin */ 6f0c02c1bSTvrtko Ursulin 7f0c02c1bSTvrtko Ursulin #include "../intel_timeline.h" 8f0c02c1bSTvrtko Ursulin 9f0c02c1bSTvrtko Ursulin #include "mock_timeline.h" 10f0c02c1bSTvrtko Ursulin mock_timeline_init(struct intel_timeline * timeline,u64 context)11f0c02c1bSTvrtko Ursulinvoid mock_timeline_init(struct intel_timeline *timeline, u64 context) 12f0c02c1bSTvrtko Ursulin { 13f0c02c1bSTvrtko Ursulin timeline->gt = NULL; 14f0c02c1bSTvrtko Ursulin timeline->fence_context = context; 15f0c02c1bSTvrtko Ursulin 16f0c02c1bSTvrtko Ursulin mutex_init(&timeline->mutex); 17f0c02c1bSTvrtko Ursulin 18df9f85d8SChris Wilson INIT_ACTIVE_FENCE(&timeline->last_request); 19f0c02c1bSTvrtko Ursulin INIT_LIST_HEAD(&timeline->requests); 20f0c02c1bSTvrtko Ursulin 21f0c02c1bSTvrtko Ursulin i915_syncmap_init(&timeline->sync); 22f0c02c1bSTvrtko Ursulin 23f0c02c1bSTvrtko Ursulin INIT_LIST_HEAD(&timeline->link); 24f0c02c1bSTvrtko Ursulin } 25f0c02c1bSTvrtko Ursulin mock_timeline_fini(struct intel_timeline * timeline)26f0c02c1bSTvrtko Ursulinvoid mock_timeline_fini(struct intel_timeline *timeline) 27f0c02c1bSTvrtko Ursulin { 28f0c02c1bSTvrtko Ursulin i915_syncmap_free(&timeline->sync); 29f0c02c1bSTvrtko Ursulin } 30