aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
diff options
context:
space:
mode:
authorGravatar Evan Quan <evan.quan@amd.com> 2017-12-28 14:14:08 +0800
committerGravatar Alex Deucher <alexander.deucher@amd.com> 2018-02-19 14:17:06 -0500
commit1357f0c5ac357f0dfed8f900be7700d4d6bc152a (patch)
tree657b2ca309abd46c5f718e012a73f70de7c288e5 /drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
parentdrm/amd/powerplay: correct PP_TemperatureRange member type since negative val... (diff)
downloadlinux-1357f0c5ac357f0dfed8f900be7700d4d6bc152a.tar.gz
linux-1357f0c5ac357f0dfed8f900be7700d4d6bc152a.tar.bz2
linux-1357f0c5ac357f0dfed8f900be7700d4d6bc152a.zip
drm/amd/powerplay: new cgs interface setting dpm thermal range
This will be used by powerplay to update the dpm temp range structure used to interface with hwmon. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
index 4466f3535e2d..bccb0f70c997 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
@@ -1187,6 +1187,18 @@ static int amdgpu_cgs_call_acpi_method(struct cgs_device *cgs_device,
return amdgpu_cgs_acpi_eval_object(cgs_device, &info);
}
+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,
@@ -1214,6 +1226,7 @@ static const struct cgs_ops amdgpu_cgs_ops = {
.enter_safe_mode = amdgpu_cgs_enter_safe_mode,
.lock_grbm_idx = amdgpu_cgs_lock_grbm_idx,
.register_pp_handle = amdgpu_cgs_register_pp_handle,
+ .set_temperature_range = amdgpu_cgs_set_temperature_range,
};
static const struct cgs_os_ops amdgpu_cgs_os_ops = {