summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuan Biao <huan.biao@amlogic.com>2018-03-23 19:24:13 +0800
committerHuan Biao <huan.biao@amlogic.com>2018-03-27 21:56:34 -0800
commitd36974373f5f751bd536c6b3615d68ebd1dc6a69 (patch)
tree3e0a7f560ad9177abb4dc54baf06836a99c03f40
parentb7b76900d86c771d0eab63676d1d249e3ea6777f (diff)
downloadmali-driver-d36974373f5f751bd536c6b3615d68ebd1dc6a69.tar.gz
PD#161216: cooldev: fix k49 and k314 config change.
Change-Id: I58fddf3ea8c12b8e4589b2bd95eef2d26d9ca348 Signed-off-by: Huan Biao <huan.biao@amlogic.com>
-rw-r--r--gpu-v2.mk2
-rw-r--r--gpu.mk2
-rw-r--r--midgard/r11p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c13
-rw-r--r--midgard/r12p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c13
-rw-r--r--midgard/r13p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c13
-rw-r--r--midgard/r14p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c13
-rw-r--r--midgard/r15p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c13
-rw-r--r--midgard/r16p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c13
-rw-r--r--t83x/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c13
-rw-r--r--utgard/platform/meson_bu/platform_gx.c16
-rw-r--r--utgard/platform/meson_m450/platform_m8.c12
-rw-r--r--utgard/platform/meson_m450/platform_m8b.c9
12 files changed, 93 insertions, 39 deletions
diff --git a/gpu-v2.mk b/gpu-v2.mk
index d295ece..4a51f56 100644
--- a/gpu-v2.mk
+++ b/gpu-v2.mk
@@ -40,7 +40,7 @@ define utgard-modules
$(MAKE) -C $(shell pwd)/$(PRODUCT_OUT)/obj/KERNEL_OBJ M=$(shell pwd)/$(PRODUCT_OUT)/obj/mali \
ARCH=$(3) CROSS_COMPILE=$(PREFIX_CROSS_COMPILE) CONFIG_MALI400=m CONFIG_MALI450=m \
EXTRA_CFLAGS="-DCONFIG_MALI400=m -DCONFIG_MALI450=m" \
- CONFIG_GPU_THERMAL=y CONFIG_AM_VDEC_H264_4K2K=y modules
+ CONFIG_AM_VDEC_H264_4K2K=y modules
@echo "GPU_MODS_OUT is $(GPU_MODS_OUT)"
mkdir -p $(PRODUCT_OUT)/$(GPU_MODS_OUT)
diff --git a/gpu.mk b/gpu.mk
index 151b3d0..d6d0436 100644
--- a/gpu.mk
+++ b/gpu.mk
@@ -64,7 +64,7 @@ $(MALI_KO):
$(MAKE) -C $(shell pwd)/$(PRODUCT_OUT)/obj/KERNEL_OBJ M=$(shell pwd)/$(MALI_OUT)/ \
ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(PREFIX_CROSS_COMPILE) CONFIG_MALI400=m CONFIG_MALI450=m \
EXTRA_CFLAGS="-DCONFIG_MALI400=m -DCONFIG_MALI450=m" \
- CONFIG_GPU_THERMAL=y CONFIG_AM_VDEC_H264_4K2K=y modules
+ CONFIG_AM_VDEC_H264_4K2K=y modules
@echo "GPU_MODS_OUT is $(GPU_MODS_OUT)"
mkdir -p $(PRODUCT_OUT)/$(GPU_MODS_OUT)
diff --git a/midgard/r11p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c b/midgard/r11p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
index d16675e..b951906 100644
--- a/midgard/r11p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
+++ b/midgard/r11p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
@@ -20,11 +20,16 @@
#include <mach/io.h>
#endif
#include <asm/io.h>
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_GPU_THERMAL)
#include <linux/gpu_cooling.h>
#include <linux/gpucore_cooling.h>
#include <linux/amlogic/aml_thermal_hw.h>
#endif
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL)
+#include <linux/amlogic/gpu_cooling.h>
+#include <linux/amlogic/gpucore_cooling.h>
+#include <linux/amlogic/aml_thermal_hw.h>
+#endif
#include "mali_scaling.h"
#include "mali_clock.h"
@@ -101,7 +106,7 @@ int get_gpu_max_clk_level(void)
return mali_plat_data.cfg_clock;
}
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL) || defined(CONFIG_GPU_THERMAL)
static void set_limit_mali_freq(u32 idx)
{
if (mali_plat_data.limit_on == 0)
@@ -133,7 +138,7 @@ static u32 get_mali_utilization(void)
#endif
#endif
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL) || defined(CONFIG_GPU_THERMAL)
static u32 set_limit_pp_num(u32 num)
{
u32 ret = -1;
@@ -196,7 +201,7 @@ int mali_meson_uninit(struct platform_device* ptr_plt_dev)
void mali_post_init(void)
{
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL) || defined(CONFIG_GPU_THERMAL)
int err;
struct gpufreq_cooling_device *gcdev = NULL;
struct gpucore_cooling_device *gccdev = NULL;
diff --git a/midgard/r12p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c b/midgard/r12p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
index d16675e..30b978b 100644
--- a/midgard/r12p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
+++ b/midgard/r12p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
@@ -20,11 +20,16 @@
#include <mach/io.h>
#endif
#include <asm/io.h>
-#ifdef CONFIG_GPU_THERMAL
+#if defined (CONFIG_GPU_THERMAL)
#include <linux/gpu_cooling.h>
#include <linux/gpucore_cooling.h>
#include <linux/amlogic/aml_thermal_hw.h>
#endif
+#if defined (CONFIG_AMLOGIC_GPU_THERMAL)
+#include <linux/amlogic/gpu_cooling.h>
+#include <linux/amlogic/gpucore_cooling.h>
+#include <linux/amlogic/aml_thermal_hw.h>
+#endif
#include "mali_scaling.h"
#include "mali_clock.h"
@@ -101,7 +106,7 @@ int get_gpu_max_clk_level(void)
return mali_plat_data.cfg_clock;
}
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_GPU_THERMAL) || defined(CONFIG_AMLOGIC_GPU_THERMAL)
static void set_limit_mali_freq(u32 idx)
{
if (mali_plat_data.limit_on == 0)
@@ -133,7 +138,7 @@ static u32 get_mali_utilization(void)
#endif
#endif
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_GPU_THERMAL) || defined(CONFIG_AMLOGIC_GPU_THERMAL)
static u32 set_limit_pp_num(u32 num)
{
u32 ret = -1;
@@ -196,7 +201,7 @@ int mali_meson_uninit(struct platform_device* ptr_plt_dev)
void mali_post_init(void)
{
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_GPU_THERMAL) || defined(CONFIG_AMLOGIC_GPU_THERMAL)
int err;
struct gpufreq_cooling_device *gcdev = NULL;
struct gpucore_cooling_device *gccdev = NULL;
diff --git a/midgard/r13p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c b/midgard/r13p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
index d16675e..78380a2 100644
--- a/midgard/r13p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
+++ b/midgard/r13p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
@@ -20,11 +20,16 @@
#include <mach/io.h>
#endif
#include <asm/io.h>
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_GPU_THERMAL)
#include <linux/gpu_cooling.h>
#include <linux/gpucore_cooling.h>
#include <linux/amlogic/aml_thermal_hw.h>
#endif
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL)
+#include <linux/amlogic/gpu_cooling.h>
+#include <linux/amlogic/gpucore_cooling.h>
+#include <linux/amlogic/aml_thermal_hw.h>
+#endif
#include "mali_scaling.h"
#include "mali_clock.h"
@@ -101,7 +106,7 @@ int get_gpu_max_clk_level(void)
return mali_plat_data.cfg_clock;
}
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_GPU_THERMAL) || defined(CONFIG_AMLOGIC_GPU_THERMAL)
static void set_limit_mali_freq(u32 idx)
{
if (mali_plat_data.limit_on == 0)
@@ -133,7 +138,7 @@ static u32 get_mali_utilization(void)
#endif
#endif
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_GPU_THERMAL) || defined(CONFIG_AMLOGIC_GPU_THERMAL)
static u32 set_limit_pp_num(u32 num)
{
u32 ret = -1;
@@ -196,7 +201,7 @@ int mali_meson_uninit(struct platform_device* ptr_plt_dev)
void mali_post_init(void)
{
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_GPU_THERMAL) || defined(CONFIG_AMLOGIC_GPU_THERMAL)
int err;
struct gpufreq_cooling_device *gcdev = NULL;
struct gpucore_cooling_device *gccdev = NULL;
diff --git a/midgard/r14p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c b/midgard/r14p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
index d16675e..78380a2 100644
--- a/midgard/r14p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
+++ b/midgard/r14p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
@@ -20,11 +20,16 @@
#include <mach/io.h>
#endif
#include <asm/io.h>
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_GPU_THERMAL)
#include <linux/gpu_cooling.h>
#include <linux/gpucore_cooling.h>
#include <linux/amlogic/aml_thermal_hw.h>
#endif
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL)
+#include <linux/amlogic/gpu_cooling.h>
+#include <linux/amlogic/gpucore_cooling.h>
+#include <linux/amlogic/aml_thermal_hw.h>
+#endif
#include "mali_scaling.h"
#include "mali_clock.h"
@@ -101,7 +106,7 @@ int get_gpu_max_clk_level(void)
return mali_plat_data.cfg_clock;
}
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_GPU_THERMAL) || defined(CONFIG_AMLOGIC_GPU_THERMAL)
static void set_limit_mali_freq(u32 idx)
{
if (mali_plat_data.limit_on == 0)
@@ -133,7 +138,7 @@ static u32 get_mali_utilization(void)
#endif
#endif
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_GPU_THERMAL) || defined(CONFIG_AMLOGIC_GPU_THERMAL)
static u32 set_limit_pp_num(u32 num)
{
u32 ret = -1;
@@ -196,7 +201,7 @@ int mali_meson_uninit(struct platform_device* ptr_plt_dev)
void mali_post_init(void)
{
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_GPU_THERMAL) || defined(CONFIG_AMLOGIC_GPU_THERMAL)
int err;
struct gpufreq_cooling_device *gcdev = NULL;
struct gpucore_cooling_device *gccdev = NULL;
diff --git a/midgard/r15p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c b/midgard/r15p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
index d16675e..b951906 100644
--- a/midgard/r15p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
+++ b/midgard/r15p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
@@ -20,11 +20,16 @@
#include <mach/io.h>
#endif
#include <asm/io.h>
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_GPU_THERMAL)
#include <linux/gpu_cooling.h>
#include <linux/gpucore_cooling.h>
#include <linux/amlogic/aml_thermal_hw.h>
#endif
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL)
+#include <linux/amlogic/gpu_cooling.h>
+#include <linux/amlogic/gpucore_cooling.h>
+#include <linux/amlogic/aml_thermal_hw.h>
+#endif
#include "mali_scaling.h"
#include "mali_clock.h"
@@ -101,7 +106,7 @@ int get_gpu_max_clk_level(void)
return mali_plat_data.cfg_clock;
}
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL) || defined(CONFIG_GPU_THERMAL)
static void set_limit_mali_freq(u32 idx)
{
if (mali_plat_data.limit_on == 0)
@@ -133,7 +138,7 @@ static u32 get_mali_utilization(void)
#endif
#endif
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL) || defined(CONFIG_GPU_THERMAL)
static u32 set_limit_pp_num(u32 num)
{
u32 ret = -1;
@@ -196,7 +201,7 @@ int mali_meson_uninit(struct platform_device* ptr_plt_dev)
void mali_post_init(void)
{
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL) || defined(CONFIG_GPU_THERMAL)
int err;
struct gpufreq_cooling_device *gcdev = NULL;
struct gpucore_cooling_device *gccdev = NULL;
diff --git a/midgard/r16p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c b/midgard/r16p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
index 26a56f6..d057897 100644
--- a/midgard/r16p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
+++ b/midgard/r16p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
@@ -20,7 +20,12 @@
#include <mach/io.h>
#endif
#include <asm/io.h>
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_GPU_THERMAL)
+#include <linux/gpu_cooling.h>
+#include <linux/gpucore_cooling.h>
+#include <linux/amlogic/aml_thermal_hw.h>
+#endif
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL)
#include <linux/gpu_cooling.h>
#include <linux/gpucore_cooling.h>
#include <linux/amlogic/aml_thermal_hw.h>
@@ -100,7 +105,7 @@ int get_gpu_max_clk_level(void)
return mali_plat_data.cfg_clock;
}
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL) || defined(CONFIG_GPU_THERMAL)
static void set_limit_mali_freq(u32 idx)
{
if (mali_plat_data.limit_on == 0)
@@ -132,7 +137,7 @@ static u32 get_mali_utilization(void)
#endif
#endif
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL) || defined(CONFIG_GPU_THERMAL)
static u32 set_limit_pp_num(u32 num)
{
u32 ret = -1;
@@ -195,7 +200,7 @@ int mali_meson_uninit(struct platform_device* ptr_plt_dev)
void mali_post_init(void)
{
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL) || defined(CONFIG_GPU_THERMAL)
int err;
struct gpufreq_cooling_device *gcdev = NULL;
struct gpucore_cooling_device *gccdev = NULL;
diff --git a/t83x/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c b/t83x/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
index 26a56f6..4ffbfb0 100644
--- a/t83x/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
+++ b/t83x/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c
@@ -20,11 +20,16 @@
#include <mach/io.h>
#endif
#include <asm/io.h>
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_GPU_THERMAL)
#include <linux/gpu_cooling.h>
#include <linux/gpucore_cooling.h>
#include <linux/amlogic/aml_thermal_hw.h>
#endif
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL)
+#include <linux/amlogic/gpu_cooling.h>
+#include <linux/amlogic/gpucore_cooling.h>
+#include <linux/amlogic/aml_thermal_hw.h>
+#endif
#include "mali_scaling.h"
#include "mali_clock.h"
@@ -100,7 +105,7 @@ int get_gpu_max_clk_level(void)
return mali_plat_data.cfg_clock;
}
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_GPU_THERMAL) || defined(CONFIG_AMLOGIC_GPU_THERMAL)
static void set_limit_mali_freq(u32 idx)
{
if (mali_plat_data.limit_on == 0)
@@ -132,7 +137,7 @@ static u32 get_mali_utilization(void)
#endif
#endif
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_GPU_THERMAL) || defined(CONFIG_AMLOGIC_GPU_THERMAL)
static u32 set_limit_pp_num(u32 num)
{
u32 ret = -1;
@@ -195,7 +200,7 @@ int mali_meson_uninit(struct platform_device* ptr_plt_dev)
void mali_post_init(void)
{
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_GPU_THERMAL) || defined(CONFIG_AMLOGIC_GPU_THERMAL)
int err;
struct gpufreq_cooling_device *gcdev = NULL;
struct gpucore_cooling_device *gccdev = NULL;
diff --git a/utgard/platform/meson_bu/platform_gx.c b/utgard/platform/meson_bu/platform_gx.c
index 79f513c..2842254 100644
--- a/utgard/platform/meson_bu/platform_gx.c
+++ b/utgard/platform/meson_bu/platform_gx.c
@@ -29,6 +29,14 @@
#include <common/mali_ukk.h>
#endif
#endif
+#ifdef CONFIG_AMLOGIC_GPU_THERMAL
+#include <linux/amlogic/gpu_cooling.h>
+#include <linux/amlogic/gpucore_cooling.h>
+#ifdef CONFIG_DEVFREQ_THERMAL
+#include <linux/amlogic/aml_thermal_hw.h>
+#include <common/mali_ukk.h>
+#endif
+#endif
#include <common/mali_kernel_common.h>
#include <common/mali_osk_profiling.h>
#include <common/mali_pmu.h>
@@ -109,7 +117,7 @@ int get_gpu_max_clk_level(void)
return mali_plat_data.cfg_clock;
}
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL) || defined(CONFIG_GPU_THERMAL)
static void set_limit_mali_freq(u32 idx)
{
if (mali_plat_data.limit_on == 0)
@@ -137,7 +145,7 @@ static u32 get_mali_utilization(void)
#endif
#endif
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL) || defined(CONFIG_GPU_THERMAL)
static u32 set_limit_pp_num(u32 num)
{
u32 ret = -1;
@@ -341,7 +349,7 @@ int mali_deep_resume(struct device *device)
void mali_post_init(void)
{
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL) || defined(CONFIG_GPU_THERMAL)
int err;
struct gpufreq_cooling_device *gcdev = NULL;
struct gpucore_cooling_device *gccdev = NULL;
@@ -363,7 +371,7 @@ void mali_post_init(void)
gcdev->get_online_pp = mali_get_online_pp;
#endif
err = gpufreq_cooling_register(gcdev);
-#ifdef CONFIG_DEVFREQ_THERMAL
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL) || defined(CONFIG_GPU_THERMAL)
aml_thermal_min_update(gcdev->cool_dev);
#endif
if (err < 0)
diff --git a/utgard/platform/meson_m450/platform_m8.c b/utgard/platform/meson_m450/platform_m8.c
index 66a4e25..9eaad3e 100644
--- a/utgard/platform/meson_m450/platform_m8.c
+++ b/utgard/platform/meson_m450/platform_m8.c
@@ -21,10 +21,14 @@
#endif
#include <asm/io.h>
#include <linux/mali/mali_utgard.h>
-#ifdef CONFIG_GPU_THERMAL
+#if defined (CONFIG_GPU_THERMAL)
#include <linux/gpu_cooling.h>
#include <linux/gpucore_cooling.h>
#endif
+#if defined (CONFIG_AMLOGIC_GPU_THERMAL)
+#include <linux/amlogic/gpu_cooling.h>
+#include <linux/amlogic/gpucore_cooling.h>
+#endif
#include <common/mali_kernel_common.h>
#include <common/mali_osk_profiling.h>
#include <common/mali_pmu.h>
@@ -184,7 +188,7 @@ static struct resource mali_gpu_resources[] =
INT_MALI_PP)
};
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL) || defined(CONFIG_GPU_THERMAL)
static void set_limit_mali_freq(u32 idx)
{
if (mali_plat_data.limit_on == 0)
@@ -201,7 +205,7 @@ static u32 get_limit_mali_freq(void)
}
#endif
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL) || defined(CONFIG_GPU_THERMAL)
static u32 set_limit_pp_num(u32 num)
{
u32 ret = -1;
@@ -450,7 +454,7 @@ int mali_deep_resume(struct device *device)
void mali_post_init(void)
{
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL) || defined(CONFIG_GPU_THERMAL)
int err;
struct gpufreq_cooling_device *gcdev = NULL;
struct gpucore_cooling_device *gccdev = NULL;
diff --git a/utgard/platform/meson_m450/platform_m8b.c b/utgard/platform/meson_m450/platform_m8b.c
index 692aafe..99d86b8 100644
--- a/utgard/platform/meson_m450/platform_m8b.c
+++ b/utgard/platform/meson_m450/platform_m8b.c
@@ -19,8 +19,15 @@
#include <mach/io.h>
#include <asm/io.h>
#include <linux/mali/mali_utgard.h>
+#if defined(CONFIG_GPU_THERMAL)
#include <linux/gpu_cooling.h>
#include <linux/gpucore_cooling.h>
+#endif
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL)
+#include <linux/amlogic/gpu_cooling.h>
+#include <linux/amlogic/gpucore_cooling.h>
+#endif
+
#include <common/mali_kernel_common.h>
#include <common/mali_osk_profiling.h>
#include <common/mali_pmu.h>
@@ -433,7 +440,7 @@ int mali_deep_resume(struct device *device)
void mali_post_init(void)
{
-#ifdef CONFIG_GPU_THERMAL
+#if defined(CONFIG_AMLOGIC_GPU_THERMAL) || defined(CONFIG_GPU_THERMAL)
int err;
struct gpufreq_cooling_device *gcdev = NULL;
struct gpucore_cooling_device *gccdev = NULL;