Got it. I will drop this patch.

Regards,
Evan
From: Deucher, Alexander
Sent: Sunday, December 31, 2017 2:29 AM
To: Quan, Evan <[email protected]>; [email protected]
Subject: Re: [PATCH 1/4] drm/amd/powerplay: show the right unit for the temp 
printed out


I don't think the hwmon interface should expose the units in the string, this 
will probably break some applications that use the hwmon interface.  They are 
assumed to be milli-degrees celsius as per the API.



Alex

________________________________
From: amd-gfx 
<[email protected]<mailto:[email protected]>>
 on behalf of Evan Quan <[email protected]<mailto:[email protected]>>
Sent: Friday, December 29, 2017 2:44 AM
To: [email protected]<mailto:[email protected]>
Cc: Quan, Evan
Subject: [PATCH 1/4] drm/amd/powerplay: show the right unit for the temp 
printed out

Change-Id: I30ea29aa85ab89c0017ecb4e0ab469db5ab5c103
Signed-off-by: Evan Quan <[email protected]<mailto:[email protected]>>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 814329b..91f809e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -789,7 +789,7 @@ static ssize_t amdgpu_hwmon_show_temp(struct device *dev,
         else
                 temp = amdgpu_dpm_get_temperature(adev);

-       return snprintf(buf, PAGE_SIZE, "%d\n", temp);
+       return snprintf(buf, PAGE_SIZE, "%d millicelsius\n", temp);
 }

 static ssize_t amdgpu_hwmon_show_temp_thresh(struct device *dev,
@@ -805,7 +805,7 @@ static ssize_t amdgpu_hwmon_show_temp_thresh(struct device 
*dev,
         else
                 temp = adev->pm.dpm.thermal.max_temp;

-       return snprintf(buf, PAGE_SIZE, "%d\n", temp);
+       return snprintf(buf, PAGE_SIZE, "%d millicelsius\n", temp);
 }

 static ssize_t amdgpu_hwmon_get_pwm1_enable(struct device *dev,
--
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to