mali400: fix rk3036 init
author黄涛 <huangtao@rock-chips.com>
Sat, 12 Jul 2014 07:31:54 +0000 (15:31 +0800)
committer黄涛 <huangtao@rock-chips.com>
Sat, 12 Jul 2014 07:32:34 +0000 (15:32 +0800)
rk3036 don't support power manager

drivers/gpu/arm/mali400/mali/platform/rk30/mali_platform.c
drivers/gpu/arm/mali400/mali/platform/rk30/rk3066.c [changed mode: 0755->0644]

index 01526098ec91c0abdbc8ae4e7fa022d95982c19c..55744321735511b59280ea32e62f86c742d1388c 100755 (executable)
@@ -31,6 +31,7 @@
 #include <linux/module.h>
 #include <linux/cpufreq.h>
 
+#include <linux/rockchip/cpu.h>
 #include <linux/rockchip/dvfs.h>
 
 /*author@xxm*/
@@ -409,6 +410,9 @@ static struct early_suspend mali_dev_early_suspend = {
 
 _mali_osk_errcode_t mali_platform_init(void)
 {
+       if (cpu_is_rk3036())
+               MALI_SUCCESS;
+
        MALI_CHECK(init_mali_clock(), _MALI_OSK_ERR_FAULT);
        
        clockSetlock = _mali_osk_mutex_init(_MALI_OSK_LOCKFLAG_ORDERED,_MALI_OSK_LOCK_ORDER_UTILIZATION);
@@ -439,6 +443,9 @@ _mali_osk_errcode_t mali_platform_init(void)
 
 _mali_osk_errcode_t mali_platform_deinit(void)
 {
+       if (cpu_is_rk3036())
+               MALI_SUCCESS;
+
        deinit_mali_clock();
        _mali_osk_mutex_term(clockSetlock);
 
@@ -446,6 +453,9 @@ _mali_osk_errcode_t mali_platform_deinit(void)
 }
 _mali_osk_errcode_t mali_power_domain_control(u32 bpower_off)
 {
+       if (cpu_is_rk3036())
+               MALI_SUCCESS;
+
        if (!bpower_off)
        {
                if(!gpu_power_state)
@@ -497,6 +507,9 @@ _mali_osk_errcode_t mali_platform_power_mode_change(mali_power_mode power_mode)
 
 void mali_gpu_utilization_handler(struct mali_gpu_utilization_data *data)
 {
+       if (cpu_is_rk3036())
+               return;
+
        if(data->utilization_pp > 256)
                return;
        utilization_global = data->utilization_pp;
old mode 100755 (executable)
new mode 100644 (file)
index 3f09767..6a1a422
@@ -23,6 +23,8 @@
 
 #include <linux/workqueue.h>
 #include <linux/dma-mapping.h>
+#include <linux/rockchip/cpu.h>
+
 static int num_cores_total;
 static int num_cores_enabled;
 static void mali_platform_device_release(struct device *device);
@@ -71,6 +73,8 @@ static struct mali_gpu_device_data mali_gpu_data =
 };
 static void mali_platform_device_add_config(struct platform_device *pdev)
 {
+       if (cpu_is_rk3036())
+               mali_gpu_device_device_type.pm = NULL;
        pdev->dev.id = 0;
        pdev->dev.release = mali_platform_device_release;
        pdev->dev.type = &mali_gpu_device_device_type;