1 /* drivers/gpu/mali400/mali/platform/exynos3250/exynos3_pmm.h
3 * Copyright 2011 by S.LSI. Samsung Electronics Inc.
4 * San#24, Nongseo-Dong, Giheung-Gu, Yongin, Korea
6 * Samsung SoC Mali400 DVFS driver
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software FoundatIon.
15 * Platform specific Mali driver functions for the exynos 4XXX based platforms
18 #ifndef __EXYNOS4_PMM_H__
19 #define __EXYNOS4_PMM_H__
22 #include "mali_kernel_utilization.h"
23 #include <linux/platform_device.h>
29 /** @brief description of power change reasons
31 typedef enum mali_power_mode_tag
34 MALI_POWER_MODE_LIGHT_SLEEP,
35 MALI_POWER_MODE_DEEP_SLEEP,
38 /** @brief Platform specific setup and initialisation of MALI
40 * This is called from the entrypoint of the driver to initialize the platform
42 * @return _MALI_OSK_ERR_OK on success otherwise, a suitable _mali_osk_errcode_t error.
44 _mali_osk_errcode_t mali_platform_init(struct device *dev);
46 /** @brief Platform specific deinitialisation of MALI
48 * This is called on the exit of the driver to terminate the platform
50 * @return _MALI_OSK_ERR_OK on success otherwise, a suitable _mali_osk_errcode_t error.
52 _mali_osk_errcode_t mali_platform_deinit(struct device *dev);
54 /** @brief Platform specific powerdown sequence of MALI
56 * Call as part of platform init if there is no PMM support, else the
58 * There are three power modes defined:
59 * 1) MALI_POWER_MODE_ON
60 * 2) MALI_POWER_MODE_LIGHT_SLEEP
61 * 3) MALI_POWER_MODE_DEEP_SLEEP
62 * MALI power management module transitions to MALI_POWER_MODE_LIGHT_SLEEP mode when MALI is idle
63 * for idle timer (software timer defined in mali_pmm_policy_jobcontrol.h) duration, MALI transitions
64 * to MALI_POWER_MODE_LIGHT_SLEEP mode during timeout if there are no more jobs queued.
65 * MALI power management module transitions to MALI_POWER_MODE_DEEP_SLEEP mode when OS does system power
67 * Customer has to add power down code when MALI transitions to MALI_POWER_MODE_LIGHT_SLEEP or MALI_POWER_MODE_DEEP_SLEEP
69 * MALI_POWER_MODE_ON mode is entered when the MALI is to powered up. Some customers want to control voltage regulators during
70 * the whole system powers on/off. Customer can track in this function whether the MALI is powered up from
71 * MALI_POWER_MODE_LIGHT_SLEEP or MALI_POWER_MODE_DEEP_SLEEP mode and manage the voltage regulators as well.
72 * @param power_mode defines the power modes
73 * @return _MALI_OSK_ERR_OK on success otherwise, a suitable _mali_osk_errcode_t error.
75 _mali_osk_errcode_t mali_platform_power_mode_change(struct device *dev, mali_power_mode power_mode);
77 void mali_exynos_update_dvfs(struct mali_gpu_utilization_data *data);