[PATCH 1/4] drm/amd/powerplay: show the right unit for the temp printed out

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Got it. I will drop this patch.

Regards,
Evan
From: Deucher, Alexander
Sent: Sunday, December 31, 2017 2:29 AM
To: Quan, Evan <Evan.Quan at amd.com>; amd-gfx at lists.freedesktop.org
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 <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx<mailto:amd-gfx-bounces at lists.freedesktop.org>> on behalf of Evan Quan <evan.quan at amd.com<mailto:evan.quan at amd.com>>
Sent: Friday, December 29, 2017 2:44 AM
To: amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>
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 <evan.quan at amd.com<mailto:evan.quan at amd.com>>
---
 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
amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20180102/41f1e3ab/attachment.html>


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux