void mali_memory_session_end(struct mali_session_data *session)
{
	MALI_DEBUG_PRINT(3, ("MMU session end\n"));

	if (NULL == session) {
		MALI_DEBUG_PRINT(1, ("No session data found during session end\n"));
		return;
	}

	/* Lock the session so we can modify the memory list */
	_mali_osk_mutex_wait(session->memory_lock);

	/* Free all allocations still in the descriptor map, and terminate the map */
	if (NULL != session->descriptor_mapping) {
		mali_descriptor_mapping_call_for_each(session->descriptor_mapping, descriptor_table_cleanup_callback);
		mali_descriptor_mapping_destroy(session->descriptor_mapping);
		session->descriptor_mapping = NULL;
	}

	_mali_osk_mutex_signal(session->memory_lock);

	/* Free the lock */
	_mali_osk_mutex_term(session->memory_lock);

	return;
}
_mali_osk_errcode_t mali_platform_deinit(struct platform_device *pdev)
{
	struct device *dev = &pdev->dev;
	struct mali_platform_drv_data *drv_data = dev_get_drvdata(dev);

	mali_core_scaling_term();
	mali_clock_term(dev);
	_mali_osk_mutex_term(drv_data->clockSetlock);

	return 0;
}
Exemple #3
0
void _mali_osk_pm_dev_disable(void)
{
#if MALI_LICENSE_IS_GPL
    if (mali_pm_wq)
    {
        flush_workqueue(mali_pm_wq);
        destroy_workqueue(mali_pm_wq);
        mali_pm_wq = NULL;
    }
#else
    flush_scheduled_work();
#endif
	_mali_osk_atomic_term(&mali_pm_ref_count);
	_mali_osk_atomic_term(&mali_suspend_called);
	_mali_osk_timer_term(pm_timer);
	_mali_osk_mutex_term(pm_lock);
}
void mali_pm_terminate(void)
{
	if (NULL != pm_work) {
		_mali_osk_wq_delete_work(pm_work);
		pm_work = NULL;
	}

	mali_pm_domain_terminate();

	if (NULL != pm_lock_exec) {
		_mali_osk_mutex_term(pm_lock_exec);
		pm_lock_exec = NULL;
	}

	if (NULL != pm_lock_state) {
		_mali_osk_spinlock_irq_term(pm_lock_state);
		pm_lock_state = NULL;
	}
}
void _mali_internal_profiling_term(void)
{
	u32 count;

	/* Ensure profiling is stopped */
	_mali_internal_profiling_stop(&count);

	prof_state = MALI_PROFILING_STATE_UNINITIALIZED;

	if (NULL != profile_entries) {
		_mali_osk_vfree(profile_entries);
		profile_entries = NULL;
	}

	if (NULL != lock) {
		_mali_osk_mutex_term(lock);
		lock = NULL;
	}
}
void MTK_mali_osk_pm_dev_disable(void)
{
    if (mtk_mali_pm_wq)
    {
        flush_workqueue(mtk_mali_pm_wq);
        destroy_workqueue(mtk_mali_pm_wq);
        mtk_mali_pm_wq = NULL;
    }
    
    if (mtk_mali_pm_wq2)
    {
        flush_workqueue(mtk_mali_pm_wq2);
        destroy_workqueue(mtk_mali_pm_wq2);
        mtk_mali_pm_wq2 = NULL;
    }

	_mali_osk_atomic_term(&mtk_mali_pm_ref_count);
	_mali_osk_atomic_term(&mtk_mali_suspend_called);
	_mali_osk_mutex_term(mtk_pm_lock);
}