mock_engine.h (742B)
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 15struct 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 23struct intel_engine_cs *mock_engine(struct drm_i915_private *i915, 24 const char *name, 25 int id); 26int mock_engine_init(struct intel_engine_cs *engine); 27 28void mock_engine_flush(struct intel_engine_cs *engine); 29void mock_engine_reset(struct intel_engine_cs *engine); 30void mock_engine_free(struct intel_engine_cs *engine); 31 32#endif /* !__MOCK_ENGINE_H__ */