aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c7
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}