2017-05-03 09:39:21 +00:00
|
|
|
/*
|
2018-05-02 16:38:39 +00:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-05-03 09:39:21 +00:00
|
|
|
*
|
2018-05-02 16:38:39 +00:00
|
|
|
* Copyright © 2017-2018 Intel Corporation
|
2017-05-03 09:39:21 +00:00
|
|
|
*/
|
|
|
|
|
2019-06-21 07:08:10 +00:00
|
|
|
#include "../intel_timeline.h"
|
2018-05-02 16:38:39 +00:00
|
|
|
|
2017-05-03 09:39:21 +00:00
|
|
|
#include "mock_timeline.h"
|
|
|
|
|
2019-06-21 07:08:10 +00:00
|
|
|
void mock_timeline_init(struct intel_timeline *timeline, u64 context)
|
2017-05-03 09:39:21 +00:00
|
|
|
{
|
2019-06-21 07:08:09 +00:00
|
|
|
timeline->gt = NULL;
|
2018-05-02 16:38:39 +00:00
|
|
|
timeline->fence_context = context;
|
|
|
|
|
2019-03-01 11:05:44 +00:00
|
|
|
mutex_init(&timeline->mutex);
|
2017-05-03 09:39:21 +00:00
|
|
|
|
2019-08-16 12:10:00 +00:00
|
|
|
INIT_ACTIVE_REQUEST(&timeline->last_request, &timeline->mutex);
|
2018-05-02 16:38:39 +00:00
|
|
|
INIT_LIST_HEAD(&timeline->requests);
|
2017-05-03 09:39:21 +00:00
|
|
|
|
2018-05-02 16:38:39 +00:00
|
|
|
i915_syncmap_init(&timeline->sync);
|
2017-05-03 09:39:21 +00:00
|
|
|
|
2018-05-02 16:38:39 +00:00
|
|
|
INIT_LIST_HEAD(&timeline->link);
|
2017-05-03 09:39:21 +00:00
|
|
|
}
|
|
|
|
|
2019-06-21 07:08:10 +00:00
|
|
|
void mock_timeline_fini(struct intel_timeline *timeline)
|
2017-05-03 09:39:21 +00:00
|
|
|
{
|
2019-01-28 10:23:56 +00:00
|
|
|
i915_syncmap_free(&timeline->sync);
|
2017-05-03 09:39:21 +00:00
|
|
|
}
|