drm/amd/amdgpu: change pptable output format from ASCII to binary
Subsystems (2)
PATCH 1/1 drm/amd/amdgpu: change pptable output format from ASCII to binary
--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +2 -5
@@ -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);
@@ -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; }
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1469817418-31500-1-git-send-email-JinHuiEric.Huang-5C7GfCeVMHo@public.gmane.org
Alex Deucher
Reviewed-byQuoted 1 line · Eric Huang
Signed-off-by Eric Huang <[email protected]>
Quoted 32 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +2
-6@@ -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);@@ -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; } --1.9.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Edward O'Callaghan
Reviewed-byQuoted 21 lines · Eric Huang
Signed-off-by Eric Huang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +1
-1@@ -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);@@ -315,10 +315,7 @@ static ssize_t amdgpu_get_pp_table(struct device *dev,if (size >=PAGE_SIZE )
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c static ssize_t amdgpu_get_pp_table(struct device *dev, · line 321
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +1
-4size =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; }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx