mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-05 02:25:25 +07:00
422d7df4f0
To continue the onslaught of removing the assumption of a global execution ordering, another casualty is the engine->timeline. Without an actual timeline to track, it is overkill and we can replace it with a much less grand plain list. We still need a list of requests inflight, for the simple purpose of finding inflight requests (for retiring, resetting, preemption etc). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190614164606.15633-3-chris@chris-wilson.co.uk
30 lines
568 B
C
30 lines
568 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;
|
|
|
|
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);
|
|
}
|