ARM64: DTS: Add rk3399-firefly uart4 device, node as /dev/ttyS1
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / arm / midgard / backend / gpu / mali_kbase_js_internal.h
1 /*
2  *
3  * (C) COPYRIGHT 2014-2015 ARM Limited. All rights reserved.
4  *
5  * This program is free software and is provided to you under the terms of the
6  * GNU General Public License version 2 as published by the Free Software
7  * Foundation, and any use by you of this program is subject to the terms
8  * of such GNU licence.
9  *
10  * A copy of the licence is included with the program, and can also be obtained
11  * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
12  * Boston, MA  02110-1301, USA.
13  *
14  */
15
16
17
18
19 /*
20  * Register-based HW access backend specific job scheduler APIs
21  */
22
23 #ifndef _KBASE_JS_BACKEND_H_
24 #define _KBASE_JS_BACKEND_H_
25
26 /**
27  * kbase_backend_timer_init() - Initialise the JS scheduling timer
28  * @kbdev:      Device pointer
29  *
30  * This function should be called at driver initialisation
31  *
32  * Return: 0 on success
33  */
34 int kbase_backend_timer_init(struct kbase_device *kbdev);
35
36 /**
37  * kbase_backend_timer_term() - Terminate the JS scheduling timer
38  * @kbdev:      Device pointer
39  *
40  * This function should be called at driver termination
41  */
42 void kbase_backend_timer_term(struct kbase_device *kbdev);
43
44 /**
45  * kbase_backend_timer_suspend - Suspend is happening, stop the JS scheduling
46  *                               timer
47  * @kbdev: Device pointer
48  *
49  * This function should be called on suspend, after the active count has reached
50  * zero. This is required as the timer may have been started on job submission
51  * to the job scheduler, but before jobs are submitted to the GPU.
52  *
53  * Caller must hold runpool_mutex.
54  */
55 void kbase_backend_timer_suspend(struct kbase_device *kbdev);
56
57 /**
58  * kbase_backend_timer_resume - Resume is happening, re-evaluate the JS
59  *                              scheduling timer
60  * @kbdev: Device pointer
61  *
62  * This function should be called on resume. Note that is is not guaranteed to
63  * re-start the timer, only evalute whether it should be re-started.
64  *
65  * Caller must hold runpool_mutex.
66  */
67 void kbase_backend_timer_resume(struct kbase_device *kbdev);
68
69 #endif /* _KBASE_JS_BACKEND_H_ */