1 /*
2 * Copyright (C) 2012-2014, 2016-2017 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 #ifndef __MALI_BROADCAST_H__
12 #define __MALI_BROADCAST_H__
13
14 /*
15 * Interface for the broadcast unit on Mali-450.
16 *
17 * - Represents up to 8 × (MMU + PP) pairs.
18 * - Supports dynamically changing which (MMU + PP) pairs receive the broadcast by
19 * setting a mask.
20 */
21
22 #include "mali_hw_core.h"
23 #include "mali_group.h"
24
25 struct mali_bcast_unit;
26
27 struct mali_bcast_unit *mali_bcast_unit_create(const _mali_osk_resource_t *resource);
28 void mali_bcast_unit_delete(struct mali_bcast_unit *bcast_unit);
29
30 /* Add a group to the list of (MMU + PP) pairs broadcasts go out to. */
31 void mali_bcast_add_group(struct mali_bcast_unit *bcast_unit, struct mali_group *group);
32
33 /* Remove a group to the list of (MMU + PP) pairs broadcasts go out to. */
34 void mali_bcast_remove_group(struct mali_bcast_unit *bcast_unit, struct mali_group *group);
35
36 /* Re-set cached mask. This needs to be called after having been suspended. */
37 void mali_bcast_reset(struct mali_bcast_unit *bcast_unit);
38
39 /**
40 * Disable broadcast unit
41 *
42 * mali_bcast_enable must be called to re-enable the unit. Cores may not be
43 * added or removed when the unit is disabled.
44 */
45 void mali_bcast_disable(struct mali_bcast_unit *bcast_unit);
46
47 /**
48 * Re-enable broadcast unit
49 *
50 * This resets the masks to include the cores present when mali_bcast_disable was called.
51 */
mali_bcast_enable(struct mali_bcast_unit * bcast_unit)52 MALI_STATIC_INLINE void mali_bcast_enable(struct mali_bcast_unit *bcast_unit)
53 {
54 mali_bcast_reset(bcast_unit);
55 }
56
57 #endif /* __MALI_BROADCAST_H__ */
58