MALI: utgard: upgrade DDK to r6p1-01rel0
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / arm / mali400 / mali / common / mali_timeline_sync_fence.h
1 /*
2  * Copyright (C) 2013, 2016 ARM Limited. All rights reserved.
3  * 
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.
6  * 
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.
9  */
10
11 /**
12  * @file mali_timeline_sync_fence.h
13  *
14  * This file contains code related to creating sync fences from timeline fences.
15  */
16
17 #ifndef __MALI_TIMELINE_SYNC_FENCE_H__
18 #define __MALI_TIMELINE_SYNC_FENCE_H__
19
20 #include "mali_timeline.h"
21
22 #if defined(CONFIG_SYNC)
23
24 /**
25  * Sync fence tracker.
26  */
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. */
30 };
31
32 /**
33  * Create a sync fence that will be signaled when @ref fence is signaled.
34  *
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.
38  */
39 s32 mali_timeline_sync_fence_create(struct mali_timeline_system *system, struct mali_timeline_fence *fence);
40
41 /**
42  * Used by the Timeline system to activate a sync fence tracker.
43  *
44  * @param sync_fence_tracker Sync fence tracker.
45  *
46  */
47 void mali_timeline_sync_fence_activate(struct mali_timeline_sync_fence_tracker *sync_fence_tracker);
48
49 #endif /* defined(CONFIG_SYNC) */
50
51 #endif /* __MALI_TIMELINE_SYNC_FENCE_H__ */