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