import PULS_20160108
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / misc / mediatek / gpu / mt8127 / mali / mali / common / mali_broadcast.h
1 /*
2 * This confidential and proprietary software may be used only as
3 * authorised by a licensing agreement from ARM Limited
4 * (C) COPYRIGHT 2012-2013 ARM Limited
5 * ALL RIGHTS RESERVED
6 * The entire notice above must be reproduced on all authorised
7 * copies and copies may only be made to the extent permitted
8 * by a licensing agreement from ARM Limited.
9 */
10
11 /*
12 * Interface for the broadcast unit on Mali-450.
13 *
14 * - Represents up to 8 × (MMU + PP) pairs.
15 * - Supports dynamically changing which (MMU + PP) pairs receive the broadcast by
16 * setting a mask.
17 */
18
19 #include "mali_hw_core.h"
20 #include "mali_group.h"
21
22 struct mali_bcast_unit;
23
24 struct mali_bcast_unit *mali_bcast_unit_create(const _mali_osk_resource_t *resource);
25 void mali_bcast_unit_delete(struct mali_bcast_unit *bcast_unit);
26
27 /* Add a group to the list of (MMU + PP) pairs broadcasts go out to. */
28 void mali_bcast_add_group(struct mali_bcast_unit *bcast_unit, struct mali_group *group);
29
30 /* Remove a group to the list of (MMU + PP) pairs broadcasts go out to. */
31 void mali_bcast_remove_group(struct mali_bcast_unit *bcast_unit, struct mali_group *group);
32
33 /* Re-set cached mask. This needs to be called after having been suspended. */
34 void mali_bcast_reset(struct mali_bcast_unit *bcast_unit);
35
36 /**
37 * Disable broadcast unit
38 *
39 * mali_bcast_enable must be called to re-enable the unit. Cores may not be
40 * added or removed when the unit is disabled.
41 */
42 void mali_bcast_disable(struct mali_bcast_unit *bcast_unit);
43
44 /**
45 * Re-enable broadcast unit
46 *
47 * This resets the masks to include the cores present when mali_bcast_disable was called.
48 */
49 MALI_STATIC_INLINE void mali_bcast_enable(struct mali_bcast_unit *bcast_unit)
50 {
51 mali_bcast_reset(bcast_unit);
52 }