int gpu_notifier_init(struct kbase_device *kbdev)
{
	struct exynos_context *platform = (struct exynos_context *)kbdev->platform_context;
	if (!platform)
		return -ENODEV;

	platform->voltage_margin = 0;
#if defined(CONFIG_EXYNOS_THERMAL) && defined(CONFIG_GPU_THERMAL)
	exynos_gpu_add_notifier(&gpu_tmu_nb);
#endif /* CONFIG_EXYNOS_THERMAL */

#ifdef CONFIG_MALI_RT_PM
	if (register_pm_notifier(&gpu_pm_nb))
		return -1;
#endif /* CONFIG_MALI_RT_PM */

#ifdef CONFIG_EXYNOS_BUSMONITOR
	busmon_notifier_chain_register(&gpu_noc_nb);
#endif
	pm_runtime_enable(kbdev->dev);

	platform->power_status = true;

	return 0;
}
Exemplo n.º 2
0
int gpu_notifier_init(struct kbase_device *kbdev)
{
	struct exynos_context *platform = (struct exynos_context *)kbdev->platform_context;
	if (!platform)
		return -ENODEV;

	platform->voltage_margin = 0;
#ifdef CONFIG_EXYNOS_THERMAL
	exynos_gpu_add_notifier(&gpu_tmu_nb);
#endif /* CONFIG_EXYNOS_THERMAL */

#ifdef CONFIG_MALI_RT_PM
	if (register_pm_notifier(&gpu_pm_nb))
		return -1;
#endif /* CONFIG_MALI_RT_PM */

#ifdef CONFIG_CPU_IDLE
	if (register_pm_notifier(&gpu_lpc_nb))
		return -1;
#endif /* CONFIG_CPU_IDLE */

	pm_runtime_enable(kbdev->dev);

	return 0;
}
int gpu_notifier_init(struct kbase_device *kbdev)
{
	struct exynos_context *platform = (struct exynos_context *)kbdev->platform_context;
	if (!platform)
		return -ENODEV;

	platform->voltage_margin = 0;
#if defined(CONFIG_EXYNOS_THERMAL)
	exynos_gpu_add_notifier(&gpu_tmu_nb);
	platform->tmu_status = true;
#else /* CONFIG_EXYNOS_THERMAL */
	platform->tmu_status = false;
#endif /* CONFIG_EXYNOS_THERMAL */

#ifdef CONFIG_MALI_MIDGARD_RT_PM
	if (register_pm_notifier(&gpu_pm_nb))
		return MALI_FALSE;
#endif /* CONFIG_MALI_MIDGARD_RT_PM */

	pm_runtime_enable(kbdev->dev);

	pm_qos_add_notifier(PM_QOS_GPU_FREQ_MIN, &exynos_gpu_min_qos_notifier);
	pm_qos_add_notifier(PM_QOS_GPU_FREQ_MAX, &exynos_gpu_max_qos_notifier);

	return MALI_TRUE;
}