From bacd1f5e35cf33bcd3efb8debe38e2915bd2b04a Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Sat, 12 Jul 2014 15:31:54 +0800 Subject: [PATCH] mali400: fix rk3036 init rk3036 don't support power manager --- .../arm/mali400/mali/platform/rk30/mali_platform.c | 13 +++++++++++++ drivers/gpu/arm/mali400/mali/platform/rk30/rk3066.c | 4 ++++ 2 files changed, 17 insertions(+) mode change 100755 => 100644 drivers/gpu/arm/mali400/mali/platform/rk30/rk3066.c diff --git a/drivers/gpu/arm/mali400/mali/platform/rk30/mali_platform.c b/drivers/gpu/arm/mali400/mali/platform/rk30/mali_platform.c index 01526098ec91..557443217355 100755 --- a/drivers/gpu/arm/mali400/mali/platform/rk30/mali_platform.c +++ b/drivers/gpu/arm/mali400/mali/platform/rk30/mali_platform.c @@ -31,6 +31,7 @@ #include #include +#include #include /*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; diff --git a/drivers/gpu/arm/mali400/mali/platform/rk30/rk3066.c b/drivers/gpu/arm/mali400/mali/platform/rk30/rk3066.c old mode 100755 new mode 100644 index 3f097672d8b4..6a1a422610a3 --- a/drivers/gpu/arm/mali400/mali/platform/rk30/rk3066.c +++ b/drivers/gpu/arm/mali400/mali/platform/rk30/rk3066.c @@ -23,6 +23,8 @@ #include #include +#include + 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; -- 2.34.1