xref: /OK3568_Linux_fs/kernel/drivers/gpu/arm/bifrost/csf/mali_kbase_csf_tiler_heap_reclaim.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 /*
3  *
4  * (C) COPYRIGHT 2022 ARM Limited. All rights reserved.
5  *
6  * This program is free software and is provided to you under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation, and any use by you of this program is subject to the terms
9  * of such GNU license.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, you can access it online at
18  * http://www.gnu.org/licenses/gpl-2.0.html.
19  *
20  */
21 
22 #ifndef _KBASE_CSF_TILER_HEAP_RECLAIM_H_
23 #define _KBASE_CSF_TILER_HEAP_RECLAIM_H_
24 
25 #include <mali_kbase.h>
26 
27 /**
28  * kbase_csf_tiler_heap_reclaim_sched_notify_grp_active - Notifier function for the scheduler
29  *                                                        to use when a group is put on-slot.
30  *
31  * @group: Pointer to the group object that has been placed on-slot for running.
32  *
33  */
34 void kbase_csf_tiler_heap_reclaim_sched_notify_grp_active(struct kbase_queue_group *group);
35 
36 /**
37  * kbase_csf_tiler_heap_reclaim_sched_notify_grp_evict - Notifier function for the scheduler
38  *               to use when a group is evicted out of the schedulder's scope, i.e no run of
39  *               the group is possible afterwards.
40  *
41  * @group: Pointer to the group object that has been evicted.
42  *
43  */
44 void kbase_csf_tiler_heap_reclaim_sched_notify_grp_evict(struct kbase_queue_group *group);
45 
46 /**
47  * kbase_csf_tiler_heap_reclaim_sched_notify_grp_suspend - Notifier function for the scheduler
48  *                to use when a group is suspended from running, but could resume in future.
49  *
50  * @group: Pointer to the group object that is in suspended state.
51  *
52  */
53 void kbase_csf_tiler_heap_reclaim_sched_notify_grp_suspend(struct kbase_queue_group *group);
54 
55 /**
56  * kbase_csf_tiler_heap_reclaim_ctx_init - Initializer on per context data fields for use
57  *                                         with the tiler heap reclaim manager.
58  *
59  * @kctx: Pointer to the kbase_context.
60  *
61  */
62 void kbase_csf_tiler_heap_reclaim_ctx_init(struct kbase_context *kctx);
63 
64 /**
65  * kbase_csf_tiler_heap_reclaim_mgr_init - Initializer for the tiler heap reclaim manger.
66  *
67  * @kbdev: Pointer to the device.
68  *
69  */
70 void kbase_csf_tiler_heap_reclaim_mgr_init(struct kbase_device *kbdev);
71 
72 /**
73  * kbase_csf_tiler_heap_reclaim_mgr_term - Termination call for the tiler heap reclaim manger.
74  *
75  * @kbdev: Pointer to the device.
76  *
77  */
78 void kbase_csf_tiler_heap_reclaim_mgr_term(struct kbase_device *kbdev);
79 
80 #endif
81