3 * (C) COPYRIGHT 2014-2015 ARM Limited. All rights reserved.
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
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.
20 * Register-based HW access backend specific job scheduler APIs
23 #ifndef _KBASE_JS_BACKEND_H_
24 #define _KBASE_JS_BACKEND_H_
27 * kbase_backend_timer_init() - Initialise the JS scheduling timer
28 * @kbdev: Device pointer
30 * This function should be called at driver initialisation
32 * Return: 0 on success
34 int kbase_backend_timer_init(struct kbase_device *kbdev);
37 * kbase_backend_timer_term() - Terminate the JS scheduling timer
38 * @kbdev: Device pointer
40 * This function should be called at driver termination
42 void kbase_backend_timer_term(struct kbase_device *kbdev);
45 * kbase_backend_timer_suspend - Suspend is happening, stop the JS scheduling
47 * @kbdev: Device pointer
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.
53 * Caller must hold runpool_mutex.
55 void kbase_backend_timer_suspend(struct kbase_device *kbdev);
58 * kbase_backend_timer_resume - Resume is happening, re-evaluate the JS
60 * @kbdev: Device pointer
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.
65 * Caller must hold runpool_mutex.
67 void kbase_backend_timer_resume(struct kbase_device *kbdev);
69 #endif /* _KBASE_JS_BACKEND_H_ */