<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"><span style="font-size: 12pt;">I see some functions in amdgpu_pm.c have function level documentation, so that it would be good to have this for newly added functions.</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-size: 12pt;"><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-size: 12pt;">Another comment is inline.</span></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><span style="font-size: 12pt;">>From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Tom St Denis <tom.stdenis@amd.com></span><br>
</p>
<div style="color: rgb(0, 0, 0);">
<div>>Sent: Wednesday, June 20, 2018 8:31 AM</div>
<div>>To: amd-gfx@lists.freedesktop.org</div>
<div>>Cc: StDenis, Tom</div>
<div>>Subject: [PATCH] drm/amd/amdgpu: Add a GPU_LOAD entry to sysfs</div>
<div>> </div>
<div>>This adds what should be a stable interface to read GPU</div>
<div>>load from userspace.</div>
<div>></div>
<div>>Signed-off-by: Tom St Denis <tom.stdenis@amd.com></div>
<div>>---</div>
<div>> drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 41 ++++++++++++++++++++++++++++++++++</div>
<div>> 1 file changed, 41 insertions(+)</div>
<div>></div>
<div>>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c</div>
<div>>index 113edffb5960..d57b414ac228 100644</div>
<div>>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c</div>
<div>>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c</div>
<div>>@@ -918,6 +918,37 @@ static ssize_t amdgpu_set_pp_power_profile_mode(struct device *dev,</div>
<div>>         return -EINVAL;</div>
<div>> }</div>
<div>> </div>
<div>>+static ssize_t amdgpu_get_busy_level(struct device *dev,</div>
<div>>+               struct device_attribute *attr,</div>
<div>>+               char *buf)</div>
<div>>+{</div>
<div>>+       struct drm_device *ddev = dev_get_drvdata(dev);</div>
<div>>+       struct amdgpu_device *adev = ddev->dev_private;</div>
<div>>+       int r, value, size = sizeof(value);</div>
<div>>+</div>
<div>>+       /* sanity check PP is enabled */</div>
<div>>+       if (!(adev->powerplay.pp_funcs &&</div>
<div>>+             adev->powerplay.pp_funcs->read_sensor))</div>
<div>>+               return -EINVAL;</div>
<div>>+</div>
<div>>+       /* get the temperature */</div>
<div><br>
</div>
<div>Is load is the same thing as temperature?</div>
<div><br>
</div>
<div>[snap]</div>
<div><br>
</div>
<div><br>
</div>
<div>Slava A</div>
</div>
</div>
</body>
</html>