123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- /*
- * This confidential and proprietary software may be used only as
- * authorised by a licensing agreement from ARM Limited
- * (C) COPYRIGHT 2012-2013 ARM Limited
- * ALL RIGHTS RESERVED
- * The entire notice above must be reproduced on all authorised
- * copies and copies may only be made to the extent permitted
- * by a licensing agreement from ARM Limited.
- */
- #ifndef __MALI_SCHEDULER_H__
- #define __MALI_SCHEDULER_H__
- #include "mali_osk.h"
- #include "mali_scheduler_types.h"
- #include "mali_gp_scheduler.h"
- #include "mali_pp_scheduler.h"
- _mali_osk_errcode_t mali_scheduler_initialize(void);
- void mali_scheduler_terminate(void);
- u32 mali_scheduler_get_new_id(void);
- u32 mali_scheduler_get_new_cache_order(void);
- /**
- * @brief Reset all groups
- *
- * This function resets all groups known by the both the PP and GP scheuduler.
- * This must be called after the Mali HW has been powered on in order to reset
- * the HW.
- */
- MALI_STATIC_INLINE void mali_scheduler_reset_all_groups(void)
- {
- mali_gp_scheduler_reset_all_groups();
- mali_pp_scheduler_reset_all_groups();
- }
- /**
- * @brief Zap TLB on all active groups running \a session
- *
- * @param session Pointer to the session to zap
- */
- MALI_STATIC_INLINE void mali_scheduler_zap_all_active(struct mali_session_data *session)
- {
- mali_gp_scheduler_zap_all_active(session);
- mali_pp_scheduler_zap_all_active(session);
- }
- /**
- * Check if bit is set in scheduler mask.
- *
- * @param mask Scheduler mask to check.
- * @param bit Bit to check.
- * @return MALI_TRUE if bit is set in scheduler mask, MALI_FALSE if not.
- */
- MALI_STATIC_INLINE mali_bool mali_scheduler_mask_is_set(mali_scheduler_mask mask, mali_scheduler_mask bit)
- {
- return MALI_SCHEDULER_MASK_EMPTY != (bit & mask);
- }
- /**
- * Schedule GP and PP according to bitmask.
- *
- * @param mask A scheduling bitmask.
- * @param deferred_schedule MALI_TRUE if schedule should be deferred, MALI_FALSE if not.
- */
- void mali_scheduler_schedule_from_mask(mali_scheduler_mask mask, mali_bool deferred_schedule);
- /* Enable or disable scheduler hint. */
- extern mali_bool mali_scheduler_hints[MALI_SCHEDULER_HINT_MAX];
- MALI_STATIC_INLINE void mali_scheduler_hint_enable(mali_scheduler_hint hint)
- {
- MALI_DEBUG_ASSERT(hint < MALI_SCHEDULER_HINT_MAX);
- mali_scheduler_hints[hint] = MALI_TRUE;
- }
- MALI_STATIC_INLINE void mali_scheduler_hint_disable(mali_scheduler_hint hint)
- {
- MALI_DEBUG_ASSERT(hint < MALI_SCHEDULER_HINT_MAX);
- mali_scheduler_hints[hint] = MALI_FALSE;
- }
- MALI_STATIC_INLINE mali_bool mali_scheduler_hint_is_enabled(mali_scheduler_hint hint)
- {
- MALI_DEBUG_ASSERT(hint < MALI_SCHEDULER_HINT_MAX);
- return mali_scheduler_hints[hint];
- }
- #endif /* __MALI_SCHEDULER_H__ */
|