Skip to content

Commit

Permalink
drm/amd/amdgpu: change pptable output format from ASCII to binary
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Huang authored and Alex Deucher committed Aug 1, 2016
1 parent 903f75c commit 4f7ec15
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ static ssize_t amdgpu_get_pp_table(struct device *dev,
struct drm_device *ddev = dev_get_drvdata(dev);
struct amdgpu_device *adev = ddev->dev_private;
char *table = NULL;
int size, i;
int size;

if (adev->pp_enabled)
size = amdgpu_dpm_get_pp_table(adev, &table);
Expand All @@ -315,10 +315,7 @@ static ssize_t amdgpu_get_pp_table(struct device *dev,
if (size >= PAGE_SIZE)
size = PAGE_SIZE - 1;

for (i = 0; i < size; i++) {
sprintf(buf + i, "%02x", table[i]);
}
sprintf(buf + i, "\n");
memcpy(buf, table, size);

return size;
}
Expand Down

0 comments on commit 4f7ec15

Please sign in to comment.