2 * Copyright (C) 2013, 2016 ARM Limited. All rights reserved.
4 * This program is free software and is provided to you under the terms of the GNU General Public License version 2
5 * as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence.
7 * A copy of the licence is included with the program, and can also be obtained from Free Software
8 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
12 * @file mali_timeline_sync_fence.h
14 * This file contains code related to creating sync fences from timeline fences.
17 #ifndef __MALI_TIMELINE_SYNC_FENCE_H__
18 #define __MALI_TIMELINE_SYNC_FENCE_H__
20 #include "mali_timeline.h"
22 #if defined(CONFIG_SYNC)
27 struct mali_timeline_sync_fence_tracker {
28 struct mali_sync_flag *flag; /**< Sync flag used to connect tracker and sync fence. */
29 struct mali_timeline_tracker tracker; /**< Timeline tracker. */
33 * Create a sync fence that will be signaled when @ref fence is signaled.
35 * @param system Timeline system.
36 * @param fence Fence to create sync fence from.
37 * @return File descriptor for new sync fence, or -1 on error.
39 s32 mali_timeline_sync_fence_create(struct mali_timeline_system *system, struct mali_timeline_fence *fence);
42 * Used by the Timeline system to activate a sync fence tracker.
44 * @param sync_fence_tracker Sync fence tracker.
47 void mali_timeline_sync_fence_activate(struct mali_timeline_sync_fence_tracker *sync_fence_tracker);
49 #endif /* defined(CONFIG_SYNC) */
51 #endif /* __MALI_TIMELINE_SYNC_FENCE_H__ */