From: Huan Biao Date: Fri, 23 Mar 2018 09:00:00 +0000 (+0800) Subject: cooldev: fix gpu cooldev. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1f9d081f9b2ffe00a5d6c30852fdd6be6b9b8f13;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_mali-driver.git cooldev: fix gpu cooldev. PD#160967: cooldev: add g12a gpu cooling devices. Change-Id: I9f3b4c4e3af74f9dab75e47517e4e011dc0a5778 Signed-off-by: Huan Biao --- diff --git a/bifrost/r9p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c b/bifrost/r9p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c index 26a56f6..e1cc642 100644 --- a/bifrost/r9p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c +++ b/bifrost/r9p0/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c @@ -20,10 +20,10 @@ #include #endif #include -#ifdef CONFIG_GPU_THERMAL -#include -#include -#include +#ifdef CONFIG_AMLOGIC_GPU_THERMAL +#include +#include +#include #endif #include "mali_scaling.h" @@ -100,7 +100,7 @@ int get_gpu_max_clk_level(void) return mali_plat_data.cfg_clock; } -#ifdef CONFIG_GPU_THERMAL +#ifdef CONFIG_AMLOGIC_GPU_THERMAL static void set_limit_mali_freq(u32 idx) { if (mali_plat_data.limit_on == 0) @@ -132,7 +132,7 @@ static u32 get_mali_utilization(void) #endif #endif -#ifdef CONFIG_GPU_THERMAL +#ifdef CONFIG_AMLOGIC_GPU_THERMAL static u32 set_limit_pp_num(u32 num) { u32 ret = -1; @@ -195,7 +195,7 @@ int mali_meson_uninit(struct platform_device* ptr_plt_dev) void mali_post_init(void) { -#ifdef CONFIG_GPU_THERMAL +#ifdef CONFIG_AMLOGIC_GPU_THERMAL int err; struct gpufreq_cooling_device *gcdev = NULL; struct gpucore_cooling_device *gccdev = NULL; @@ -218,7 +218,7 @@ void mali_post_init(void) #endif err = gpufreq_cooling_register(gcdev); #ifdef CONFIG_DEVFREQ_THERMAL - aml_thermal_min_update(gcdev->cool_dev); + meson_gcooldev_min_update(gcdev->cool_dev); #endif if (err < 0) printk("register GPU cooling error\n"); @@ -235,7 +235,7 @@ void mali_post_init(void) gccdev->set_max_pp_num=set_limit_pp_num; err = (int)gpucore_cooling_register(gccdev); #ifdef CONFIG_DEVFREQ_THERMAL - aml_thermal_min_update(gccdev->cool_dev); + meson_gcooldev_min_update(gccdev->cool_dev); #endif if (err < 0) printk("register GPU cooling error\n"); diff --git a/dvalin/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c b/dvalin/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c index 26a56f6..3997300 100644 --- a/dvalin/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c +++ b/dvalin/kernel/drivers/gpu/arm/midgard/platform/devicetree/platform_gx.c @@ -20,10 +20,11 @@ #include #endif #include -#ifdef CONFIG_GPU_THERMAL -#include -#include -#include +#ifdef CONFIG_AMLOGIC_GPU_THERMAL +#include +#include +//#include +#include #endif #include "mali_scaling.h" @@ -100,7 +101,7 @@ int get_gpu_max_clk_level(void) return mali_plat_data.cfg_clock; } -#ifdef CONFIG_GPU_THERMAL +#ifdef CONFIG_AMLOGIC_GPU_THERMAL static void set_limit_mali_freq(u32 idx) { if (mali_plat_data.limit_on == 0) @@ -132,7 +133,7 @@ static u32 get_mali_utilization(void) #endif #endif -#ifdef CONFIG_GPU_THERMAL +#ifdef CONFIG_AMLOGIC_GPU_THERMAL static u32 set_limit_pp_num(u32 num) { u32 ret = -1; @@ -195,7 +196,7 @@ int mali_meson_uninit(struct platform_device* ptr_plt_dev) void mali_post_init(void) { -#ifdef CONFIG_GPU_THERMAL +#ifdef CONFIG_AMLOGIC_GPU_THERMAL int err; struct gpufreq_cooling_device *gcdev = NULL; struct gpucore_cooling_device *gccdev = NULL; @@ -218,7 +219,7 @@ void mali_post_init(void) #endif err = gpufreq_cooling_register(gcdev); #ifdef CONFIG_DEVFREQ_THERMAL - aml_thermal_min_update(gcdev->cool_dev); + meson_gcooldev_min_update(gcdev->cool_dev); #endif if (err < 0) printk("register GPU cooling error\n"); @@ -235,7 +236,7 @@ void mali_post_init(void) gccdev->set_max_pp_num=set_limit_pp_num; err = (int)gpucore_cooling_register(gccdev); #ifdef CONFIG_DEVFREQ_THERMAL - aml_thermal_min_update(gccdev->cool_dev); + meson_gcooldev_min_update(gccdev->cool_dev); #endif if (err < 0) printk("register GPU cooling error\n");