diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3686-drm-amd-pp-Remove-cgs-wrapper-function-for-temperatu.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3686-drm-amd-pp-Remove-cgs-wrapper-function-for-temperatu.patch | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3686-drm-amd-pp-Remove-cgs-wrapper-function-for-temperatu.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3686-drm-amd-pp-Remove-cgs-wrapper-function-for-temperatu.patch new file mode 100644 index 00000000..66e51a5a --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3686-drm-amd-pp-Remove-cgs-wrapper-function-for-temperatu.patch @@ -0,0 +1,105 @@ +From 64f2c7da4e6ac173f5eb3925e20174e65473be44 Mon Sep 17 00:00:00 2001 +From: Rex Zhu <Rex.Zhu@amd.com> +Date: Mon, 5 Mar 2018 16:07:22 +0800 +Subject: [PATCH 3686/4131] drm/amd/pp: Remove cgs wrapper function for + temperature update +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change-Id: Ifa78587055fb873d374a311241122eb0ed6d7bcf +Reviewed-by: Alex Deucher <alexdeucher@amd.com> +Acked-by: Christian König <christian.koenig@amd.com> +Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 13 ------------- + drivers/gpu/drm/amd/include/cgs_common.h | 6 ------ + drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 4 +++- + 3 files changed, 3 insertions(+), 20 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +index f37482c..76f4758 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +@@ -905,18 +905,6 @@ static int amdgpu_cgs_notify_dpm_enabled(struct cgs_device *cgs_device, bool ena + return 0; + } + +-static int amdgpu_cgs_set_temperature_range(struct cgs_device *cgs_device, +- int min_temperature, +- int max_temperature) +-{ +- CGS_FUNC_ADEV; +- +- adev->pm.dpm.thermal.min_temp = min_temperature; +- adev->pm.dpm.thermal.max_temp = max_temperature; +- +- return 0; +-} +- + static const struct cgs_ops amdgpu_cgs_ops = { + .alloc_gpu_mem = amdgpu_cgs_alloc_gpu_mem, + .free_gpu_mem = amdgpu_cgs_free_gpu_mem, +@@ -941,7 +929,6 @@ static const struct cgs_ops amdgpu_cgs_ops = { + .is_virtualization_enabled = amdgpu_cgs_is_virtualization_enabled, + .enter_safe_mode = amdgpu_cgs_enter_safe_mode, + .lock_grbm_idx = amdgpu_cgs_lock_grbm_idx, +- .set_temperature_range = amdgpu_cgs_set_temperature_range, + }; + + static const struct cgs_os_ops amdgpu_cgs_os_ops = { +diff --git a/drivers/gpu/drm/amd/include/cgs_common.h b/drivers/gpu/drm/amd/include/cgs_common.h +index 113ba6f..7f26f20 100644 +--- a/drivers/gpu/drm/amd/include/cgs_common.h ++++ b/drivers/gpu/drm/amd/include/cgs_common.h +@@ -354,9 +354,6 @@ typedef int (*cgs_enter_safe_mode)(struct cgs_device *cgs_device, bool en); + + typedef void (*cgs_lock_grbm_idx)(struct cgs_device *cgs_device, bool lock); + +-typedef int (*cgs_set_temperature_range)(struct cgs_device *cgs_device, +- int min_temperature, +- int max_temperature); + struct cgs_ops { + /* memory management calls (similar to KFD interface) */ + cgs_alloc_gpu_mem_t alloc_gpu_mem; +@@ -389,7 +386,6 @@ struct cgs_ops { + cgs_is_virtualization_enabled_t is_virtualization_enabled; + cgs_enter_safe_mode enter_safe_mode; + cgs_lock_grbm_idx lock_grbm_idx; +- cgs_set_temperature_range set_temperature_range; + }; + + struct cgs_os_ops; /* To be define in OS-specific CGS header */ +@@ -465,7 +461,5 @@ struct cgs_device + #define cgs_lock_grbm_idx(cgs_device, lock) \ + CGS_CALL(lock_grbm_idx, cgs_device, lock) + +-#define cgs_set_temperature_range(dev, min_temp, max_temp) \ +- CGS_CALL(set_temperature_range, dev, min_temp, max_temp) + + #endif /* _CGS_COMMON_H */ +diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +index f06f8f4..b784131 100644 +--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c ++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +@@ -222,6 +222,7 @@ int phm_start_thermal_controller(struct pp_hwmgr *hwmgr) + { + int ret = 0; + struct PP_TemperatureRange range = {TEMP_RANGE_MIN, TEMP_RANGE_MAX}; ++ struct amdgpu_device *adev = hwmgr->adev; + + if (hwmgr->hwmgr_func->get_thermal_temperature_range) + hwmgr->hwmgr_func->get_thermal_temperature_range( +@@ -232,7 +233,8 @@ int phm_start_thermal_controller(struct pp_hwmgr *hwmgr) + && hwmgr->hwmgr_func->start_thermal_controller != NULL) + ret = hwmgr->hwmgr_func->start_thermal_controller(hwmgr, &range); + +- cgs_set_temperature_range(hwmgr->device, range.min, range.max); ++ adev->pm.dpm.thermal.min_temp = range.min; ++ adev->pm.dpm.thermal.max_temp = range.max; + + return ret; + } +-- +2.7.4 + |