mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 01:57:06 +07:00
de220cc219
The timeline is strictly ordered, so by inserting the timeline->barrier request into the timeline->last_request it naturally provides the same barrier. Consolidate the pair of barriers into one as they serve the same purpose. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190408091728.20207-4-chris@chris-wilson.co.uk
31 lines
602 B
C
31 lines
602 B
C
/*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
* Copyright © 2017-2018 Intel Corporation
|
|
*/
|
|
|
|
#include "../i915_timeline.h"
|
|
|
|
#include "mock_timeline.h"
|
|
|
|
void mock_timeline_init(struct i915_timeline *timeline, u64 context)
|
|
{
|
|
timeline->i915 = NULL;
|
|
timeline->fence_context = context;
|
|
|
|
spin_lock_init(&timeline->lock);
|
|
mutex_init(&timeline->mutex);
|
|
|
|
INIT_ACTIVE_REQUEST(&timeline->last_request);
|
|
INIT_LIST_HEAD(&timeline->requests);
|
|
|
|
i915_syncmap_init(&timeline->sync);
|
|
|
|
INIT_LIST_HEAD(&timeline->link);
|
|
}
|
|
|
|
void mock_timeline_fini(struct i915_timeline *timeline)
|
|
{
|
|
i915_syncmap_free(&timeline->sync);
|
|
}
|