drm/i915: Drop the CONTEXT_CLONE API (v2)
[linux-2.6-microblaze.git] / drivers / gpu / drm / i915 / gt / mock_engine.h
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2016 Intel Corporation
4  */
5
6 #ifndef __MOCK_ENGINE_H__
7 #define __MOCK_ENGINE_H__
8
9 #include <linux/list.h>
10 #include <linux/spinlock.h>
11 #include <linux/timer.h>
12
13 #include "gt/intel_engine.h"
14
15 struct mock_engine {
16         struct intel_engine_cs base;
17
18         spinlock_t hw_lock;
19         struct list_head hw_queue;
20         struct timer_list hw_delay;
21 };
22
23 struct intel_engine_cs *mock_engine(struct drm_i915_private *i915,
24                                     const char *name,
25                                     int id);
26 int mock_engine_init(struct intel_engine_cs *engine);
27
28 void mock_engine_flush(struct intel_engine_cs *engine);
29 void mock_engine_reset(struct intel_engine_cs *engine);
30 void mock_engine_free(struct intel_engine_cs *engine);
31
32 #endif /* !__MOCK_ENGINE_H__ */