diff options
author | Eric Huang <JinHuiEric.Huang@amd.com> | 2016-07-28 17:25:01 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-08-08 11:32:57 -0400 |
commit | 1684d3ba488529266ce6f97b88076bd185f4790e (patch) | |
tree | efd49b03050246586bad736401c712377fe8ce31 | |
parent | b9a8be95b1149b74a9455f6bbe633aa241ed5204 (diff) |
drm/amd/amdgpu: change pptable output format from ASCII to binary
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index 411965f12c01..d4ec3cb187a5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |||
@@ -305,7 +305,7 @@ static ssize_t amdgpu_get_pp_table(struct device *dev, | |||
305 | struct drm_device *ddev = dev_get_drvdata(dev); | 305 | struct drm_device *ddev = dev_get_drvdata(dev); |
306 | struct amdgpu_device *adev = ddev->dev_private; | 306 | struct amdgpu_device *adev = ddev->dev_private; |
307 | char *table = NULL; | 307 | char *table = NULL; |
308 | int size, i; | 308 | int size; |
309 | 309 | ||
310 | if (adev->pp_enabled) | 310 | if (adev->pp_enabled) |
311 | size = amdgpu_dpm_get_pp_table(adev, &table); | 311 | size = amdgpu_dpm_get_pp_table(adev, &table); |
@@ -315,10 +315,7 @@ static ssize_t amdgpu_get_pp_table(struct device *dev, | |||
315 | if (size >= PAGE_SIZE) | 315 | if (size >= PAGE_SIZE) |
316 | size = PAGE_SIZE - 1; | 316 | size = PAGE_SIZE - 1; |
317 | 317 | ||
318 | for (i = 0; i < size; i++) { | 318 | memcpy(buf, table, size); |
319 | sprintf(buf + i, "%02x", table[i]); | ||
320 | } | ||
321 | sprintf(buf + i, "\n"); | ||
322 | 319 | ||
323 | return size; | 320 | return size; |
324 | } | 321 | } |