xref: /openbmc/linux/drivers/gpu/drm/i915/i915_syncmap.h (revision c25141062a82ae8bddced1b3ce2b57a1c0efabe0)
1*47979480SChris Wilson /*
2*47979480SChris Wilson  * Copyright © 2017 Intel Corporation
3*47979480SChris Wilson  *
4*47979480SChris Wilson  * Permission is hereby granted, free of charge, to any person obtaining a
5*47979480SChris Wilson  * copy of this software and associated documentation files (the "Software"),
6*47979480SChris Wilson  * to deal in the Software without restriction, including without limitation
7*47979480SChris Wilson  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8*47979480SChris Wilson  * and/or sell copies of the Software, and to permit persons to whom the
9*47979480SChris Wilson  * Software is furnished to do so, subject to the following conditions:
10*47979480SChris Wilson  *
11*47979480SChris Wilson  * The above copyright notice and this permission notice (including the next
12*47979480SChris Wilson  * paragraph) shall be included in all copies or substantial portions of the
13*47979480SChris Wilson  * Software.
14*47979480SChris Wilson  *
15*47979480SChris Wilson  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16*47979480SChris Wilson  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17*47979480SChris Wilson  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18*47979480SChris Wilson  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19*47979480SChris Wilson  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20*47979480SChris Wilson  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21*47979480SChris Wilson  * IN THE SOFTWARE.
22*47979480SChris Wilson  *
23*47979480SChris Wilson  */
24*47979480SChris Wilson 
25*47979480SChris Wilson #ifndef __I915_SYNCMAP_H__
26*47979480SChris Wilson #define __I915_SYNCMAP_H__
27*47979480SChris Wilson 
28*47979480SChris Wilson #include <linux/types.h>
29*47979480SChris Wilson 
30*47979480SChris Wilson struct i915_syncmap;
31*47979480SChris Wilson #define KSYNCMAP 16 /* radix of the tree, how many slots in each layer */
32*47979480SChris Wilson 
33*47979480SChris Wilson void i915_syncmap_init(struct i915_syncmap **root);
34*47979480SChris Wilson int i915_syncmap_set(struct i915_syncmap **root, u64 id, u32 seqno);
35*47979480SChris Wilson bool i915_syncmap_is_later(struct i915_syncmap **root, u64 id, u32 seqno);
36*47979480SChris Wilson void i915_syncmap_free(struct i915_syncmap **root);
37*47979480SChris Wilson 
38*47979480SChris Wilson #endif /* __I915_SYNCMAP_H__ */
39