aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/samsung/mali/platform/orion-m400
diff options
context:
space:
mode:
authorJustin <justin.a.rogers@gmail.com>2013-03-25 18:06:02 -0500
committercodeworkx <codeworkx@cyanogenmod.org>2013-03-26 10:53:49 +0000
commit88234890ea8fd8f60101c0b9690f1ea756cc3c5b (patch)
tree8693cc089c9608442a871037d2a576f4dd104660 /drivers/media/video/samsung/mali/platform/orion-m400
parentcba07183cc76b06a5ef2b20eef70d203dc5bcd5d (diff)
downloadkernel_samsung_smdk4412-88234890ea8fd8f60101c0b9690f1ea756cc3c5b.zip
kernel_samsung_smdk4412-88234890ea8fd8f60101c0b9690f1ea756cc3c5b.tar.gz
kernel_samsung_smdk4412-88234890ea8fd8f60101c0b9690f1ea756cc3c5b.tar.bz2
smdk4412: mali: merge with r3p1 driver from note8
Change-Id: I75db69081b986ec326fe347f73aa3655648e6b81
Diffstat (limited to 'drivers/media/video/samsung/mali/platform/orion-m400')
-rw-r--r--drivers/media/video/samsung/mali/platform/orion-m400/mali_platform.c46
1 files changed, 22 insertions, 24 deletions
diff --git a/drivers/media/video/samsung/mali/platform/orion-m400/mali_platform.c b/drivers/media/video/samsung/mali/platform/orion-m400/mali_platform.c
index 792b9a9..119831d 100644
--- a/drivers/media/video/samsung/mali/platform/orion-m400/mali_platform.c
+++ b/drivers/media/video/samsung/mali/platform/orion-m400/mali_platform.c
@@ -1,9 +1,9 @@
/*
* Copyright (C) 2010-2012 ARM Limited. All rights reserved.
- *
+ *
* This program is free software and is provided to you under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence.
- *
+ *
* A copy of the licence is included with the program, and can also be obtained from Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@@ -19,7 +19,7 @@
#include "mali_linux_pm.h"
#if USING_MALI_PMM
-#include "mali_pmm.h"
+#include "mali_pm.h"
#endif
#include <linux/clk.h>
@@ -156,7 +156,7 @@ void mali_regulator_set_voltage(int min_uV, int max_uV)
return;
}
MALI_DEBUG_PRINT(2, ("= regulator_set_voltage: %d, %d \n",min_uV, max_uV));
-
+
#if MALI_TIMELINE_PROFILING_ENABLED
_mali_profiling_add_event( MALI_PROFILING_EVENT_TYPE_SINGLE |
MALI_PROFILING_EVENT_CHANNEL_SOFTWARE |
@@ -166,7 +166,7 @@ void mali_regulator_set_voltage(int min_uV, int max_uV)
regulator_set_voltage(g3d_regulator,min_uV,max_uV);
voltage = regulator_get_voltage(g3d_regulator);
-
+
#if MALI_TIMELINE_PROFILING_ENABLED
_mali_profiling_add_event( MALI_PROFILING_EVENT_TYPE_SINGLE |
MALI_PROFILING_EVENT_CHANNEL_SOFTWARE |
@@ -178,7 +178,7 @@ void mali_regulator_set_voltage(int min_uV, int max_uV)
_mali_osk_lock_signal(mali_dvfs_lock, _MALI_OSK_LOCKMODE_RW);
}
-#endif
+#endif
unsigned long mali_clk_get_rate(void)
{
@@ -228,7 +228,7 @@ mali_bool mali_clk_get(mali_bool bis_vpll)
if (mali_parent_clock == NULL)
{
mali_parent_clock = clk_get(NULL, GPUMOUT1CLK_NAME);
-
+
if (IS_ERR(mali_parent_clock)) {
MALI_PRINT( ( "MALI Error : failed to get source mali parent clock\n"));
return MALI_FALSE;
@@ -279,7 +279,7 @@ void mali_clk_put(mali_bool binc_mali_clock)
clk_put(mali_parent_clock);
mali_parent_clock = 0;
}
-
+
if (mpll_clock)
{
clk_put(mpll_clock);
@@ -303,7 +303,7 @@ void mali_clk_put(mali_bool binc_mali_clock)
clk_put(vpll_src_clock);
vpll_src_clock = 0;
}
-
+
if (ext_xtal_clock)
{
clk_put(ext_xtal_clock);
@@ -382,14 +382,14 @@ mali_bool mali_clk_set_rate(unsigned int clk, unsigned int mhz)
mali_clk_put(MALI_FALSE);
_mali_osk_lock_signal(mali_dvfs_lock, _MALI_OSK_LOCKMODE_RW);
-
+
return MALI_TRUE;
}
static mali_bool init_mali_clock(void)
{
mali_bool ret = MALI_TRUE;
-
+
gpu_power_state = 0;
if (mali_clock != 0)
@@ -416,7 +416,7 @@ static mali_bool init_mali_clock(void)
g3d_regulator = regulator_get(NULL, "vdd_g3d");
#endif
- if (IS_ERR(g3d_regulator))
+ if (IS_ERR(g3d_regulator))
{
MALI_PRINT( ("MALI Error : failed to get vdd_g3d\n"));
ret = MALI_FALSE;
@@ -429,8 +429,6 @@ static mali_bool init_mali_clock(void)
#endif
MALI_DEBUG_PRINT(2, ("MALI Clock is set at mali driver\n"));
-
-
MALI_DEBUG_PRINT(3,("::clk_put:: %s mali_parent_clock - normal\n", __FUNCTION__));
MALI_DEBUG_PRINT(3,("::clk_put:: %s mpll_clock - normal\n", __FUNCTION__));
@@ -443,7 +441,7 @@ static mali_bool init_mali_clock(void)
err_regulator:
regulator_put(g3d_regulator);
#endif
-
+
err_clock_get:
mali_clk_put(MALI_TRUE);
@@ -456,7 +454,7 @@ static mali_bool deinit_mali_clock(void)
return MALI_TRUE;
#ifdef CONFIG_REGULATOR
- if (g3d_regulator)
+ if (g3d_regulator)
{
regulator_put(g3d_regulator);
g3d_regulator=NULL;
@@ -506,8 +504,8 @@ _mali_osk_errcode_t g3d_power_domain_control(int bpower_on)
if (bpower_on)
{
#if MALI_PMM_RUNTIME_JOB_CONTROL_ON
- MALI_DEBUG_PRINT(3,("_mali_osk_pmm_dev_activate \n"));
- _mali_osk_pmm_dev_activate();
+ MALI_DEBUG_PRINT(3,("_mali_osk_pm_dev_activate \n"));
+ _mali_osk_pm_dev_activate();
#else //MALI_PMM_RUNTIME_JOB_CONTROL_ON
void __iomem *status;
u32 timeout;
@@ -529,14 +527,14 @@ _mali_osk_errcode_t g3d_power_domain_control(int bpower_on)
else
{
#if MALI_PMM_RUNTIME_JOB_CONTROL_ON
- MALI_DEBUG_PRINT( 4,("_mali_osk_pmm_dev_idle\n"));
- _mali_osk_pmm_dev_idle();
+ MALI_DEBUG_PRINT( 4,("_mali_osk_pm_dev_idle\n"));
+ _mali_osk_pm_dev_idle();
#else //MALI_PMM_RUNTIME_JOB_CONTROL_ON
void __iomem *status;
u32 timeout;
__raw_writel(0, S5P_PMU_G3D_CONF);
-
+
status = S5P_PMU_G3D_CONF + 0x4;
/* Wait max 1ms */
timeout = 10;
@@ -561,7 +559,7 @@ _mali_osk_errcode_t mali_platform_init()
#if MALI_DVFS_ENABLED
if (!clk_register_map) clk_register_map = _mali_osk_mem_mapioregion( CLK_DIV_STAT_G3D, 0x20, CLK_DESC );
if(!init_mali_dvfs_status(MALI_DVFS_DEFAULT_STEP))
- MALI_DEBUG_PRINT(1, ("mali_platform_init failed\n"));
+ MALI_DEBUG_PRINT(1, ("mali_platform_init failed\n"));
#endif
MALI_SUCCESS;
@@ -593,7 +591,7 @@ _mali_osk_errcode_t mali_platform_powerdown(u32 cores)
if (gpu_power_state == 0)
{
MALI_DEBUG_PRINT( 3,("disable clock\n"));
- disable_mali_clocks();
+ disable_mali_clocks();
}
}
else
@@ -635,7 +633,7 @@ _mali_osk_errcode_t mali_platform_powerup(u32 cores)
void mali_gpu_utilization_handler(u32 utilization)
{
- if (bPoweroff==0)
+ if (bPoweroff==0)
{
#if MALI_DVFS_ENABLED
if(!mali_dvfs_handler(utilization))